linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: Linux I2C <linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Cc: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>,
	Shane Huang <shane.huang-5C7GfCeVMHo@public.gmane.org>
Subject: [PATCH] i2c-i801: Standardize log messages
Date: Thu, 23 Jan 2014 16:59:38 +0100	[thread overview]
Message-ID: <20140123165938.493ea62c@endymion.delvare> (raw)

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-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
Cc: Shane Huang <shane.huang-5C7GfCeVMHo@public.gmane.org>
---
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(-)

--- 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",


-- 
Jean Delvare

             reply	other threads:[~2014-01-23 15:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-23 15:59 Jean Delvare [this message]
     [not found] ` <20140123165938.493ea62c-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2014-01-24 16:51   ` [PATCH] i2c-i801: Standardize log messages Wolfram Sang
2014-01-24 17:01     ` Jean Delvare

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140123165938.493ea62c@endymion.delvare \
    --to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=shane.huang-5C7GfCeVMHo@public.gmane.org \
    --cc=wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).