linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [ALPHA] Update for "name" out of struct device.
       [not found] <200308181611.h7IGBEcW024487@hera.kernel.org>
@ 2003-08-18 16:45 ` Jeff Garzik
  2003-08-18 16:51   ` Jeff Garzik
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Garzik @ 2003-08-18 16:45 UTC (permalink / raw)
  To: rth; +Cc: linux-kernel

On Mon, Aug 18, 2003 at 05:24:13AM +0000, Linux Kernel Mailing List wrote:
> --- a/arch/alpha/kernel/sys_marvel.c	Mon Aug 18 09:11:18 2003
> +++ b/arch/alpha/kernel/sys_marvel.c	Mon Aug 18 09:11:18 2003
> @@ -33,6 +33,13 @@
> +/* ??? Should probably be generic.  */
> +#ifdef CONFIG_PCI_NAMES
> +#define pci_pretty_name(x) ((x)->pretty_name)
> +#else
> +#define pci_pretty_name(x) ""
> +#endif
> +

> @@ -378,7 +385,7 @@
>  		       PCI_SLOT(dev->devfn), 
>  		       PCI_FUNC(dev->devfn),
>  		       hose->index,
> -		       dev->dev.name);
> +		       pci_pretty_name (dev));
>  		printk("  %d message(s) from 0x%04x\n", 

hmmm, I think a better fix can be had...  We store all that information.

What do you think about the following patch?  It follows the style of
other PCI core messages, and prints out the same information as before.

This assumes, of course, marvel_map_irq is called after pci_name() is
assigned a value...

	Jeff





===== arch/alpha/kernel/sys_marvel.c 1.7 vs edited =====
--- 1.7/arch/alpha/kernel/sys_marvel.c	Mon Aug 18 01:23:05 2003
+++ edited/arch/alpha/kernel/sys_marvel.c	Mon Aug 18 12:43:51 2003
@@ -33,13 +33,6 @@
 # error NR_IRQS < MARVEL_NR_IRQS !!!
 #endif
 
-/* ??? Should probably be generic.  */
-#ifdef CONFIG_PCI_NAMES
-#define pci_pretty_name(x) ((x)->pretty_name)
-#else
-#define pci_pretty_name(x) ""
-#endif
-
 \f
 /*
  * Interrupt handling.
@@ -380,12 +373,7 @@
 		irq += 0x80;			/* offset for lsi       */
 
 #if 1
-		printk("PCI:%d:%d:%d (hose %d) [%s] is using MSI\n",
-		       dev->bus->number, 
-		       PCI_SLOT(dev->devfn), 
-		       PCI_FUNC(dev->devfn),
-		       hose->index,
-		       pci_pretty_name (dev));
+		printk("PCI:%s is using MSI\n", pci_name (dev));
 		printk("  %d message(s) from 0x%04x\n", 
 		       1 << ((msg_ctl & PCI_MSI_FLAGS_QSIZE) >> 4),
 		       msg_dat);

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

* Re: [ALPHA] Update for "name" out of struct device.
  2003-08-18 16:45 ` [ALPHA] Update for "name" out of struct device Jeff Garzik
@ 2003-08-18 16:51   ` Jeff Garzik
  2003-08-18 20:32     ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Garzik @ 2003-08-18 16:51 UTC (permalink / raw)
  To: rth; +Cc: linux-kernel

On Mon, Aug 18, 2003 at 12:45:12PM -0400, Jeff Garzik wrote:
> What do you think about the following patch?  It follows the style of
> other PCI core messages, and prints out the same information as before.

...except for the pretty name, of course.

But IMO we need to stop drivers and core from printing out pretty-name
at all, which is another reason for my patch.  Having name information
like this in the kernel, overall, is a waste, IMO.  _Especially_ when
that information is conditional.  We should be consistent with what we
print out, to reduce user confusion.

	Jeff




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

* Re: [ALPHA] Update for "name" out of struct device.
  2003-08-18 16:51   ` Jeff Garzik
@ 2003-08-18 20:32     ` Greg KH
  0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2003-08-18 20:32 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: rth, linux-kernel

On Mon, Aug 18, 2003 at 12:51:09PM -0400, Jeff Garzik wrote:
> On Mon, Aug 18, 2003 at 12:45:12PM -0400, Jeff Garzik wrote:
> > What do you think about the following patch?  It follows the style of
> > other PCI core messages, and prints out the same information as before.
> 
> ...except for the pretty name, of course.
> 
> But IMO we need to stop drivers and core from printing out pretty-name
> at all, which is another reason for my patch.  Having name information
> like this in the kernel, overall, is a waste, IMO.  _Especially_ when
> that information is conditional.  We should be consistent with what we
> print out, to reduce user confusion.

Hence "pci_name()"  :)

greg k-h

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

end of thread, other threads:[~2003-08-18 20:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <200308181611.h7IGBEcW024487@hera.kernel.org>
2003-08-18 16:45 ` [ALPHA] Update for "name" out of struct device Jeff Garzik
2003-08-18 16:51   ` Jeff Garzik
2003-08-18 20:32     ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).