[08/10] tty: serial: samsung_tty: use 'unsigned int' not 'unsigned'
diff mbox series

Message ID 20191210143706.3928480-8-gregkh@linuxfoundation.org
State New
Headers show
Series
  • [01/10] tty: serial: samsung: allow driver to be built by anyone
Related show

Commit Message

Greg Kroah-Hartman Dec. 10, 2019, 2:37 p.m. UTC
The function uart_console_write() expects an unsigned int, so use that
variable type, not 'unsigned', which is generally frowned apon in the
kernel now.

Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Hyunki Koo <kkoos00@naver.com>
Cc: HYUN-KI KOO <hyunki00.koo@samsung.com>
Cc: Shinbeom Choi <sbeom.choi@samsung.com>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-serial@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/tty/serial/samsung_tty.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Krzysztof Kozlowski Dec. 10, 2019, 3:10 p.m. UTC | #1
On Tue, Dec 10, 2019 at 03:37:04PM +0100, Greg Kroah-Hartman wrote:
> The function uart_console_write() expects an unsigned int, so use that
> variable type, not 'unsigned', which is generally frowned apon in the
> kernel now.

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof
Marc Gonzalez Dec. 10, 2019, 3:12 p.m. UTC | #2
[ Trim recipients list ]

On 10/12/2019 15:37, Greg Kroah-Hartman wrote:

> The function uart_console_write() expects an unsigned int, so use that
> variable type, not 'unsigned', which is generally frowned apon in the
> kernel now.

"frowned upon"

Wait, what?!

'unsigned' and 'unsigned int' are the same type, if I remember my C
lessons correctly.

Is this a uniformization issue?

Regards.
Greg Kroah-Hartman Dec. 12, 2019, 11:08 a.m. UTC | #3
On Tue, Dec 10, 2019 at 04:12:07PM +0100, Marc Gonzalez wrote:
> [ Trim recipients list ]
> 
> On 10/12/2019 15:37, Greg Kroah-Hartman wrote:
> 
> > The function uart_console_write() expects an unsigned int, so use that
> > variable type, not 'unsigned', which is generally frowned apon in the
> > kernel now.
> 
> "frowned upon"
> 
> Wait, what?!
> 
> 'unsigned' and 'unsigned int' are the same type, if I remember my C
> lessons correctly.
> 
> Is this a uniformization issue?

Yes.  It's a long-time checkpatch warning, it's good to be explicit for
this type of thing.

thanks,

greg k-h
Christoph Hellwig Dec. 12, 2019, 4:09 p.m. UTC | #4
On Thu, Dec 12, 2019 at 12:08:34PM +0100, Greg Kroah-Hartman wrote:
> Yes.  It's a long-time checkpatch warning, it's good to be explicit for
> this type of thing.

There is literally no practical benefit going either way.  It is
just checkpatch forcing one personal opinion on people.
Greg Kroah-Hartman Dec. 12, 2019, 4:12 p.m. UTC | #5
On Thu, Dec 12, 2019 at 08:09:49AM -0800, Christoph Hellwig wrote:
> On Thu, Dec 12, 2019 at 12:08:34PM +0100, Greg Kroah-Hartman wrote:
> > Yes.  It's a long-time checkpatch warning, it's good to be explicit for
> > this type of thing.
> 
> There is literally no practical benefit going either way.  It is
> just checkpatch forcing one personal opinion on people.

Fair enough, but, I was trying to align up the variables to be the same
type that was then used in a function call.  That's the only reason I
made this change.

thanks,

greg k-h
Marc Gonzalez Dec. 19, 2019, 9:25 a.m. UTC | #6
On 12/12/2019 17:12, Greg Kroah-Hartman wrote:

> On Thu, Dec 12, 2019 at 08:09:49AM -0800, Christoph Hellwig wrote:
>
>> On Thu, Dec 12, 2019 at 12:08:34PM +0100, Greg Kroah-Hartman wrote:
>>
>>> Yes.  It's a long-time checkpatch warning, it's good to be explicit for
>>> this type of thing.
>>
>> There is literally no practical benefit going either way.  It is
>> just checkpatch forcing one personal opinion on people.
> 
> Fair enough, but, I was trying to align up the variables to be the same
> type that was then used in a function call.  That's the only reason I
> made this change.

Do you type 'long long unsigned int' for an ULL?

Regards.

Patch
diff mbox series

diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
index 12f6b2872076..3dfb4f37ec69 100644
--- a/drivers/tty/serial/samsung_tty.c
+++ b/drivers/tty/serial/samsung_tty.c
@@ -2613,7 +2613,8 @@  static void samsung_early_putc(struct uart_port *port, int c)
 	writeb(c, port->membase + S3C2410_UTXH);
 }
 
-static void samsung_early_write(struct console *con, const char *s, unsigned n)
+static void samsung_early_write(struct console *con, const char *s,
+				unsigned int n)
 {
 	struct earlycon_device *dev = con->data;