public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Staging: comedi: fix printk issue in cb_pcidda.c
       [not found] <[PATCH 1/2]Staging: comedi: fix printk issue in cb_pcidda.c>
@ 2011-08-31 11:53 ` Ravishankar K Mallikarjunayya
  2011-09-09 20:25   ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Ravishankar K Mallikarjunayya @ 2011-08-31 11:53 UTC (permalink / raw)
  To: gregkh, wfp5p; +Cc: devel, linux-kernel, Ravishankar K Mallikarjunayya

This is a patch to the cb_pcidda.c file that fixes up a printk warning found by the checkpatch.pl tool

Signed-off-by: Ravishankar K Mallikarjunayya <ravishankar.km@greenturtles.in>
---
 drivers/staging/comedi/drivers/cb_pcidda.c |   23 ++++++++++++-----------
 1 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/comedi/drivers/cb_pcidda.c b/drivers/staging/comedi/drivers/cb_pcidda.c
index 49102b3..661e945 100644
--- a/drivers/staging/comedi/drivers/cb_pcidda.c
+++ b/drivers/staging/comedi/drivers/cb_pcidda.c
@@ -282,7 +282,7 @@ static int cb_pcidda_attach(struct comedi_device *dev,
 	struct pci_dev *pcidev = NULL;
 	int index;
 
-	printk("comedi%d: cb_pcidda: ", dev->minor);
+	pr_info("comedi%d: cb_pcidda: ", dev->minor);
 
 /*
  * Allocate the private structure area.
@@ -293,7 +293,7 @@ static int cb_pcidda_attach(struct comedi_device *dev,
 /*
  * Probe the device to determine what device in the series it is.
  */
-	printk("\n");
+	pr_cont("\n");
 
 	for_each_pci_dev(pcidev) {
 		if (pcidev->vendor == PCI_VENDOR_ID_CB) {
@@ -312,22 +312,23 @@ static int cb_pcidda_attach(struct comedi_device *dev,
 		}
 	}
 	if (!pcidev) {
-		printk
-		    ("Not a ComputerBoards/MeasurementComputing card on requested position\n");
+		pr_warn("comedi%d: cb_pcidda: Not a ComputerBoards/MeasurementComputing "
+				"card on requested position\n", dev->minor);
 		return -EIO;
 	}
 found:
 	devpriv->pci_dev = pcidev;
 	dev->board_ptr = cb_pcidda_boards + index;
 	/*  "thisboard" macro can be used from here. */
-	printk("Found %s at requested position\n", thisboard->name);
+	pr_info("comedi%d: cb_pcidda: Found %s at requested position\n",
+			dev->minor, thisboard->name);
 
 	/*
 	 * Enable PCI device and request regions.
 	 */
 	if (comedi_pci_enable(pcidev, thisboard->name)) {
-		printk
-		    ("cb_pcidda: failed to enable PCI device and request regions\n");
+		pr_warn("comedi%d: cb_pcidda: failed to enable "
+				"PCI device and request regions\n", dev->minor);
 		return -EIO;
 	}
 
@@ -377,12 +378,12 @@ found:
 	s = dev->subdevices + 2;
 	subdev_8255_init(dev, s, NULL, devpriv->digitalio + PORT2A);
 
-	printk(" eeprom:");
+	pr_debug("comedi%d: cb_pcidda: eeprom: ", dev->minor);
 	for (index = 0; index < EEPROM_SIZE; index++) {
 		devpriv->eeprom_data[index] = cb_pcidda_read_eeprom(dev, index);
-		printk(" %i:0x%x ", index, devpriv->eeprom_data[index]);
+		pr_cont(" %i:0x%x ", index, devpriv->eeprom_data[index]);
 	}
-	printk("\n");
+	pr_cont("\n");
 
 	/*  set calibrations dacs */
 	for (index = 0; index < thisboard->ao_chans; index++)
@@ -417,7 +418,7 @@ static int cb_pcidda_detach(struct comedi_device *dev)
 		subdev_8255_cleanup(dev, dev->subdevices + 2);
 	}
 
-	printk("comedi%d: cb_pcidda: remove\n", dev->minor);
+	pr_info("comedi%d: cb_pcidda: remove\n", dev->minor);
 
 	return 0;
 }
-- 
1.6.5.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/2] Staging: comedi: fix printk issue in cb_pcidda.c
  2011-08-31 11:53 ` [PATCH 1/2] Staging: comedi: fix printk issue in cb_pcidda.c Ravishankar K Mallikarjunayya
@ 2011-09-09 20:25   ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2011-09-09 20:25 UTC (permalink / raw)
  To: Ravishankar K Mallikarjunayya; +Cc: gregkh, wfp5p, devel, linux-kernel

On Wed, Aug 31, 2011 at 05:23:32PM +0530, Ravishankar K Mallikarjunayya wrote:
> This is a patch to the cb_pcidda.c file that fixes up a printk warning found by the checkpatch.pl tool

Please wrap your changelog comment at 72 columns, like sane people do.

> 
> Signed-off-by: Ravishankar K Mallikarjunayya <ravishankar.km@greenturtles.in>
> ---
>  drivers/staging/comedi/drivers/cb_pcidda.c |   23 ++++++++++++-----------
>  1 files changed, 12 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/staging/comedi/drivers/cb_pcidda.c b/drivers/staging/comedi/drivers/cb_pcidda.c
> index 49102b3..661e945 100644
> --- a/drivers/staging/comedi/drivers/cb_pcidda.c
> +++ b/drivers/staging/comedi/drivers/cb_pcidda.c
> @@ -282,7 +282,7 @@ static int cb_pcidda_attach(struct comedi_device *dev,
>  	struct pci_dev *pcidev = NULL;
>  	int index;
>  
> -	printk("comedi%d: cb_pcidda: ", dev->minor);
> +	pr_info("comedi%d: cb_pcidda: ", dev->minor);

If you have a device pointer, then use dev_info() here.

Same goes for the other changes in this series.  Use the proper dev_*
macros.

And what is up with your patch numbering scheme?  Please send me all of
the patches, not a bunch of [1/1] and the like, in one set, all linked
together properly like git-send-email will do.

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-09-09 20:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <[PATCH 1/2]Staging: comedi: fix printk issue in cb_pcidda.c>
2011-08-31 11:53 ` [PATCH 1/2] Staging: comedi: fix printk issue in cb_pcidda.c Ravishankar K Mallikarjunayya
2011-09-09 20:25   ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox