lkml.org 
[lkml]   [2019]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] i2c: sis630: correct format strings
On Sat, Mar 02, 2019 at 02:18:36PM +0000, Louis Taylor wrote:
> When compiling with -Wformat, clang warns:
>
> drivers/i2c/busses/i2c-sis630.c:482:4: warning: format specifies type
> 'unsigned short' but the argument has type 'int' [-Wformat]
> smbus_base + SMB_STS,
> ^~~~~~~~~~~~~~~~~~~~
>
> drivers/i2c/busses/i2c-sis630.c:483:4: warning: format specifies type
> 'unsigned short' but the argument has type 'int' [-Wformat]
> smbus_base + SMB_STS + SIS630_SMB_IOREGION - 1);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> drivers/i2c/busses/i2c-sis630.c:531:37: warning: format specifies type
> 'unsigned short' but the argument has type 'int' [-Wformat]
> "SMBus SIS630 adapter at %04hx", smbus_base + SMB_STS);
> ~~~~~ ^~~~~~~~~~~~~~~~~~~~
>
> This patch fixes the format strings to use the format type for int.
>
> Link: https://github.com/ClangBuiltLinux/linux/issues/378
> Signed-off-by: Louis Taylor <louis@kragniz.eu>

Changed Jean's SoB to Rev-by and applied to for-current, thanks!

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2019-03-09 10:55    [W:0.047 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site