lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 15 Apr 2010 21:34:14 -0700
From:	Joe Perches <joe@...ches.com>
To:	Finn Thain <fthain@...egraphics.com.au>
Cc:	David Miller <davem@...emloft.net>, p_gortmaker@...oo.com,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-m68k@...r.kernel.org
Subject: Re: [PATCH] mac8390: fix pr_info() calls and change return code

On Fri, 2010-04-16 at 14:21 +1000, Finn Thain wrote:
> Signed-off-by: Finn Thain <fthain@...egraphics.com.au>
> 
> --- a/drivers/net/mac8390.c	2010-04-16 13:31:04.000000000 +1000
> +++ b/drivers/net/mac8390.c	2010-04-16 14:02:29.000000000 +1000
> @@ -554,7 +554,7 @@
>  	case MAC8390_APPLE:
>  		switch (mac8390_testio(dev->mem_start)) {
>  		case ACCESS_UNKNOWN:
> -			pr_info("Don't know how to access card memory!\n");
> +			pr_err("Don't know how to access card memory!\n");
>  			return -ENODEV;
>  			break;
>  
> @@ -643,8 +643,8 @@
>  {
>  	__ei_open(dev);
>  	if (request_irq(dev->irq, __ei_interrupt, 0, "8390 Ethernet", dev)) {
> -		pr_info("%s: unable to get IRQ %d.\n", dev->name, dev->irq);
> -		return -EAGAIN;
> +		pr_err("%s: unable to get IRQ %d.\n", dev->name, dev->irq);
> +		return -EBUSY;

You should document the reason for the
return code change in the changelog.
Why is it better to use -EBUSY?

>  	}
>  	return 0;
>  }
> @@ -660,7 +660,7 @@
>  {
>  	ei_status.txing = 0;
>  	if (ei_debug > 1)
> -		pr_info("reset not supported\n");
> +		printk(KERN_DEBUG "reset not supported\n");

It'd be better to prefix this with the driver name
or use something like netdev_dbg with #define DEBUG
otherwise it's "huh? what device emits this message?"
when reading the logs.

Something like:
	printk(KERN_DEBUG pr_fmt("reset not supported\n"));
or
#define DEBUG
	netdev_dbg(dev, "reset not supported\n");
or
#define DEBUG
	pr_debug("reset not supported\n");

>  	if (ei_debug > 1)
> -		pr_cont("reset complete\n");
> +		printk(KERN_CONT "reset complete\n");

unnecessary conversion.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists