Re: [PATCH] edac: pnd2_edac: add code comment for clarification and update variable assignment

2017-06-23 Thread Borislav Petkov
On Thu, Jun 22, 2017 at 05:05:35PM -0500, Gustavo A. R. Silva wrote:
> 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 
> Signed-off-by: Gustavo A. R. Silva 
> ---
>  drivers/edac/pnd2_edac.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Applied, thanks.

-- 
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.


Re: [PATCH] edac: pnd2_edac: add code comment for clarification and update variable assignment

2017-06-23 Thread Borislav Petkov
On Thu, Jun 22, 2017 at 05:05:35PM -0500, Gustavo A. R. Silva wrote:
> 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 
> Signed-off-by: Gustavo A. R. Silva 
> ---
>  drivers/edac/pnd2_edac.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Applied, thanks.

-- 
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.


[PATCH] edac: pnd2_edac: add code comment for clarification and update variable assignment

2017-06-22 Thread Gustavo A. R. Silva
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 
Signed-off-by: Gustavo A. R. Silva 
---
 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



[PATCH] edac: pnd2_edac: add code comment for clarification and update variable assignment

2017-06-22 Thread Gustavo A. R. Silva
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 
Signed-off-by: Gustavo A. R. Silva 
---
 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