All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PNP: use dev_printk for quirk messages
@ 2008-03-04 23:47 Bjorn Helgaas
  2008-03-12 21:22 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Bjorn Helgaas @ 2008-03-04 23:47 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Adam Belay, linux-acpi

Convert quirk printks to dev_printk().

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

Index: linux-mm/drivers/pnp/quirks.c
===================================================================
--- linux-mm.orig/drivers/pnp/quirks.c	2008-03-04 16:41:17.000000000 -0700
+++ linux-mm/drivers/pnp/quirks.c	2008-03-04 16:44:00.000000000 -0700
@@ -51,7 +51,8 @@
 		port3->min += 0x800;
 		port3->max += 0x800;
 	}
-	printk(KERN_INFO "pnp: AWE32 quirk - adding two ports\n");
+	dev_info(&dev->dev, "AWE32 quirk - added ioports 0x%lx and 0x%lx\n",
+		(unsigned long) port2->min, (unsigned long) port3->min);
 }
 
 static void quirk_cmi8330_resources(struct pnp_dev *dev)
@@ -74,7 +75,8 @@
 			    IORESOURCE_DMA_8BIT)
 				dma->map = 0x000A;
 	}
-	printk(KERN_INFO "pnp: CMI8330 quirk - fixing interrupts and dma\n");
+	dev_info(&dev->dev, "CMI8330 quirk - forced possible IRQs to 5, 7, 10 "
+		"and DMA channels to 1, 3\n");
 }
 
 static void quirk_sb16audio_resources(struct pnp_dev *dev)
@@ -105,8 +107,7 @@
 		changed = 1;
 	}
 	if (changed)
-		printk(KERN_INFO
-		       "pnp: SB audio device quirk - increasing port range\n");
+		dev_info(&dev->dev, "SB audio device quirk - increased port range\n");
 }
 
 static void quirk_supermicro_h8dce_system(struct pnp_dev *dev)

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

* Re: [PATCH] PNP: use dev_printk for quirk messages
  2008-03-04 23:47 [PATCH] PNP: use dev_printk for quirk messages Bjorn Helgaas
@ 2008-03-12 21:22 ` Andrew Morton
  2008-03-12 21:44   ` Bjorn Helgaas
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2008-03-12 21:22 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: ambx1, linux-acpi

On Tue, 4 Mar 2008 16:47:27 -0700
Bjorn Helgaas <bjorn.helgaas@hp.com> wrote:

> Convert quirk printks to dev_printk().
> 
> Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
> 
> Index: linux-mm/drivers/pnp/quirks.c
> ===================================================================
> --- linux-mm.orig/drivers/pnp/quirks.c	2008-03-04 16:41:17.000000000 -0700
> +++ linux-mm/drivers/pnp/quirks.c	2008-03-04 16:44:00.000000000 -0700
> @@ -51,7 +51,8 @@
>  		port3->min += 0x800;
>  		port3->max += 0x800;
>  	}
> -	printk(KERN_INFO "pnp: AWE32 quirk - adding two ports\n");
> +	dev_info(&dev->dev, "AWE32 quirk - added ioports 0x%lx and 0x%lx\n",
> +		(unsigned long) port2->min, (unsigned long) port3->min);
>  }

drivers/pnp/quirks.c: In function 'quirk_awe32_resources':
drivers/pnp/quirks.c:25: warning: 'port3' may be used uninitialized in this function
drivers/pnp/quirks.c:25: warning: 'port2' may be used uninitialized in this function

the warning is correct, methinks.  If dev->dependent happens to be NULL,
we oops.

I'll just move the dev_info() inside the loop, which is more logical and
is actually correct.  The code at present will only print the last-added
ports?

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

* Re: [PATCH] PNP: use dev_printk for quirk messages
  2008-03-12 21:22 ` Andrew Morton
@ 2008-03-12 21:44   ` Bjorn Helgaas
  0 siblings, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2008-03-12 21:44 UTC (permalink / raw)
  To: Andrew Morton; +Cc: ambx1, linux-acpi

On Wednesday 12 March 2008 03:22:31 pm Andrew Morton wrote:
> On Tue, 4 Mar 2008 16:47:27 -0700
> Bjorn Helgaas <bjorn.helgaas@hp.com> wrote:
> 
> > Convert quirk printks to dev_printk().
> > 
> > Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
> > 
> > Index: linux-mm/drivers/pnp/quirks.c
> > ===================================================================
> > --- linux-mm.orig/drivers/pnp/quirks.c	2008-03-04 16:41:17.000000000 -0700
> > +++ linux-mm/drivers/pnp/quirks.c	2008-03-04 16:44:00.000000000 -0700
> > @@ -51,7 +51,8 @@
> >  		port3->min += 0x800;
> >  		port3->max += 0x800;
> >  	}
> > -	printk(KERN_INFO "pnp: AWE32 quirk - adding two ports\n");
> > +	dev_info(&dev->dev, "AWE32 quirk - added ioports 0x%lx and 0x%lx\n",
> > +		(unsigned long) port2->min, (unsigned long) port3->min);
> >  }
> 
> drivers/pnp/quirks.c: In function 'quirk_awe32_resources':
> drivers/pnp/quirks.c:25: warning: 'port3' may be used uninitialized in this function
> drivers/pnp/quirks.c:25: warning: 'port2' may be used uninitialized in this function
> 
> the warning is correct, methinks.  If dev->dependent happens to be NULL,
> we oops.
> 
> I'll just move the dev_info() inside the loop, which is more logical and
> is actually correct.  The code at present will only print the last-added
> ports?

That's fine, thanks.  Sorry I missed that.

Bjorn

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

end of thread, other threads:[~2008-03-12 21:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-04 23:47 [PATCH] PNP: use dev_printk for quirk messages Bjorn Helgaas
2008-03-12 21:22 ` Andrew Morton
2008-03-12 21:44   ` Bjorn Helgaas

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.