From: "Gustavo A. R. Silva" <garsilva@embeddedor.com>
To: Borislav Petkov <bp@alien8.de>, Tony Luck <tony.luck@intel.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Cc: linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org,
"Gustavo A. R. Silva" <garsilva@embeddedor.com>
Subject: edac: pnd2_edac: add code comment for clarification and update variable assignment
Date: Thu, 22 Jun 2017 17:05:35 -0500 [thread overview]
Message-ID: <20170622220535.GA4896@embeddedgus> (raw)
Add code comment to make it clear that the fall-through is intentional and,
OR ret with its previous value to avoid overwriting it.
Cc: Borislav Petkov <bp@alien8.de>
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
drivers/edac/pnd2_edac.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/edac/pnd2_edac.c b/drivers/edac/pnd2_edac.c
index 1cad5a9..63cb323 100644
--- a/drivers/edac/pnd2_edac.c
+++ b/drivers/edac/pnd2_edac.c
@@ -174,8 +174,9 @@ static int apl_rd_reg(int port, int off, int op, void *data, size_t sz, char *na
switch (sz) {
case 8:
ret = sbi_send(port, off + 4, op, (u32 *)(data + 4));
+ /* fall through */
case 4:
- ret = sbi_send(port, off, op, (u32 *)data);
+ ret |= sbi_send(port, off, op, (u32 *)data);
pnd2_printk(KERN_DEBUG, "%s=%x%08x ret=%d\n", name,
sz == 8 ? *((u32 *)(data + 4)) : 0, *((u32 *)data), ret);
break;
WARNING: multiple messages have this Message-ID (diff)
From: "Gustavo A. R. Silva" <garsilva@embeddedor.com>
To: Borislav Petkov <bp@alien8.de>, Tony Luck <tony.luck@intel.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Cc: linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org,
"Gustavo A. R. Silva" <garsilva@embeddedor.com>
Subject: [PATCH] edac: pnd2_edac: add code comment for clarification and update variable assignment
Date: Thu, 22 Jun 2017 17:05:35 -0500 [thread overview]
Message-ID: <20170622220535.GA4896@embeddedgus> (raw)
In-Reply-To: <20170622164345.Horde.SwUuX9eHAPqyFo5pq1RUp09@gator4166.hostgator.com>
Add code comment to make it clear that the fall-through is intentional and,
OR ret with its previous value to avoid overwriting it.
Cc: Borislav Petkov <bp@alien8.de>
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
drivers/edac/pnd2_edac.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/edac/pnd2_edac.c b/drivers/edac/pnd2_edac.c
index 1cad5a9..63cb323 100644
--- a/drivers/edac/pnd2_edac.c
+++ b/drivers/edac/pnd2_edac.c
@@ -174,8 +174,9 @@ static int apl_rd_reg(int port, int off, int op, void *data, size_t sz, char *na
switch (sz) {
case 8:
ret = sbi_send(port, off + 4, op, (u32 *)(data + 4));
+ /* fall through */
case 4:
- ret = sbi_send(port, off, op, (u32 *)data);
+ ret |= sbi_send(port, off, op, (u32 *)data);
pnd2_printk(KERN_DEBUG, "%s=%x%08x ret=%d\n", name,
sz == 8 ? *((u32 *)(data + 4)) : 0, *((u32 *)data), ret);
break;
--
2.5.0
next reply other threads:[~2017-06-22 22:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-22 22:05 Gustavo A. R. Silva [this message]
2017-06-22 22:05 ` [PATCH] edac: pnd2_edac: add code comment for clarification and update variable assignment Gustavo A. R. Silva
-- strict thread matches above, loose matches on Subject: below --
2017-06-23 7:53 Borislav Petkov
2017-06-23 7:53 ` [PATCH] " Borislav Petkov
2017-06-22 21:43 [2/2] edac: pnd2_edac: remove useless " Gustavo A. R. Silva
2017-06-22 21:43 ` [PATCH 2/2] " Gustavo A. R. Silva
2017-06-22 21:07 [2/2] " Borislav Petkov
2017-06-22 21:07 ` [PATCH 2/2] " Borislav Petkov
2017-06-22 19:30 [2/2] " Gustavo A. R. Silva
2017-06-22 19:30 ` [PATCH 2/2] " Gustavo A. R. Silva
2017-06-22 19:26 [1/2] edac: pnd2_edac: add code comment for clarification Gustavo A. R. Silva
2017-06-22 19:26 ` [PATCH 1/2] " Gustavo A. R. Silva
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=20170622220535.GA4896@embeddedgus \
--to=garsilva@embeddedor.com \
--cc=bp@alien8.de \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=qiuxu.zhuo@intel.com \
--cc=tony.luck@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.