diff options
| author | Louis Taylor <louis@kragniz.eu> | 2019-03-02 09:18:36 -0500 |
|---|---|---|
| committer | Wolfram Sang <wsa@the-dreams.de> | 2019-03-12 09:09:16 -0400 |
| commit | 60f7691c624b41a05bfc3493d9b0519e7951b7ef (patch) | |
| tree | 3bda3a4ce764ebf46b267b91df14c4b9916f1dc4 /drivers/i2c | |
| parent | bc1a7f75c85e226e82f183d30d75c357f92b6029 (diff) | |
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: https://github.com/ClangBuiltLinux/linux/issues/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>
Diffstat (limited to 'drivers/i2c')
| -rw-r--r-- | drivers/i2c/busses/i2c-sis630.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-sis630.c b/drivers/i2c/busses/i2c-sis630.c index 1e6805b5cef2..a57aa4fe51a4 100644 --- a/drivers/i2c/busses/i2c-sis630.c +++ b/drivers/i2c/busses/i2c-sis630.c | |||
| @@ -478,7 +478,7 @@ static int sis630_setup(struct pci_dev *sis630_dev) | |||
| 478 | if (!request_region(smbus_base + SMB_STS, SIS630_SMB_IOREGION, | 478 | if (!request_region(smbus_base + SMB_STS, SIS630_SMB_IOREGION, |
| 479 | sis630_driver.name)) { | 479 | sis630_driver.name)) { |
| 480 | dev_err(&sis630_dev->dev, | 480 | 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", |
| 482 | smbus_base + SMB_STS, | 482 | smbus_base + SMB_STS, |
| 483 | smbus_base + SMB_STS + SIS630_SMB_IOREGION - 1); | 483 | smbus_base + SMB_STS + SIS630_SMB_IOREGION - 1); |
| 484 | retval = -EBUSY; | 484 | retval = -EBUSY; |
| @@ -528,7 +528,7 @@ static int sis630_probe(struct pci_dev *dev, const struct pci_device_id *id) | |||
| 528 | sis630_adapter.dev.parent = &dev->dev; | 528 | sis630_adapter.dev.parent = &dev->dev; |
| 529 | 529 | ||
| 530 | snprintf(sis630_adapter.name, sizeof(sis630_adapter.name), | 530 | 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); |
| 532 | 532 | ||
| 533 | return i2c_add_adapter(&sis630_adapter); | 533 | return i2c_add_adapter(&sis630_adapter); |
| 534 | } | 534 | } |
