Re: [PATCH] USBIP: Use fallthrough pseudo-keyword

From: Greg KH
Date: Thu Feb 15 2024 - 05:17:06 EST


On Thu, Feb 15, 2024 at 05:26:30PM +0800, Pairman Guo wrote:
> Hi maintainers,
>
> There is a usage of ``/* FALLTHRU */`` in a switch statement in main()
> that have long been untouched. This patch replaced it with the
> better and proper pseudo-keyword ``fallthrough;``.
>
> Please merge if it is the case. Thank you in advance.

This is not needed in a changelog text.

> Signed-off-by: Pairman Guo <pairmanxlr@xxxxxxxxx>
> ---
> tools/usb/usbip/src/usbip.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/usb/usbip/src/usbip.c b/tools/usb/usbip/src/usbip.c
> index f7c7220d9..ddcafb5c7 100644
> --- a/tools/usb/usbip/src/usbip.c
> +++ b/tools/usb/usbip/src/usbip.c
> @@ -165,7 +165,7 @@ int main(int argc, char *argv[])
> case '?':
> printf("usbip: invalid option\n");
> /* Terminate after printing error */
> - /* FALLTHRU */
> + fallthrough;

Did you compile this? This is userspace code, and as-such, I don't
think it has this keyword, does it?

thanks,

greg k-h