Commit f47ae798 authored by York Sun's avatar York Sun Committed by Borislav Petkov

EDAC, fsl_ddr: Replace simple_strtoul() with kstrtoul()

Replace obsolete simple_strtoul() with kstrtoul().
Signed-off-by: default avatarYork Sun <york.sun@nxp.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Link: http://lkml.kernel.org/r/1471990593-27536-1-git-send-email-york.sun@nxp.comSigned-off-by: default avatarBorislav Petkov <bp@suse.de>
parent eeb3d68b
...@@ -92,9 +92,15 @@ static ssize_t fsl_mc_inject_data_hi_store(struct device *dev, ...@@ -92,9 +92,15 @@ static ssize_t fsl_mc_inject_data_hi_store(struct device *dev,
{ {
struct mem_ctl_info *mci = to_mci(dev); struct mem_ctl_info *mci = to_mci(dev);
struct fsl_mc_pdata *pdata = mci->pvt_info; struct fsl_mc_pdata *pdata = mci->pvt_info;
unsigned long val;
int rc;
if (isdigit(*data)) { if (isdigit(*data)) {
ddr_out32(pdata->mc_vbase + FSL_MC_DATA_ERR_INJECT_HI, rc = kstrtoul(data, 0, &val);
simple_strtoul(data, NULL, 0)); if (rc)
return rc;
ddr_out32(pdata->mc_vbase + FSL_MC_DATA_ERR_INJECT_HI, val);
return count; return count;
} }
return 0; return 0;
...@@ -106,9 +112,15 @@ static ssize_t fsl_mc_inject_data_lo_store(struct device *dev, ...@@ -106,9 +112,15 @@ static ssize_t fsl_mc_inject_data_lo_store(struct device *dev,
{ {
struct mem_ctl_info *mci = to_mci(dev); struct mem_ctl_info *mci = to_mci(dev);
struct fsl_mc_pdata *pdata = mci->pvt_info; struct fsl_mc_pdata *pdata = mci->pvt_info;
unsigned long val;
int rc;
if (isdigit(*data)) { if (isdigit(*data)) {
ddr_out32(pdata->mc_vbase + FSL_MC_DATA_ERR_INJECT_LO, rc = kstrtoul(data, 0, &val);
simple_strtoul(data, NULL, 0)); if (rc)
return rc;
ddr_out32(pdata->mc_vbase + FSL_MC_DATA_ERR_INJECT_LO, val);
return count; return count;
} }
return 0; return 0;
...@@ -120,9 +132,15 @@ static ssize_t fsl_mc_inject_ctrl_store(struct device *dev, ...@@ -120,9 +132,15 @@ static ssize_t fsl_mc_inject_ctrl_store(struct device *dev,
{ {
struct mem_ctl_info *mci = to_mci(dev); struct mem_ctl_info *mci = to_mci(dev);
struct fsl_mc_pdata *pdata = mci->pvt_info; struct fsl_mc_pdata *pdata = mci->pvt_info;
unsigned long val;
int rc;
if (isdigit(*data)) { if (isdigit(*data)) {
ddr_out32(pdata->mc_vbase + FSL_MC_ECC_ERR_INJECT, rc = kstrtoul(data, 0, &val);
simple_strtoul(data, NULL, 0)); if (rc)
return rc;
ddr_out32(pdata->mc_vbase + FSL_MC_ECC_ERR_INJECT, val);
return count; return count;
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment