diff mbox series

usb: gadget: uvc: Remove extra semicolon from the macro

Message ID 20241013142511.9946-1-abhishektamboli9@gmail.com (mailing list archive)
State Accepted
Commit f47333c690e49a9042d721f9c493ad78bbff11ac
Headers show
Series usb: gadget: uvc: Remove extra semicolon from the macro | expand

Commit Message

Abhishek Tamboli Oct. 13, 2024, 2:25 p.m. UTC
Remove the extra semicolon after the
do {} while (0) in UVC_COPY_DESCRIPTOR macro.

Fix the following checkpatch.pl warning

WARNING: do {} while (0) macros should not be semicolon terminated
+#define UVC_COPY_DESCRIPTOR(mem, dst, desc) \
+	do { \
+		memcpy(mem, desc, (desc)->bLength); \
+		*(dst)++ = mem; \
+		mem += (desc)->bLength; \
+	} while (0);

Signed-off-by: Abhishek Tamboli <abhishektamboli9@gmail.com>
---
 drivers/usb/gadget/function/f_uvc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.34.1

Comments

Kieran Bingham Oct. 14, 2024, 9:43 a.m. UTC | #1
Quoting Abhishek Tamboli (2024-10-13 15:25:11)
> Remove the extra semicolon after the
> do {} while (0) in UVC_COPY_DESCRIPTOR macro.
> 
> Fix the following checkpatch.pl warning
> 
> WARNING: do {} while (0) macros should not be semicolon terminated
> +#define UVC_COPY_DESCRIPTOR(mem, dst, desc) \
> +       do { \
> +               memcpy(mem, desc, (desc)->bLength); \
> +               *(dst)++ = mem; \
> +               mem += (desc)->bLength; \
> +       } while (0);
> 
> Signed-off-by: Abhishek Tamboli <abhishektamboli9@gmail.com>

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> ---
>  drivers/usb/gadget/function/f_uvc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/gadget/function/f_uvc.c b/drivers/usb/gadget/function/f_uvc.c
> index 40187b7112e7..edf0355d712c 100644
> --- a/drivers/usb/gadget/function/f_uvc.c
> +++ b/drivers/usb/gadget/function/f_uvc.c
> @@ -465,7 +465,7 @@ uvc_register_video(struct uvc_device *uvc)
>                 memcpy(mem, desc, (desc)->bLength); \
>                 *(dst)++ = mem; \
>                 mem += (desc)->bLength; \
> -       } while (0);
> +       } while (0)
> 
>  #define UVC_COPY_DESCRIPTORS(mem, dst, src) \
>         do { \
> --
> 2.34.1
>
diff mbox series

Patch

diff --git a/drivers/usb/gadget/function/f_uvc.c b/drivers/usb/gadget/function/f_uvc.c
index 40187b7112e7..edf0355d712c 100644
--- a/drivers/usb/gadget/function/f_uvc.c
+++ b/drivers/usb/gadget/function/f_uvc.c
@@ -465,7 +465,7 @@  uvc_register_video(struct uvc_device *uvc)
 		memcpy(mem, desc, (desc)->bLength); \
 		*(dst)++ = mem; \
 		mem += (desc)->bLength; \
-	} while (0);
+	} while (0)

 #define UVC_COPY_DESCRIPTORS(mem, dst, src) \
 	do { \