From: Greg KH <greg@kroah.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [KJ] [PATCH] pci_module_init() -> pci_register_driver() in
Date: Fri, 30 Jun 2006 16:46:51 +0000 [thread overview]
Message-ID: <20060630164651.GA3492@kroah.com> (raw)
In-Reply-To: <44A454A4.5010802@nachtwindheim.de>
On Fri, Jun 30, 2006 at 06:40:50PM +0200, Henne wrote:
> diff -ruN linux-2.6.17-git15/drivers/net/defxx.c linux/drivers/net/defxx.c
> --- linux-2.6.17-git15/drivers/net/defxx.c 2006-03-20 06:53:29.000000000 +0100
> +++ linux/drivers/net/defxx.c 2006-06-30 00:13:00.000000000 +0200
> @@ -3444,7 +3444,7 @@
> {
> int rc_pci, rc_eisa;
>
> - rc_pci = pci_module_init(&dfx_driver);
> + rc_pci = pci_register_driver(&dfx_driver);
> if (rc_pci >= 0) dfx_have_pci = 1;
>
> rc_eisa = dfx_eisa_init();
This is wrong, they are using the return value in an improper way. It
will never be greater than 0.
> diff -ruN linux-2.6.17-git15/drivers/net/pcnet32.c linux/drivers/net/pcnet32.c
> --- linux-2.6.17-git15/drivers/net/pcnet32.c 2006-06-29 23:22:48.000000000 +0200
> +++ linux/drivers/net/pcnet32.c 2006-06-30 00:02:09.000000000 +0200
> @@ -2725,7 +2725,7 @@
> tx_start = tx_start_pt;
>
> /* find the PCI devices */
> - if (!pci_module_init(&pcnet32_driver))
> + if (!pci_register_driver(&pcnet32_driver))
> pcnet32_have_pci = 1;
>
Same thing here. Just registering a driver does not mean that PCI is
present, or that there is a pci device in the system that is controlled
by this driver.
thanks,
greg k-h
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
prev parent reply other threads:[~2006-06-30 16:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-29 22:31 [KJ] [PATCH] pci_module_init() -> pci_register_driver() in Henne
2006-06-29 22:55 ` Greg KH
2006-06-29 23:14 ` Henne
2006-06-29 23:18 ` Greg KH
2006-06-30 15:39 ` Alexey Dobriyan
2006-06-30 16:40 ` Henne
2006-06-30 16:46 ` Greg KH [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060630164651.GA3492@kroah.com \
--to=greg@kroah.com \
--cc=kernel-janitors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.