linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][next] nfp: tls: Fix unreachable code issue
@ 2020-11-17 17:13 Gustavo A. R. Silva
  2020-11-17 20:06 ` Simon Horman
  0 siblings, 1 reply; 3+ messages in thread
From: Gustavo A. R. Silva @ 2020-11-17 17:13 UTC (permalink / raw)
  To: Simon Horman, Jakub Kicinski, David S. Miller
  Cc: oss-drivers, netdev, linux-kernel, Gustavo A. R. Silva

Fix the following unreachable code issue:

   drivers/net/ethernet/netronome/nfp/crypto/tls.c: In function 'nfp_net_tls_add':
   include/linux/compiler_attributes.h:208:41: warning: statement will never be executed [-Wswitch-unreachable]
     208 | # define fallthrough                    __attribute__((__fallthrough__))
         |                                         ^~~~~~~~~~~~~
   drivers/net/ethernet/netronome/nfp/crypto/tls.c:299:3: note: in expansion of macro 'fallthrough'
     299 |   fallthrough;
         |   ^~~~~~~~~~~

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
---
 drivers/net/ethernet/netronome/nfp/crypto/tls.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/netronome/nfp/crypto/tls.c b/drivers/net/ethernet/netronome/nfp/crypto/tls.c
index 76c51da5b66f..9b32ae46011c 100644
--- a/drivers/net/ethernet/netronome/nfp/crypto/tls.c
+++ b/drivers/net/ethernet/netronome/nfp/crypto/tls.c
@@ -295,8 +295,8 @@ nfp_net_tls_add(struct net_device *netdev, struct sock *sk,
 			ipv6 = true;
 			break;
 		}
-#endif
 		fallthrough;
+#endif
 	case AF_INET:
 		req_sz = sizeof(struct nfp_crypto_req_add_v4);
 		ipv6 = false;
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH][next] nfp: tls: Fix unreachable code issue
  2020-11-17 17:13 [PATCH][next] nfp: tls: Fix unreachable code issue Gustavo A. R. Silva
@ 2020-11-17 20:06 ` Simon Horman
  2020-11-18 18:48   ` Jakub Kicinski
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Horman @ 2020-11-17 20:06 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Jakub Kicinski, David S. Miller, oss-drivers, netdev, linux-kernel

On Tue, Nov 17, 2020 at 11:13:47AM -0600, Gustavo A. R. Silva wrote:
> Fix the following unreachable code issue:
> 
>    drivers/net/ethernet/netronome/nfp/crypto/tls.c: In function 'nfp_net_tls_add':
>    include/linux/compiler_attributes.h:208:41: warning: statement will never be executed [-Wswitch-unreachable]
>      208 | # define fallthrough                    __attribute__((__fallthrough__))
>          |                                         ^~~~~~~~~~~~~
>    drivers/net/ethernet/netronome/nfp/crypto/tls.c:299:3: note: in expansion of macro 'fallthrough'
>      299 |   fallthrough;
>          |   ^~~~~~~~~~~
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>

Reviewed-by: Simon Horman <simon.horman@netronome.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH][next] nfp: tls: Fix unreachable code issue
  2020-11-17 20:06 ` Simon Horman
@ 2020-11-18 18:48   ` Jakub Kicinski
  0 siblings, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2020-11-18 18:48 UTC (permalink / raw)
  To: Simon Horman
  Cc: Gustavo A. R. Silva, David S. Miller, oss-drivers, netdev, linux-kernel

On Tue, 17 Nov 2020 21:06:47 +0100 Simon Horman wrote:
> On Tue, Nov 17, 2020 at 11:13:47AM -0600, Gustavo A. R. Silva wrote:
> > Fix the following unreachable code issue:
> > 
> >    drivers/net/ethernet/netronome/nfp/crypto/tls.c: In function 'nfp_net_tls_add':
> >    include/linux/compiler_attributes.h:208:41: warning: statement will never be executed [-Wswitch-unreachable]
> >      208 | # define fallthrough                    __attribute__((__fallthrough__))
> >          |                                         ^~~~~~~~~~~~~
> >    drivers/net/ethernet/netronome/nfp/crypto/tls.c:299:3: note: in expansion of macro 'fallthrough'
> >      299 |   fallthrough;
> >          |   ^~~~~~~~~~~
> > 
> > Reported-by: kernel test robot <lkp@intel.com>
> > Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>  
> 
> Reviewed-by: Simon Horman <simon.horman@netronome.com>

Applied, thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-18 18:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-17 17:13 [PATCH][next] nfp: tls: Fix unreachable code issue Gustavo A. R. Silva
2020-11-17 20:06 ` Simon Horman
2020-11-18 18:48   ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).