Skip to content

Commit 60f7691

Browse files
kragnizWolfram Sang
authored andcommitted
i2c: sis630: correct format strings
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: ClangBuiltLinux#378 Signed-off-by: Louis Taylor <louis@kragniz.eu> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
1 parent bc1a7f7 commit 60f7691

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/i2c/busses/i2c-sis630.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ static int sis630_setup(struct pci_dev *sis630_dev)
478478
if (!request_region(smbus_base + SMB_STS, SIS630_SMB_IOREGION,
479479
sis630_driver.name)) {
480480
dev_err(&sis630_dev->dev,
481-
"I/O Region 0x%04hx-0x%04hx for SMBus already in use.\n",
481+
"I/O Region 0x%04x-0x%04x for SMBus already in use.\n",
482482
smbus_base + SMB_STS,
483483
smbus_base + SMB_STS + SIS630_SMB_IOREGION - 1);
484484
retval = -EBUSY;
@@ -528,7 +528,7 @@ static int sis630_probe(struct pci_dev *dev, const struct pci_device_id *id)
528528
sis630_adapter.dev.parent = &dev->dev;
529529

530530
snprintf(sis630_adapter.name, sizeof(sis630_adapter.name),
531-
"SMBus SIS630 adapter at %04hx", smbus_base + SMB_STS);
531+
"SMBus SIS630 adapter at %04x", smbus_base + SMB_STS);
532532

533533
return i2c_add_adapter(&sis630_adapter);
534534
}

0 commit comments

Comments
 (0)