diff options
author | Manish Narani <manish.narani@xilinx.com> | 2018-10-04 17:35:22 +0200 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2018-11-05 13:30:00 +0100 |
commit | fa9f6b9e1cf9620def93c985d424289eedf61b34 (patch) | |
tree | 6b1ec41c9807ae87b6a2d8e7625963d22b3a4cc0 /drivers/edac/synopsys_edac.c | |
parent | EDAC, synopsys: Correct comments (diff) | |
download | linux-fa9f6b9e1cf9620def93c985d424289eedf61b34.tar.xz linux-fa9f6b9e1cf9620def93c985d424289eedf61b34.zip |
EDAC, synopsys: Return void for functions always returning 0
The current driver has functions which are always returning 0 - make
them return void instead.
Signed-off-by: Manish Narani <manish.narani@xilinx.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
CC: Mauro Carvalho Chehab <mchehab@kernel.org>
CC: Michal Simek <michal.simek@xilinx.com>
CC: amit.kucheria@linaro.org
CC: devicetree@vger.kernel.org
CC: leoyang.li@nxp.com
CC: linux-arm-kernel@lists.infradead.org
CC: linux-edac <linux-edac@vger.kernel.org>
CC: mark.rutland@arm.com
CC: robh+dt@kernel.org
CC: sudeep.holla@arm.com
Link: http://lkml.kernel.org/r/1538667328-9465-5-git-send-email-manish.narani@xilinx.com
Diffstat (limited to 'drivers/edac/synopsys_edac.c')
-rw-r--r-- | drivers/edac/synopsys_edac.c | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/drivers/edac/synopsys_edac.c b/drivers/edac/synopsys_edac.c index b4666310a5f6..a625a68345a3 100644 --- a/drivers/edac/synopsys_edac.c +++ b/drivers/edac/synopsys_edac.c @@ -350,10 +350,8 @@ static enum mem_type get_mtype(const void __iomem *base) * * Initialize the chip select rows associated with the EDAC memory * controller instance. - * - * Return: Unconditionally 0. */ -static int init_csrows(struct mem_ctl_info *mci) +static void init_csrows(struct mem_ctl_info *mci) { struct synps_edac_priv *priv = mci->pvt_info; struct csrow_info *csi; @@ -374,8 +372,6 @@ static int init_csrows(struct mem_ctl_info *mci) dimm->dtype = get_dtype(priv->baseaddr); } } - - return 0; } /** @@ -386,12 +382,9 @@ static int init_csrows(struct mem_ctl_info *mci) * Perform initialization of the EDAC memory controller instance and * related driver-private data associated with the memory controller the * instance is bound to. - * - * Return: Always zero. */ -static int mc_init(struct mem_ctl_info *mci, struct platform_device *pdev) +static void mc_init(struct mem_ctl_info *mci, struct platform_device *pdev) { - int status; struct synps_edac_priv *priv; mci->pdev = &pdev->dev; @@ -413,9 +406,7 @@ static int mc_init(struct mem_ctl_info *mci, struct platform_device *pdev) mci->edac_check = check_errors; mci->ctl_page_to_phys = NULL; - status = init_csrows(mci); - - return status; + init_csrows(mci); } /** @@ -463,12 +454,7 @@ static int mc_probe(struct platform_device *pdev) priv = mci->pvt_info; priv->baseaddr = baseaddr; - rc = mc_init(mci, pdev); - if (rc) { - edac_printk(KERN_ERR, EDAC_MC, - "Failed to initialize instance\n"); - goto free_edac_mc; - } + mc_init(mci, pdev); rc = edac_mc_add_mc(mci); if (rc) { |