lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <8119fbe8-5f4b-e45c-6687-ec42aceb3428@microchip.com> Date: Mon, 11 Feb 2019 09:03:13 +0000 From: <Nicolas.Ferre@...rochip.com> To: <gustavo@...eddedor.com>, <wg@...ndegger.com>, <mkl@...gutronix.de>, <davem@...emloft.net>, <alexandre.belloni@...tlin.com>, <Ludovic.Desroches@...rochip.com> CC: <linux-can@...r.kernel.org>, <netdev@...r.kernel.org>, <linux-arm-kernel@...ts.infradead.org>, <linux-kernel@...r.kernel.org> Subject: Re: [PATCH][next] can: at91_can: mark expected switch fall-throughs On 08/02/2019 at 19:44, Gustavo A. R. Silva wrote: > In preparation to enabling -Wimplicit-fallthrough, mark switch > cases where we are expecting to fall through. > > Notice that, in this particular case, the /* fall through */ > comments are placed at the bottom of the case statement, which > is what GCC is expecting to find. > > Warning level 3 was used: -Wimplicit-fallthrough=3 > > This patch is part of the ongoing efforts to enabling > -Wimplicit-fallthrough. > > Signed-off-by: Gustavo A. R. Silva <gustavo@...eddedor.com> Looks good to me: Acked-by: Nicolas Ferre <nicolas.ferre@...rochip.com> > --- > drivers/net/can/at91_can.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/can/at91_can.c b/drivers/net/can/at91_can.c > index d98c69045b17..1718c20f9c99 100644 > --- a/drivers/net/can/at91_can.c > +++ b/drivers/net/can/at91_can.c > @@ -902,7 +902,8 @@ static void at91_irq_err_state(struct net_device *dev, > CAN_ERR_CRTL_TX_WARNING : > CAN_ERR_CRTL_RX_WARNING; > } > - case CAN_STATE_ERROR_WARNING: /* fallthrough */ > + /* fall through */ > + case CAN_STATE_ERROR_WARNING: > /* > * from: ERROR_ACTIVE, ERROR_WARNING > * to : ERROR_PASSIVE, BUS_OFF > @@ -951,7 +952,8 @@ static void at91_irq_err_state(struct net_device *dev, > netdev_dbg(dev, "Error Active\n"); > cf->can_id |= CAN_ERR_PROT; > cf->data[2] = CAN_ERR_PROT_ACTIVE; > - case CAN_STATE_ERROR_WARNING: /* fallthrough */ > + /* fall through */ > + case CAN_STATE_ERROR_WARNING: > reg_idr = AT91_IRQ_ERRA | AT91_IRQ_WARN | AT91_IRQ_BOFF; > reg_ier = AT91_IRQ_ERRP; > break; > -- Nicolas Ferre
Powered by blists - more mailing lists