mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marcin Slusarz <marcin.slusarz@gmail.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
	linux-scsi@vger.kernel.org
Subject: [PATCH 12/14] scsi: use printk_once
Date: Sun,  9 Aug 2009 21:54:07 +0200	[thread overview]
Message-ID: <1249847649-11631-13-git-send-email-marcin.slusarz@gmail.com> (raw)
In-Reply-To: <1249847649-11631-1-git-send-email-marcin.slusarz@gmail.com>

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: linux-scsi@vger.kernel.org
---
 drivers/scsi/53c700.c             |    6 +-----
 drivers/scsi/cxgb3i/cxgb3i_init.c |    7 +------
 2 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c
index f5a9add..c5f4fa7 100644
--- a/drivers/scsi/53c700.c
+++ b/drivers/scsi/53c700.c
@@ -291,7 +291,6 @@ NCR_700_detect(struct scsi_host_template *tpnt,
 	__u8 *memory;
 	__u32 *script;
 	struct Scsi_Host *host;
-	static int banner = 0;
 	int j;
 
 	if(tpnt->sdev_attrs == NULL)
@@ -385,10 +384,7 @@ NCR_700_detect(struct scsi_host_template *tpnt,
 	else
 		hostdata->rev = (NCR_700_readb(host, CTEST7_REG)>>4) & 0x0f;
 	hostdata->fast = (NCR_700_readb(host, CTEST9_REG) == 0);
-	if (banner == 0) {
-		printk(KERN_NOTICE "53c700: Version " NCR_700_VERSION " By James.Bottomley@HansenPartnership.com\n");
-		banner = 1;
-	}
+	printk_once(KERN_NOTICE "53c700: Version " NCR_700_VERSION " By James.Bottomley@HansenPartnership.com\n");
 	printk(KERN_NOTICE "scsi%d: %s rev %d %s\n", host->host_no,
 	       hostdata->chip710 ? "53c710" :
 	       (hostdata->fast ? "53c700-66" : "53c700"),
diff --git a/drivers/scsi/cxgb3i/cxgb3i_init.c b/drivers/scsi/cxgb3i/cxgb3i_init.c
index 042d9bc..8c9285f 100644
--- a/drivers/scsi/cxgb3i/cxgb3i_init.c
+++ b/drivers/scsi/cxgb3i/cxgb3i_init.c
@@ -43,12 +43,7 @@ static struct cxgb3_client t3c_client = {
  */
 static void open_s3_dev(struct t3cdev *t3dev)
 {
-	static int vers_printed;
-
-	if (!vers_printed) {
-		printk(KERN_INFO "%s", version);
-		vers_printed = 1;
-	}
+	printk_once(KERN_INFO "%s", version);
 
 	cxgb3i_ddp_init(t3dev);
 	cxgb3i_sdev_add(t3dev, &t3c_client);
-- 
1.6.3.3


  parent reply	other threads:[~2009-08-09 19:55 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-09 19:53 [PATCH 00/14] " Marcin Slusarz
2009-08-09 19:53 ` [PATCH 01/14] alpha: " Marcin Slusarz
2009-08-09 19:53 ` [PATCH 02/14] ia64: " Marcin Slusarz
2009-08-09 19:53 ` [PATCH 03/14] powerpc: " Marcin Slusarz
2009-08-10  8:00   ` Wolfram Sang
2009-08-10 11:46     ` Michael Ellerman
2009-08-10 11:56       ` Gary Thomas
2009-08-09 19:53 ` [PATCH 04/14] sh: " Marcin Slusarz
2009-08-13  3:04   ` Paul Mundt
2009-08-09 19:54 ` [PATCH 05/14] x86: " Marcin Slusarz
2009-08-09 20:30   ` [tip:x86/cleanups] x86: Use printk_once() tip-bot for Marcin Slusarz
2009-08-09 19:54 ` [PATCH 06/14] ata: use printk_once Marcin Slusarz
2009-08-09 19:54 ` [PATCH 07/14] block: " Marcin Slusarz
2009-08-09 19:54 ` [PATCH 08/14] tty/vt: " Marcin Slusarz
2009-08-09 19:54 ` [PATCH 09/14] ide: " Marcin Slusarz
2009-08-10  2:52   ` David Miller
2009-08-09 19:54 ` [PATCH 10/14] infiniband: " Marcin Slusarz
2009-08-10  5:00   ` Roland Dreier
2009-08-10  6:36     ` [ofa-general] " Jack Morgenstein
2009-08-10  7:36       ` Jiri Slaby
2009-08-10 17:42       ` Roland Dreier
2009-08-11  7:17         ` Jack Morgenstein
2009-08-10 16:07     ` Marcin Slusarz
2009-08-11 16:40       ` Roland Dreier
2009-08-09 19:54 ` [PATCH 11/14] drivers/net: " Marcin Slusarz
2009-08-10  2:52   ` David Miller
2009-08-09 19:54 ` Marcin Slusarz [this message]
2009-08-11 16:40   ` [PATCH 12/14] scsi: " James Bottomley
2009-08-11 16:46     ` Roland Dreier
2009-08-11 16:50       ` James Bottomley
2009-08-11 16:49     ` Joe Perches
2009-08-09 19:54 ` [PATCH 13/14] vsprintf: use WARN_ON_ONCE Marcin Slusarz
2009-08-09 19:54 ` [PATCH 14/14] net: use printk_once Marcin Slusarz
2009-08-10  2:52   ` David Miller
2009-08-09 20:36 ` [PATCH 00/14] " Joe Perches

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=1249847649-11631-13-git-send-email-marcin.slusarz@gmail.com \
    --to=marcin.slusarz@gmail.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.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

all inboxes | Powered by JetHome®