* [PATCH] usb: serial: fix: trainling statements `break` should be on next line
@ 2025-10-04 8:01 vivekyadav1207731111
2025-10-06 12:13 ` Johan Hovold
2025-10-07 1:16 ` David Hunter
0 siblings, 2 replies; 4+ messages in thread
From: vivekyadav1207731111 @ 2025-10-04 8:01 UTC (permalink / raw)
To: johan, gregkh
Cc: linux-usb, linux-kernel, skhan, linux-kernel-mentees,
david.hunter.linux, Vivek Yadav
From: Vivek Yadav <vivekyadav1207731111@gmail.com>
Run `checkpatch.pl` script on path `drivers/usb/serial/*`
Find ERROR: trailing statements should be on next line
Doesn't claim any functionality changes in any of the modified
file.
Signed-off-by: Vivek Yadav <vivekyadav1207731111@gmail.com>
---
drivers/usb/serial/mct_u232.c | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c
index 2bce8cc03aca..41b80a075b87 100644
--- a/drivers/usb/serial/mct_u232.c
+++ b/drivers/usb/serial/mct_u232.c
@@ -153,16 +153,17 @@ static int mct_u232_calculate_baud_rate(struct usb_serial *serial,
divider = 115200/value;
real baud = 115200/divider */
switch (value) {
- case 300: break;
- case 600: break;
- case 1200: break;
- case 2400: break;
- case 4800: break;
- case 9600: break;
- case 19200: break;
- case 38400: break;
- case 57600: break;
- case 115200: break;
+ case 300:
+ case 600:
+ case 1200:
+ case 2400:
+ case 4800:
+ case 9600:
+ case 19200:
+ case 38400:
+ case 57600:
+ case 115200:
+ break;
default:
value = 9600;
*result = 9600;
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] usb: serial: fix: trainling statements `break` should be on next line
2025-10-04 8:01 [PATCH] usb: serial: fix: trainling statements `break` should be on next line vivekyadav1207731111
@ 2025-10-06 12:13 ` Johan Hovold
2025-10-06 17:55 ` vivek yadav
2025-10-07 1:16 ` David Hunter
1 sibling, 1 reply; 4+ messages in thread
From: Johan Hovold @ 2025-10-06 12:13 UTC (permalink / raw)
To: vivekyadav1207731111
Cc: gregkh, linux-usb, linux-kernel, skhan, linux-kernel-mentees,
david.hunter.linux
On Sat, Oct 04, 2025 at 01:31:23PM +0530, vivekyadav1207731111@gmail.com wrote:
> From: Vivek Yadav <vivekyadav1207731111@gmail.com>
>
> Run `checkpatch.pl` script on path `drivers/usb/serial/*`
Same here, don't do that.
Johan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] usb: serial: fix: trainling statements `break` should be on next line
2025-10-06 12:13 ` Johan Hovold
@ 2025-10-06 17:55 ` vivek yadav
0 siblings, 0 replies; 4+ messages in thread
From: vivek yadav @ 2025-10-06 17:55 UTC (permalink / raw)
To: Johan Hovold
Cc: gregkh, linux-usb, linux-kernel, skhan, linux-kernel-mentees,
david.hunter.linux
Hi Johan,
Thanks for giving time for the review of my patch.
I understand your point and will avoid such kind of practice.
~~Vivek
On Mon, Oct 6, 2025 at 5:43 PM Johan Hovold <johan@kernel.org> wrote:
>
> On Sat, Oct 04, 2025 at 01:31:23PM +0530, vivekyadav1207731111@gmail.com wrote:
> > From: Vivek Yadav <vivekyadav1207731111@gmail.com>
> >
> > Run `checkpatch.pl` script on path `drivers/usb/serial/*`
>
> Same here, don't do that.
>
> Johan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] usb: serial: fix: trainling statements `break` should be on next line
2025-10-04 8:01 [PATCH] usb: serial: fix: trainling statements `break` should be on next line vivekyadav1207731111
2025-10-06 12:13 ` Johan Hovold
@ 2025-10-07 1:16 ` David Hunter
1 sibling, 0 replies; 4+ messages in thread
From: David Hunter @ 2025-10-07 1:16 UTC (permalink / raw)
To: vivekyadav1207731111, johan, gregkh
Cc: linux-usb, linux-kernel, skhan, linux-kernel-mentees
On 10/4/25 04:01, vivekyadav1207731111@gmail.com wrote:
> + case 300:
> + case 600:
> + case 1200:
> + case 2400:
> + case 4800:
> + case 9600:
> + case 19200:
> + case 38400:
> + case 57600:
> + case 115200:
> + break;
It is generally considered best practice to use the breaks after each
case. Here is a good article on this:
https://lwn.net/Articles/794944/
Also, same here. no top-posting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-10-07 1:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-04 8:01 [PATCH] usb: serial: fix: trainling statements `break` should be on next line vivekyadav1207731111
2025-10-06 12:13 ` Johan Hovold
2025-10-06 17:55 ` vivek yadav
2025-10-07 1:16 ` David Hunter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox