Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1673084
| From | "Gustavo A. R. Silva" <garsilva@embeddedor.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] edac: pnd2_edac: add code comment for clarification and update variable assignment |
| Date | 2017-06-23 00:10 +0200 |
| Message-ID | <tVisy-27Z-13@gated-at.bofh.it> (permalink) |
| References | <tVi9c-1Mr-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/2] edac: pnd2_edac: add code comment for clarification "Gustavo A. R. Silva" <garsilva@embeddedor.com> - 2017-06-22 21:30 +0200
[PATCH 2/2] edac: pnd2_edac: remove useless variable assignment "Gustavo A. R. Silva" <garsilva@embeddedor.com> - 2017-06-22 21:40 +0200
Re: [PATCH 2/2] edac: pnd2_edac: remove useless variable assignment Borislav Petkov <bp@alien8.de> - 2017-06-22 23:10 +0200
Re: [PATCH 2/2] edac: pnd2_edac: remove useless variable assignment "Gustavo A. R. Silva" <garsilva@embeddedor.com> - 2017-06-22 23:50 +0200
[PATCH] edac: pnd2_edac: add code comment for clarification and update variable assignment "Gustavo A. R. Silva" <garsilva@embeddedor.com> - 2017-06-23 00:10 +0200
Re: [PATCH] edac: pnd2_edac: add code comment for clarification and update variable assignment Borislav Petkov <bp@alien8.de> - 2017-06-23 10:00 +0200
csiph-web