Message ID | 20201102114512.1062724-2-lee.jones@linaro.org |
---|---|
State | New |
Headers | show |
Series | [01/30] net: fddi: skfp: ecm: Protect 'if' when AIX_EVENT is not defined | expand |
On Mon, 2 Nov 2020 11:44:43 +0000 Lee Jones wrote: > When AIX_EVENT is not defined, the 'if' body will be empty, which > makes GCC complain. Place bracketing around the invocation to protect > it. > > Fixes the following W=1 kernel build warning(s): > > drivers/net/fddi/skfp/ecm.c: In function ‘ecm_fsm’: > drivers/net/fddi/skfp/ecm.c:153:29: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] > > Cc: "David S. Miller" <davem@davemloft.net> > Cc: Jakub Kicinski <kuba@kernel.org> > Cc: netdev@vger.kernel.org > Signed-off-by: Lee Jones <lee.jones@linaro.org> Okay, I applied most of these, but please don't post series larger than 15 patches in the future. Also each patch series should have a cover letter. I did not apply: - wimax - it should go to staging - tulip - does not apply - lan79xx - has checkpatch warnings - smsc - I'm expecting a patch from Andew there
On Tue, 03 Nov 2020, Jakub Kicinski wrote: > On Mon, 2 Nov 2020 11:44:43 +0000 Lee Jones wrote: > > When AIX_EVENT is not defined, the 'if' body will be empty, which > > makes GCC complain. Place bracketing around the invocation to protect > > it. > > > > Fixes the following W=1 kernel build warning(s): > > > > drivers/net/fddi/skfp/ecm.c: In function ‘ecm_fsm’: > > drivers/net/fddi/skfp/ecm.c:153:29: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] > > > > Cc: "David S. Miller" <davem@davemloft.net> > > Cc: Jakub Kicinski <kuba@kernel.org> > > Cc: netdev@vger.kernel.org > > Signed-off-by: Lee Jones <lee.jones@linaro.org> > > Okay, I applied most of these, Thank you. > but please don't post series larger than 15 patches in the future. No problem. > Also each patch series should have a cover letter. https://lore.kernel.org/lkml/20200817081630.GR4354@dell/ > I did not apply: > > - wimax - it should go to staging > - tulip - does not apply > - lan79xx - has checkpatch warnings > - smsc - I'm expecting a patch from Andew there I'll look into these. Thanks again Jakub. -- Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
On Wed, 04 Nov 2020, Lee Jones wrote: > On Tue, 03 Nov 2020, Jakub Kicinski wrote: > > > On Mon, 2 Nov 2020 11:44:43 +0000 Lee Jones wrote: > > > When AIX_EVENT is not defined, the 'if' body will be empty, which > > > makes GCC complain. Place bracketing around the invocation to protect > > > it. > > > > > > Fixes the following W=1 kernel build warning(s): > > > > > > drivers/net/fddi/skfp/ecm.c: In function ‘ecm_fsm’: > > > drivers/net/fddi/skfp/ecm.c:153:29: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] > > > > > > Cc: "David S. Miller" <davem@davemloft.net> > > > Cc: Jakub Kicinski <kuba@kernel.org> > > > Cc: netdev@vger.kernel.org > > > Signed-off-by: Lee Jones <lee.jones@linaro.org> > > > > Okay, I applied most of these, > > Thank you. > > > but please don't post series larger than 15 patches in the future. > > No problem. > > > Also each patch series should have a cover letter. > > https://lore.kernel.org/lkml/20200817081630.GR4354@dell/ Whoops. Wrong one. Ah, I see what happened. It looks like it was only sent to Dave for some reason. Apologies. Will fix in the future. -- Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
diff --git a/drivers/net/fddi/skfp/ecm.c b/drivers/net/fddi/skfp/ecm.c index 15c503f43727b..97f3efd5eb13c 100644 --- a/drivers/net/fddi/skfp/ecm.c +++ b/drivers/net/fddi/skfp/ecm.c @@ -147,10 +147,11 @@ static void ecm_fsm(struct s_smc *smc, int cmd) /* For AIX event notification: */ /* Is a disconnect command remotely issued ? */ if (cmd == EC_DISCONNECT && - smc->mib.fddiSMTRemoteDisconnectFlag == TRUE) + smc->mib.fddiSMTRemoteDisconnectFlag == TRUE) { AIX_EVENT (smc, (u_long) CIO_HARD_FAIL, (u_long) FDDI_REMOTE_DISCONNECT, smt_get_event_word(smc), smt_get_error_word(smc) ); + } /*jd 05-Aug-1999 Bug #10419 "Port Disconnect fails at Dup MAc Cond."*/ if (cmd == EC_CONNECT) {
When AIX_EVENT is not defined, the 'if' body will be empty, which makes GCC complain. Place bracketing around the invocation to protect it. Fixes the following W=1 kernel build warning(s): drivers/net/fddi/skfp/ecm.c: In function ‘ecm_fsm’: drivers/net/fddi/skfp/ecm.c:153:29: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] Cc: "David S. Miller" <davem@davemloft.net> Cc: Jakub Kicinski <kuba@kernel.org> Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones <lee.jones@linaro.org> --- drivers/net/fddi/skfp/ecm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.25.1