All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: comedi: replace printk() calls with dev_dbg() in pcmmio.c
@ 2013-12-28  9:13 Chase Southwood
  2014-01-02 12:16 ` Dan Carpenter
  0 siblings, 1 reply; 3+ messages in thread
From: Chase Southwood @ 2013-12-28  9:13 UTC (permalink / raw)
  To: gregkh, linux-kernel; +Cc: abbotti, hsweeten, devel, Chase Southwood

From: Chase Southwood <chase.southwood@yahoo.com>

This is a patch for pcmmio.c that changes several printk() calls to dev_dbg() or dev_err() to fix checkpatch.pl warnings.  Patched from 3.13-rc5.

Signed-off-by: Chase Southwood <chase.southwood@yahoo.com>
---
 drivers/staging/comedi/drivers/pcmmio.c | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/comedi/drivers/pcmmio.c b/drivers/staging/comedi/drivers/pcmmio.c
index 14cee3a..8a567c9 100644
--- a/drivers/staging/comedi/drivers/pcmmio.c
+++ b/drivers/staging/comedi/drivers/pcmmio.c
@@ -252,7 +252,8 @@ static int pcmmio_dio_insn_bits(struct comedi_device *dev,
 
 #ifdef DAMMIT_ITS_BROKEN
 	/* DEBUG */
-	printk(KERN_DEBUG "write mask: %08x  data: %08x\n", data[0], data[1]);
+	dev_dbg(dev->class_dev, "write mask: %08x  data: %08x\n",
+			data[0], data[1]);
 #endif
 
 	s->state = 0;
@@ -273,10 +274,11 @@ static int pcmmio_dio_insn_bits(struct comedi_device *dev,
 
 #ifdef DAMMIT_ITS_BROKEN
 		/* DEBUG */
-		printk
-		    (KERN_DEBUG "byte %d wmb %02x db %02x offset %02d io %04x,"
-		     " data_in %02x ", byte_no, (unsigned)write_mask_byte,
-		     (unsigned)data_byte, offset, ioaddr, (unsigned)byte);
+		dev_dbg(dev->class_dev,
+				"byte %d wmb %02x db %02x offset %02d io %04x data_in %02x ",
+				byte_no, (unsigned)write_mask_byte,
+				(unsigned)data_byte, offset, ioaddr,
+				(unsigned)byte);
 #endif
 
 		if (write_mask_byte) {
@@ -293,7 +295,7 @@ static int pcmmio_dio_insn_bits(struct comedi_device *dev,
 		}
 #ifdef DAMMIT_ITS_BROKEN
 		/* DEBUG */
-		printk(KERN_DEBUG "data_out_byte %02x\n", (unsigned)byte);
+		dev_dbg(dev->class_dev, "data_out_byte %02x\n", (unsigned)byte);
 #endif
 		/* save the digital input lines for this byte.. */
 		s->state |= ((unsigned int)byte) << offset;
@@ -304,7 +306,8 @@ static int pcmmio_dio_insn_bits(struct comedi_device *dev,
 
 #ifdef DAMMIT_ITS_BROKEN
 	/* DEBUG */
-	printk(KERN_DEBUG "s->state %08x data_out %08x\n", s->state, data[1]);
+	dev_dbg(dev->class_dev, "s->state %08x data_out %08x\n",
+			s->state, data[1]);
 #endif
 
 	return insn->n;
@@ -505,8 +508,8 @@ static irqreturn_t interrupt_pcmmio(int irq, void *d)
 				 * TODO here: dispatch io lines to subdevs
 				 * with commands..
 				 */
-				printk
-				    (KERN_DEBUG "got edge detect interrupt %d asic %d which_chans: %06x\n",
+				dev_dbg(dev->class_dev,
+					 "got edge detect interrupt %d asic %d which_chans: %06x\n",
 				     irq, asic, triggered);
 				for (i = 2; i < dev->n_subdevices; i++) {
 					s = &dev->subdevices[i];
@@ -1021,7 +1024,7 @@ static int pcmmio_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 	    kcalloc(n_subdevs, sizeof(struct pcmmio_subdev_private),
 		    GFP_KERNEL);
 	if (!devpriv->sprivs) {
-		printk(KERN_ERR "comedi%d: cannot allocate subdevice private data structures\n",
+		dev_err(dev->class_dev, "comedi%d: cannot allocate subdevice private data structures\n",
 				dev->minor);
 		return -ENOMEM;
 	}
-- 
1.8.4.2


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

* Re: [PATCH] Staging: comedi: replace printk() calls with dev_dbg() in pcmmio.c
  2013-12-28  9:13 Chase Southwood
@ 2014-01-02 12:16 ` Dan Carpenter
  0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2014-01-02 12:16 UTC (permalink / raw)
  To: Chase Southwood; +Cc: gregkh, linux-kernel, devel, abbotti

On Sat, Dec 28, 2013 at 03:13:52AM -0600, Chase Southwood wrote:
> From: Chase Southwood <chase.southwood@yahoo.com>

We get this from your email.  It's not needed unless you are forwarding
a patch from someone else.

> 
> This is a patch for pcmmio.c that changes several printk() calls to dev_dbg() or dev_err() to fix checkpatch.pl warnings.  Patched from 3.13-rc5.

Line wrap the description at 72 characters.

Don't put "Patched from 3.13-rc5." in the patch description because we
don't want it to be a part of the permanent change description.  Also
you should be doing these against linux-next anyway.

> 
> Signed-off-by: Chase Southwood <chase.southwood@yahoo.com>
> ---
>  drivers/staging/comedi/drivers/pcmmio.c | 23 +++++++++++++----------
>  1 file changed, 13 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/staging/comedi/drivers/pcmmio.c b/drivers/staging/comedi/drivers/pcmmio.c
> index 14cee3a..8a567c9 100644
> --- a/drivers/staging/comedi/drivers/pcmmio.c
> +++ b/drivers/staging/comedi/drivers/pcmmio.c
> @@ -252,7 +252,8 @@ static int pcmmio_dio_insn_bits(struct comedi_device *dev,
>  
>  #ifdef DAMMIT_ITS_BROKEN
>  	/* DEBUG */
> -	printk(KERN_DEBUG "write mask: %08x  data: %08x\n", data[0], data[1]);
> +	dev_dbg(dev->class_dev, "write mask: %08x  data: %08x\n",
> +			data[0], data[1]);

Just delete everything to do with DAMMIT_ITS_BROKEN.

regards,
dan carpenter


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

* Re: [PATCH] Staging: comedi: replace printk() calls with dev_dbg() in pcmmio.c
       [not found] <1388189241-4367-1-git-send-email-csouth3@illinois.edu>
@ 2014-01-09 18:46 ` Greg KH
  0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2014-01-09 18:46 UTC (permalink / raw)
  To: Chase Southwood; +Cc: linux-kernel, abbotti, hsweeten, devel

On Fri, Dec 27, 2013 at 06:07:21PM -0600, Chase Southwood wrote:
> From: Chase Southwood <csouth3@illinois.edu>
> 
> Changed several printk() calls to dev_dbg() or dev_err() in pcmmio.c to fix checkpatch.pl warnings.  Patched from 3.13-rc5.

Please line-wrap your changelog entries.

Also, this is already fixed up in my tree, please always work against
linux-next, what is in Linus's tree is pretty old for staging stuff.

Care to redo this against linux-next and resend it?

thanks,

greg k-h

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

end of thread, other threads:[~2014-01-09 18:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1388189241-4367-1-git-send-email-csouth3@illinois.edu>
2014-01-09 18:46 ` [PATCH] Staging: comedi: replace printk() calls with dev_dbg() in pcmmio.c Greg KH
2013-12-28  9:13 Chase Southwood
2014-01-02 12:16 ` Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.