From: Florian Fainelli <florian@openwrt.org>
To: Michael Opdenacker <michael@free-electrons.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] Minor code cleanup in drivers/net/r6040.c
Date: Thu, 25 Jun 2009 10:18:40 +0200 [thread overview]
Message-ID: <200906251018.40995.florian@openwrt.org> (raw)
In-Reply-To: <1245913509-23245-1-git-send-email-michael@free-electrons.com>
Le Thursday 25 June 2009 09:05:09 Michael Opdenacker, vous avez écrit :
> Replaced '0' by 'bar' in the probe function.
> The 'bar' variable was already set to '0' and is already
> used in pci_iomap(). This is cleaner and improves code
> consistency.
>
> Signed-off-by: Michael Opdenacker <michael@free-electrons.com>
Acked-by: Florian Fainelli <florian@openwrt.org>
> ---
> drivers/net/r6040.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c
> index ed63d23..b3197e9 100644
> --- a/drivers/net/r6040.c
> +++ b/drivers/net/r6040.c
> @@ -1112,13 +1112,13 @@ static int __devinit r6040_init_one(struct pci_dev
> *pdev, }
>
> /* IO Size check */
> - if (pci_resource_len(pdev, 0) < io_size) {
> + if (pci_resource_len(pdev, bar) < io_size) {
> printk(KERN_ERR DRV_NAME ": Insufficient PCI resources, aborting\n");
> err = -EIO;
> goto err_out;
> }
>
> - pioaddr = pci_resource_start(pdev, 0); /* IO map base address */
> + pioaddr = pci_resource_start(pdev, bar); /* IO map base address */
> pci_set_master(pdev);
>
> dev = alloc_etherdev(sizeof(struct r6040_private));
--
Best regards, Florian Fainelli
Email : florian@openwrt.org
http://openwrt.org
-------------------------------
next prev parent reply other threads:[~2009-06-25 8:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-25 7:05 [PATCH 1/1] Minor code cleanup in drivers/net/r6040.c Michael Opdenacker
2009-06-25 8:18 ` Florian Fainelli [this message]
2009-07-06 2:48 ` David Miller
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=200906251018.40995.florian@openwrt.org \
--to=florian@openwrt.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=michael@free-electrons.com \
--cc=netdev@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 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).