* [PATCH] staging: rtl8712: rtl871x_security.c: remove unnecessary variable initialization @ 2015-06-26 14:12 Sunil Shahu 2015-06-26 15:50 ` Luis de Bethencourt 0 siblings, 1 reply; 5+ messages in thread From: Sunil Shahu @ 2015-06-26 14:12 UTC (permalink / raw) To: gregkh; +Cc: dan.carpenter, devel, linux-kernel, sudipm.mukherjee Variable "u32 c" always re-initialize in for loop. Initialized value of "u32 c" is not used in function and is redundant, hence removed. Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Sunil Shahu <shshahu@gmail.com> --- drivers/staging/rtl8712/rtl871x_security.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8712/rtl871x_security.c b/drivers/staging/rtl8712/rtl871x_security.c index 21465c9..8627928 100644 --- a/drivers/staging/rtl8712/rtl871x_security.c +++ b/drivers/staging/rtl8712/rtl871x_security.c @@ -125,7 +125,7 @@ static u8 crc32_reverseBit(u8 data) static void crc32_init(void) { sint i, j; - u32 c = 0x12340000; + u32 c; u8 *p = (u8 *)&c, *p1; u8 k; -- 1.9.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: rtl8712: rtl871x_security.c: remove unnecessary variable initialization 2015-06-26 14:12 [PATCH] staging: rtl8712: rtl871x_security.c: remove unnecessary variable initialization Sunil Shahu @ 2015-06-26 15:50 ` Luis de Bethencourt 2015-06-26 15:51 ` Dan Carpenter 0 siblings, 1 reply; 5+ messages in thread From: Luis de Bethencourt @ 2015-06-26 15:50 UTC (permalink / raw) To: Sunil Shahu; +Cc: gregkh, dan.carpenter, devel, linux-kernel, sudipm.mukherjee On Fri, Jun 26, 2015 at 07:42:24PM +0530, Sunil Shahu wrote: > Variable "u32 c" always re-initialize in for loop. > Initialized value of "u32 c" is not used in function > and is redundant, hence removed. > > Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> > Signed-off-by: Sunil Shahu <shshahu@gmail.com> > --- > drivers/staging/rtl8712/rtl871x_security.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/rtl8712/rtl871x_security.c b/drivers/staging/rtl8712/rtl871x_security.c > index 21465c9..8627928 100644 > --- a/drivers/staging/rtl8712/rtl871x_security.c > +++ b/drivers/staging/rtl8712/rtl871x_security.c > @@ -125,7 +125,7 @@ static u8 crc32_reverseBit(u8 data) > static void crc32_init(void) > { > sint i, j; > - u32 c = 0x12340000; > + u32 c; > u8 *p = (u8 *)&c, *p1; > u8 k; > > -- > 1.9.1 The patch is good, the value assigned to c is immediately overwritten. Unfortunately the patch fails to apply in staging-testing and linux-next. Could you please rebase? Thanks, Luis ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: rtl8712: rtl871x_security.c: remove unnecessary variable initialization 2015-06-26 15:50 ` Luis de Bethencourt @ 2015-06-26 15:51 ` Dan Carpenter 2015-06-26 16:20 ` Luis de Bethencourt 2015-07-03 5:50 ` Sunil Shahu 0 siblings, 2 replies; 5+ messages in thread From: Dan Carpenter @ 2015-06-26 15:51 UTC (permalink / raw) To: Luis de Bethencourt Cc: Sunil Shahu, gregkh, devel, linux-kernel, sudipm.mukherjee On Fri, Jun 26, 2015 at 05:50:27PM +0200, Luis de Bethencourt wrote: > On Fri, Jun 26, 2015 at 07:42:24PM +0530, Sunil Shahu wrote: > > Variable "u32 c" always re-initialize in for loop. > > Initialized value of "u32 c" is not used in function > > and is redundant, hence removed. > > > > Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> > > Signed-off-by: Sunil Shahu <shshahu@gmail.com> > > --- > > drivers/staging/rtl8712/rtl871x_security.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/staging/rtl8712/rtl871x_security.c b/drivers/staging/rtl8712/rtl871x_security.c > > index 21465c9..8627928 100644 > > --- a/drivers/staging/rtl8712/rtl871x_security.c > > +++ b/drivers/staging/rtl8712/rtl871x_security.c > > @@ -125,7 +125,7 @@ static u8 crc32_reverseBit(u8 data) > > static void crc32_init(void) > > { > > sint i, j; > > - u32 c = 0x12340000; > > + u32 c; > > u8 *p = (u8 *)&c, *p1; > > u8 k; > > > > -- > > 1.9.1 > > The patch is good, the value assigned to c is immediately overwritten. > > Unfortunately the patch fails to apply in staging-testing and linux-next. Could > you please rebase? It's based on earlier patches on the list. Normally only Greg tests that patches apply and it will for him because he applies them as the order they arrive. But we should probably start putting notes on the patches which earlier patches are required... regards, dan carpenter ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: rtl8712: rtl871x_security.c: remove unnecessary variable initialization 2015-06-26 15:51 ` Dan Carpenter @ 2015-06-26 16:20 ` Luis de Bethencourt 2015-07-03 5:50 ` Sunil Shahu 1 sibling, 0 replies; 5+ messages in thread From: Luis de Bethencourt @ 2015-06-26 16:20 UTC (permalink / raw) To: Dan Carpenter; +Cc: Sunil Shahu, gregkh, devel, linux-kernel, sudipm.mukherjee On Fri, Jun 26, 2015 at 06:51:33PM +0300, Dan Carpenter wrote: > On Fri, Jun 26, 2015 at 05:50:27PM +0200, Luis de Bethencourt wrote: > > On Fri, Jun 26, 2015 at 07:42:24PM +0530, Sunil Shahu wrote: > > > Variable "u32 c" always re-initialize in for loop. > > > Initialized value of "u32 c" is not used in function > > > and is redundant, hence removed. > > > > > > Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> > > > Signed-off-by: Sunil Shahu <shshahu@gmail.com> > > > --- > > > drivers/staging/rtl8712/rtl871x_security.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/drivers/staging/rtl8712/rtl871x_security.c b/drivers/staging/rtl8712/rtl871x_security.c > > > index 21465c9..8627928 100644 > > > --- a/drivers/staging/rtl8712/rtl871x_security.c > > > +++ b/drivers/staging/rtl8712/rtl871x_security.c > > > @@ -125,7 +125,7 @@ static u8 crc32_reverseBit(u8 data) > > > static void crc32_init(void) > > > { > > > sint i, j; > > > - u32 c = 0x12340000; > > > + u32 c; > > > u8 *p = (u8 *)&c, *p1; > > > u8 k; > > > > > > -- > > > 1.9.1 > > > > The patch is good, the value assigned to c is immediately overwritten. > > > > Unfortunately the patch fails to apply in staging-testing and linux-next. Could > > you please rebase? > > It's based on earlier patches on the list. > > Normally only Greg tests that patches apply and it will for him because > he applies them as the order they arrive. But we should probably start > putting notes on the patches which earlier patches are required... > > regards, > dan carpenter > I see. Thanks for the explanation. Then the patch is good, but it doesn't need a Reviewed-by line since it you pre-approved it. Regards, Luis ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: rtl8712: rtl871x_security.c: remove unnecessary variable initialization 2015-06-26 15:51 ` Dan Carpenter 2015-06-26 16:20 ` Luis de Bethencourt @ 2015-07-03 5:50 ` Sunil Shahu 1 sibling, 0 replies; 5+ messages in thread From: Sunil Shahu @ 2015-07-03 5:50 UTC (permalink / raw) To: Dan Carpenter Cc: Luis de Bethencourt, gregkh, devel, linux-kernel, sudipm.mukherjee On Fri, 2015-06-26 at 18:51 +0300, Dan Carpenter wrote: > It's based on earlier patches on the list. > > Normally only Greg tests that patches apply and it will for him > because > he applies them as the order they arrive. But we should probably > start > putting notes on the patches which earlier patches are required... This patch is built on top of following patch. [PATCH v2] drivers: staging: rtl8712: remove unnecessary else statement http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2015-June/071797.html Regards, Sunil ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-07-03 5:51 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-06-26 14:12 [PATCH] staging: rtl8712: rtl871x_security.c: remove unnecessary variable initialization Sunil Shahu 2015-06-26 15:50 ` Luis de Bethencourt 2015-06-26 15:51 ` Dan Carpenter 2015-06-26 16:20 ` Luis de Bethencourt 2015-07-03 5:50 ` Sunil Shahu
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox