diff mbox

i2c-i801: Standardize log messages

Message ID 20140123165938.493ea62c@endymion.delvare
State Accepted
Headers show

Commit Message

Jean Delvare Jan. 23, 2014, 3:59 p.m. UTC
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 <khali@linux-fr.org>
Cc: Shane Huang <shane.huang@amd.com>
---
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(-)

Comments

Wolfram Sang Jan. 24, 2014, 4:51 p.m. UTC | #1
On Thu, Jan 23, 2014 at 04:59:38PM +0100, Jean Delvare wrote:
> 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 <khali@linux-fr.org>
> Cc: Shane Huang <shane.huang@amd.com>

Subject is wrong. This is about piix4, not i801.
Fixed and applied to for-current, thanks!
Jean Delvare Jan. 24, 2014, 5:01 p.m. UTC | #2
On Fri, 24 Jan 2014 17:51:54 +0100, Wolfram Sang wrote:
> On Thu, Jan 23, 2014 at 04:59:38PM +0100, Jean Delvare wrote:
> > 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 <khali@linux-fr.org>
> > Cc: Shane Huang <shane.huang@amd.com>
> 
> 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.
diff mbox

Patch

--- linux-3.13.orig/drivers/i2c/busses/i2c-piix4.c	2014-01-23 13:35:43.684040390 +0100
+++ linux-3.13/drivers/i2c/busses/i2c-piix4.c	2014-01-23 13:54:55.462751999 +0100
@@ -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",