linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Manish Narani <manish.narani@xilinx.com>
To: <robh+dt@kernel.org>, <mark.rutland@arm.com>,
	<michal.simek@xilinx.com>, <bp@alien8.de>, <mchehab@kernel.org>,
	<manish.narani@xilinx.com>, <sudeep.holla@arm.com>,
	<amit.kucheria@linaro.org>, <leoyang.li@nxp.com>
Cc: <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-edac@vger.kernel.org>
Subject: [PATCH v8 04/10] edac: synopsys: Make return type void for functions always returning 0
Date: Thu, 4 Oct 2018 21:05:22 +0530	[thread overview]
Message-ID: <1538667328-9465-5-git-send-email-manish.narani@xilinx.com> (raw)
In-Reply-To: <1538667328-9465-1-git-send-email-manish.narani@xilinx.com>

The current driver has functions which are always returning 0. Those
functions can be modified to void.

Signed-off-by: Manish Narani <manish.narani@xilinx.com>
---
 drivers/edac/synopsys_edac.c | 22 ++++------------------
 1 file changed, 4 insertions(+), 18 deletions(-)

diff --git a/drivers/edac/synopsys_edac.c b/drivers/edac/synopsys_edac.c
index 7db5928..675155f 100644
--- a/drivers/edac/synopsys_edac.c
+++ b/drivers/edac/synopsys_edac.c
@@ -352,10 +352,8 @@ static enum mem_type edac_get_mtype(const void __iomem *base)
  *
  * Initializes the chip select rows associated with the EDAC memory
  * controller instance.
- *
- * Return: Unconditionally 0.
  */
-static int edac_init_csrows(struct mem_ctl_info *mci)
+static void edac_init_csrows(struct mem_ctl_info *mci)
 {
 	struct synps_edac_priv *priv = mci->pvt_info;
 	struct csrow_info *csi;
@@ -376,8 +374,6 @@ static int edac_init_csrows(struct mem_ctl_info *mci)
 			dimm->dtype	= edac_get_dtype(priv->baseaddr);
 		}
 	}
-
-	return 0;
 }
 
 /**
@@ -388,13 +384,10 @@ static int edac_init_csrows(struct mem_ctl_info *mci)
  * Performs 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 edac_mc_init(struct mem_ctl_info *mci,
+static void edac_mc_init(struct mem_ctl_info *mci,
 				 struct platform_device *pdev)
 {
-	int status;
 	struct synps_edac_priv *priv;
 
 	mci->pdev = &pdev->dev;
@@ -416,9 +409,7 @@ static int edac_mc_init(struct mem_ctl_info *mci,
 	mci->edac_check = edac_check;
 	mci->ctl_page_to_phys = NULL;
 
-	status = edac_init_csrows(mci);
-
-	return status;
+	edac_init_csrows(mci);
 }
 
 /**
@@ -466,12 +457,7 @@ static int synps_edac_mc_probe(struct platform_device *pdev)
 
 	priv = mci->pvt_info;
 	priv->baseaddr = baseaddr;
-	rc = edac_mc_init(mci, pdev);
-	if (rc) {
-		edac_printk(KERN_ERR, EDAC_MC,
-			    "Failed to initialize instance\n");
-		goto free_edac_mc;
-	}
+	edac_mc_init(mci, pdev);
 
 	rc = edac_mc_add_mc(mci);
 	if (rc) {
-- 
2.1.1


  parent reply	other threads:[~2018-10-04 15:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-04 15:35 [PATCH v8 00/10] EDAC: Enhancements to Synopsys EDAC driver Manish Narani
2018-10-04 15:35 ` [PATCH v8 01/10] edac: synopsys: Update the driver code for better readability Manish Narani
2018-10-04 15:35 ` [PATCH v8 02/10] edac: synopsys: Rename the static functions to a shorter name Manish Narani
2018-10-04 20:35   ` Borislav Petkov
2018-10-08 13:45     ` Manish Narani
2018-10-08 18:03       ` Borislav Petkov
2018-10-04 15:35 ` [PATCH v8 03/10] edac: synopsys: Modify the comments in the driver Manish Narani
2018-10-04 20:36   ` Borislav Petkov
2018-10-04 15:35 ` Manish Narani [this message]
2018-10-04 15:35 ` [PATCH v8 05/10] edac: synps: Add platform specific structures for ddrc controller Manish Narani
2018-10-05 16:53   ` Borislav Petkov
2018-10-04 15:35 ` [PATCH v8 06/10] dt: bindings: Document ZynqMP DDRC in Synopsys documentation Manish Narani
2018-10-04 15:35 ` [PATCH v8 07/10] edac: synopsys: Add macro defines for ZynqMP DDRC Manish Narani
2018-10-04 15:35 ` [PATCH v8 08/10] edac: synopsys: Add EDAC ECC support " Manish Narani
2018-10-04 15:35 ` [PATCH v8 09/10] arm64: zynqmp: Add DDRC node Manish Narani
2018-10-04 15:35 ` [PATCH v8 10/10] edac: synopsys: Add Error Injection support for ZynqMP DDRC Manish Narani

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1538667328-9465-5-git-send-email-manish.narani@xilinx.com \
    --to=manish.narani@xilinx.com \
    --cc=amit.kucheria@linaro.org \
    --cc=bp@alien8.de \
    --cc=devicetree@vger.kernel.org \
    --cc=leoyang.li@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mchehab@kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=robh+dt@kernel.org \
    --cc=sudeep.holla@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).