linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* another cleanup patch gone wrong
@ 2010-04-16  2:34 Finn Thain
  2010-04-16  3:01 ` David Miller
  2010-04-16  3:11 ` another cleanup patch gone wrong Joe Perches
  0 siblings, 2 replies; 34+ messages in thread
From: Finn Thain @ 2010-04-16  2:34 UTC (permalink / raw)
  To: Joe Perches
  Cc: David S. Miller, Paul Gortmaker, netdev,
	Linux Kernel Mailing List, Linux/m68k


...but this one was already merged, unfortunately.

> Use printk_once
> Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> Convert printks without KERN_<level> to pr_info and pr_cont
> 
> Signed-off-by: Joe Perches <joe@perches.com>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> 
> 
> diff --git a/drivers/net/mac8390.c b/drivers/net/mac8390.c
> index 517cee4..8bd09e2 100644 (file)
> --- a/drivers/net/mac8390.c
> +++ b/drivers/net/mac8390.c
> @@ -17,6 +17,8 @@
>  /* 2002-12-30: Try to support more cards, some clues from NetBSD driver */
>  /* 2003-12-26: Make sure Asante cards always work. */
>  
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> +

Why the macro? You only used it once.

The pr_xxx naming convention belongs to a kernel-wide include file. Is it 
really a good idea to start repurposing it in .c files?

> @@ -545,7 +537,7 @@ static int __init mac8390_initdev(struct net_device * dev, struct nubus_dev * nd
>         case MAC8390_APPLE:
>                 switch (mac8390_testio(dev->mem_start)) {
>                 case ACCESS_UNKNOWN:
> -                       printk("Don't know how to access card memory!\n");
> +                       pr_info("Don't know how to access card memory!\n");

No, this is pr_err. The driver sets dev->mem_start expecting it to work, 
obviously.

>                         return -ENODEV;
>                         break;
>  

> @@ -633,7 +626,7 @@ static int mac8390_open(struct net_device *dev)
>  {
>         __ei_open(dev);
>         if (request_irq(dev->irq, __ei_interrupt, 0, "8390 Ethernet", dev)) {
> -               printk ("%s: unable to get IRQ %d.\n", dev->name, dev->irq);
> +               pr_info("%s: unable to get IRQ %d.\n", dev->name, dev->irq);
>                 return -EAGAIN;

Same here.

>         }
>         return 0;
> @@ -650,7 +643,7 @@ static void mac8390_no_reset(struct net_device *dev)
>  {
>         ei_status.txing = 0;
>         if (ei_debug > 1)
> -               printk("reset not supported\n");
> +               pr_info("reset not supported\n");

I think you meant pr_debug().

>         return;
>  }
>  
> @@ -658,11 +651,11 @@ static void interlan_reset(struct net_device *dev)
>  {
>         unsigned char *target=nubus_slot_addr(IRQ2SLOT(dev->irq));
>         if (ei_debug > 1)
> -               printk("Need to reset the NS8390 t=%lu...", jiffies);
> +               pr_info("Need to reset the NS8390 t=%lu...", jiffies);

Same here.

Finn

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

end of thread, other threads:[~2010-06-02 15:36 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-16  2:34 another cleanup patch gone wrong Finn Thain
2010-04-16  3:01 ` David Miller
2010-04-16  3:45   ` [PATCH] mac8390: fix pr_info() calls, was " Finn Thain
2010-04-16  3:54     ` Joe Perches
2010-04-16  3:59       ` Finn Thain
2010-04-16  4:21     ` [PATCH] mac8390: fix pr_info() calls and change return code Finn Thain
2010-04-16  4:34       ` Joe Perches
2010-04-16 13:57         ` Finn Thain
2010-04-16 20:28           ` David Miller
2010-04-17  2:28             ` Finn Thain
2010-04-16  5:53       ` David Miller
2010-04-16 14:14       ` [PATCH] mac8390: change an error return code and some cleanup Finn Thain
2010-04-17  3:16         ` [PATCH] mac8390: change an error return code and some cleanup, take 3 Finn Thain
2010-04-21 23:30           ` David Miller
2010-04-22  1:13             ` Finn Thain
2010-05-28 17:29             ` [PATCH] mac8390: change an error return code and some cleanup, take 4 Finn Thain
2010-05-31  7:19               ` David Miller
2010-05-31  9:21                 ` fthain
2010-05-31  9:58                   ` Geert Uytterhoeven
2010-05-31 11:07                     ` fthain
2010-05-31 11:30                       ` David Miller
2010-05-31 12:55                         ` Finn Thain
2010-05-31 13:02                           ` David Miller
2010-06-01 12:18                             ` [PATCH 1/2] mac8390: propagate error code from request_irq Finn Thain
2010-06-02 12:17                               ` David Miller
2010-06-01 12:18                             ` [PATCH 2/2] mac8390: raise error logging priority Finn Thain
2010-06-02 14:06                               ` David Miller
2010-06-02 15:36                                 ` Finn Thain
2010-05-31 15:08                     ` [PATCH] mac8390: change an error return code and some cleanup, take 4 Joe Perches
2010-05-31 15:14                       ` David Miller
2010-05-31 15:19                         ` Finn Thain
2010-05-31 11:27                   ` David Miller
2010-04-16  3:11 ` another cleanup patch gone wrong Joe Perches
2010-04-16  3:21   ` Finn Thain

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).