i2c-i801: Standardize log messages
PATCH 1/1 i2c-i801: Standardize log messages
Use exactly the same log messages in the legacy setup function and the SB800+ setup function. This way strings can be reused, which saves some bytes in the generated binary.
---
Inspired by Shane's recent patch, on top of which it applies.
drivers/i2c/busses/i2c-piix4.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/i2c/busses/i2c-piix4.c +6 -6
@@ -208,16 +208,16 @@ static int piix4_setup(struct pci_dev *P "WARNING: SMBus interface has been FORCEFULLY ENABLED!\n"); }else {dev_err (&PIIX4_dev->dev, -"Host SMBus controller not enabled!\n" ); +"SMBus Host Controller not enabled!\n" );release_region (piix4_smba,SMBIOSIZE );return -ENODEV ; } }if (((temp &0x0E ) ==8 ) || ((temp &0x0E ) ==2 )) -dev_dbg (&PIIX4_dev->dev,"Using Interrupt 9 for SMBus.\n" ); +dev_dbg (&PIIX4_dev->dev,"Using IRQ for SMBus\n" );else if ((temp &0x0E ) ==0 ) -dev_dbg (&PIIX4_dev->dev,"Using Interrupt SMI# for SMBus.\n" ); +dev_dbg (&PIIX4_dev->dev,"Using SMI# for SMBus\n" );else dev_err (&PIIX4_dev->dev,"Illegal Interrupt configuration " "(or code out of date)!\n" );
@@ -279,7 +279,7 @@ static int piix4_setup_sb800(struct pci_if (!smb_en_status) {dev_err (&PIIX4_dev->dev, -"Host SMBus controller not enabled!\n" ); +"SMBus Host Controller not enabled!\n" );return -ENODEV ; }
@@ -311,9 +311,9 @@ static int piix4_setup_sb800(struct pci_release_region (piix4_smba + i2ccfg_offset,1 );if (i2ccfg &1 ) -dev_dbg (&PIIX4_dev->dev,"Using IRQ for SMBus.\n" ); +dev_dbg (&PIIX4_dev->dev,"Using IRQ for SMBus\n" );else -dev_dbg (&PIIX4_dev->dev,"Using SMI# for SMBus.\n" ); +dev_dbg (&PIIX4_dev->dev,"Using SMI# for SMBus\n" ); dev_info(&PIIX4_dev->dev, "SMBus Host Controller at 0x%x, revision %d\n",
Signature · 1 line
Jean Delvare
Quoted 6 lines · Jean Delvare
Use exactly the same log messages in the legacy setup function and the SB800+ setup function. This way strings can be reused, which saves some bytes in the generated binary.
Signed-off-by Jean Delvare <[email protected]>Cc Shane Huang <[email protected]>
Subject is wrong. This is about piix4, not i801.
Fixed and applied to for-current, thanks!
Quoted 10 lines · Wolfram Sang
Quoted 6 lines · Jean Delvare
Use exactly the same log messages in the legacy setup function and the SB800+ setup function. This way strings can be reused, which saves some bytes in the generated binary.
Signed-off-by Jean Delvare <[email protected]>Cc Shane Huang <[email protected]>Subject is wrong. This is about piix4, not i801.
Fixed and applied to for-current, thanks!
D'oh! Working too much on the same driver over the years I guess. Anyway, thanks for catching my mistake.
Signature · 1 line
Jean Delvare