mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bjorn.helgaas@hp.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Mike Miller <mike.miller@hp.com>,
	iss_storagedev@hp.com, linux-kernel@vger.kernel.org
Subject: [PATCH] CCISS: Don't print driver version until we actually find a device
Date: Tue, 25 Jul 2006 16:36:42 -0600	[thread overview]
Message-ID: <200607251636.42765.bjorn.helgaas@hp.com> (raw)

If we don't find any devices, we shouldn't print anything.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>

Index: work-mm2/drivers/block/cciss.c
===================================================================
--- work-mm2.orig/drivers/block/cciss.c	2006-07-20 16:27:34.000000000 -0600
+++ work-mm2/drivers/block/cciss.c	2006-07-25 16:16:27.000000000 -0600
@@ -3109,12 +3109,16 @@
 static int __devinit cciss_init_one(struct pci_dev *pdev,
 				    const struct pci_device_id *ent)
 {
+	static int cciss_version_printed = 0;
 	request_queue_t *q;
 	int i;
 	int j;
 	int rc;
 	int dac;
 
+	if (cciss_version_printed++ == 0)
+		printk(KERN_INFO DRIVER_NAME "\n");
+
 	i = alloc_cciss_hba();
 	if (i < 0)
 		return -1;
@@ -3370,9 +3374,6 @@
  */
 static int __init cciss_init(void)
 {
-	printk(KERN_INFO DRIVER_NAME "\n");
-
-	/* Register for our PCI devices */
 	return pci_register_driver(&cciss_pci_driver);
 }
 

             reply	other threads:[~2006-07-25 22:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-25 22:36 Bjorn Helgaas [this message]
2006-07-25 22:43 ` Jesper Juhl
2006-07-25 22:47   ` Arjan van de Ven
2006-07-25 22:51     ` Bjorn Helgaas
2006-07-25 22:53       ` Jesper Juhl
2006-07-26  4:41     ` Jeff Garzik
2006-07-27 13:01       ` Dmitry Torokhov
2006-07-27 13:28         ` gmu 2k6
2006-07-27 13:56           ` Dmitry Torokhov
2006-07-26 14:22 ` Miller, Mike (OS Dev)
     [not found] <6CDJo-8vC-31@gated-at.bofh.it>
     [not found] ` <6CDSZ-h7-9@gated-at.bofh.it>
2006-07-25 23:14   ` Bodo Eggert

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=200607251636.42765.bjorn.helgaas@hp.com \
    --to=bjorn.helgaas@hp.com \
    --cc=akpm@osdl.org \
    --cc=iss_storagedev@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mike.miller@hp.com \
    /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®