Re: + eisa-tidy-up-driver_register-return-value.patch added to -mm tree

From: Steffen Klassert
Date: Sat Mar 11 2006 - 07:31:43 EST


On Thu, Mar 02, 2006 at 03:49:10PM -0800, akpm@xxxxxxxx wrote:

...

>
> From: Bjorn Helgaas <bjorn.helgaas@xxxxxx>
>
> Remove the assumption that driver_register() returns the number of devices
> bound to the driver. In fact, it returns zero for success or a negative
> error value.
>
> Signed-off-by: Bjorn Helgaas <bjorn.helgaas@xxxxxx>
> Cc: Jeff Garzik <jgarzik@xxxxxxxxx>
> Signed-off-by: Andrew Morton <akpm@xxxxxxxx>

...

> diff -puN drivers/net/3c59x.c~eisa-tidy-up-driver_register-return-value drivers/net/3c59x.c
> --- 25/drivers/net/3c59x.c~eisa-tidy-up-driver_register-return-value Thu Mar 2 15:48:23 2006
> +++ 25-akpm/drivers/net/3c59x.c Thu Mar 2 15:48:23 2006
> @@ -1094,9 +1094,11 @@ static int __init vortex_eisa_init (void
> {
> int eisa_found = 0;
> int orig_cards_found = vortex_cards_found;
> + int err;
>
> #ifdef CONFIG_EISA
> - if (eisa_driver_register (&vortex_eisa_driver) >= 0) {
> + err = eisa_driver_register (&vortex_eisa_driver);
> + if (!err) {
> /* Because of the way EISA bus is probed, we cannot assume
> * any device have been found when we exit from
> * eisa_driver_register (the bus root driver may not be


This results in

drivers/net/3c59x.c: In function `vortex_eisa_init':
drivers/net/3c59x.c:1091: warning: unused variable `err'

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