2019-05-16 13:11:58

by Naveen Kumar Parna

[permalink] [raw]
Subject: [PATCH] USB: serial: mos7840: Prefer 'unsigned int' to bare use of 'unsigned'

From: Naveen Kumar Parna <[email protected]>

This fixes checkpatch.pl warning "WARNING: Prefer 'unsigned int' to
bare use of 'unsigned'".

Signed-off-by: Naveen Kumar Parna <[email protected]>
---
drivers/usb/serial/mos7840.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
index a698d46ba773..a610af4dea3f 100644
--- a/drivers/usb/serial/mos7840.c
+++ b/drivers/usb/serial/mos7840.c
@@ -1682,7 +1682,7 @@ static void mos7840_change_port_settings(struct tty_struct *tty,
struct moschip_port *mos7840_port, struct ktermios *old_termios)
{
int baud;
- unsigned cflag;
+ unsigned int cflag;
__u8 lData;
__u8 lParity;
__u8 lStop;
--
2.17.1


2019-05-17 07:44:23

by Johan Hovold

[permalink] [raw]
Subject: Re: [PATCH] USB: serial: mos7840: Prefer 'unsigned int' to bare use of 'unsigned'

On Thu, May 16, 2019 at 06:37:59PM +0530, [email protected] wrote:
> From: Naveen Kumar Parna <[email protected]>
>
> This fixes checkpatch.pl warning "WARNING: Prefer 'unsigned int' to
> bare use of 'unsigned'".

Please don't run checkpatch.pl on code that already in the kernel
(possibly with the exception of staging). Use it on your own patches
before you submit them if you want, and even then don't blindly follow
what checkpatch says.

Minor coding style issues are better left alone to avoid adding noise
and making code forensic and backports harder.

And in this case, there's not even anything wrong with the current code.

Johan