* [PATCH] serial: 8250_pci: Use fallthrough pseudo-keyword
@ 2021-05-07 13:04 Wei Ming Chen
2021-05-07 13:20 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Wei Ming Chen @ 2021-05-07 13:04 UTC (permalink / raw)
To: linux-kernel; +Cc: gregkh, linux-serial, Wei Ming Chen
Add pseudo-keyword macro fallthrough[1]
[1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through
Signed-off-by: Wei Ming Chen <jj251510319013@gmail.com>
---
drivers/tty/serial/8250/8250_pci.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
index 689d8227f95f..4158f06de4d5 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -847,8 +847,11 @@ static int pci_netmos_init(struct pci_dev *dev)
switch (dev->device) { /* FALLTHROUGH on all */
case PCI_DEVICE_ID_NETMOS_9904:
+ fallthrough;
case PCI_DEVICE_ID_NETMOS_9912:
+ fallthrough;
case PCI_DEVICE_ID_NETMOS_9922:
+ fallthrough;
case PCI_DEVICE_ID_NETMOS_9900:
num_serial = pci_netmos_9900_numports(dev);
break;
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] serial: 8250_pci: Use fallthrough pseudo-keyword
2021-05-07 13:04 [PATCH] serial: 8250_pci: Use fallthrough pseudo-keyword Wei Ming Chen
@ 2021-05-07 13:20 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2021-05-07 13:20 UTC (permalink / raw)
To: Wei Ming Chen; +Cc: linux-kernel, linux-serial
On Fri, May 07, 2021 at 09:04:03PM +0800, Wei Ming Chen wrote:
> Add pseudo-keyword macro fallthrough[1]
>
> [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through
>
> Signed-off-by: Wei Ming Chen <jj251510319013@gmail.com>
> ---
> drivers/tty/serial/8250/8250_pci.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
> index 689d8227f95f..4158f06de4d5 100644
> --- a/drivers/tty/serial/8250/8250_pci.c
> +++ b/drivers/tty/serial/8250/8250_pci.c
> @@ -847,8 +847,11 @@ static int pci_netmos_init(struct pci_dev *dev)
>
> switch (dev->device) { /* FALLTHROUGH on all */
> case PCI_DEVICE_ID_NETMOS_9904:
> + fallthrough;
> case PCI_DEVICE_ID_NETMOS_9912:
> + fallthrough;
> case PCI_DEVICE_ID_NETMOS_9922:
> + fallthrough;
> case PCI_DEVICE_ID_NETMOS_9900:
I really doubt this is needed here. If so, something is really wrong
with the static checkers.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-07 13:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-07 13:04 [PATCH] serial: 8250_pci: Use fallthrough pseudo-keyword Wei Ming Chen
2021-05-07 13:20 ` Greg KH
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).