From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: varkabhadram@gmail.com, netdev@vger.kernel.org
Cc: Thomas.Lendacky@amd.com, geert+renesas@linux-m68k.org,
ebiederm@xmission.com, macro@linux-mips.org,
linux-kernel@vger.kernel.org, davem@davemloft.net,
Varka Bhadram <varkab@cdac.in>
Subject: Re: [PATCH net-next v2 5/6] ethernet: amd: fix pci device ids
Date: Mon, 14 Jul 2014 21:36:17 +0400 [thread overview]
Message-ID: <53C41511.5090204@cogentembedded.com> (raw)
In-Reply-To: <1405319147-5212-6-git-send-email-varkabhadram@gmail.com>
Hello.
On 07/14/2014 10:25 AM, varkabhadram@gmail.com wrote:
> From: Varka Bhadram <varkab@cdac.in>
> Normally any device ids will be above the corresponding device driver
> structure. This patch moves the pci device ids and MODULE_DEVICE_TABLE()
> above the pci driver structure.
> Signed-off-by: Varka Bhadram <varkab@cdac.in>
> ---
> drivers/net/ethernet/amd/amd8111e.c | 20 +++++++++++---------
> 1 file changed, 11 insertions(+), 9 deletions(-)
> diff --git a/drivers/net/ethernet/amd/amd8111e.c b/drivers/net/ethernet/amd/amd8111e.c
> index e2fb9e2..3e41568 100644
> --- a/drivers/net/ethernet/amd/amd8111e.c
> +++ b/drivers/net/ethernet/amd/amd8111e.c
[...]
> @@ -109,14 +108,6 @@ MODULE_PARM_DESC(coalesce, "Enable or Disable interrupt coalescing, 1: Enable, 0
> module_param_array(dynamic_ipg, bool, NULL, 0);
> MODULE_PARM_DESC(dynamic_ipg, "Enable or Disable dynamic IPG, 1: Enable, 0: Disable");
>
> -static DEFINE_PCI_DEVICE_TABLE(amd8111e_pci_tbl) = {
> -
> - { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD8111E_7462,
> - PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
> - { 0, }
> -
> -};
> -
> /* This function will read the PHY registers. */
> static int amd8111e_read_phy(struct amd8111e_priv* lp, int phy_id, int reg, u32* val)
> {
> @@ -1953,6 +1944,17 @@ static void amd8111e_remove_one(struct pci_dev *pdev)
> }
> }
>
> +static const struct pci_device_id amd8111e_pci_tbl[] = {
> + {
> + .vendor = PCI_VENDOR_ID_AMD,
> + .device = PCI_DEVICE_ID_AMD8111E_7462,
I don't that's equivalent to what was there before: PCI_ANY_ID is defined
as (~0), not 0.
> + },
> + {
> + .vendor = 0,
You can completely skip the explicit initializers, the entry will be
init'ed with 0s anyway.
> + }
> +};
> +MODULE_DEVICE_TABLE(pci, amd8111e_pci_tbl);
> +
WBR, Sergei
next prev parent reply other threads:[~2014-07-14 17:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-14 6:25 [PATCH net-next v2 0/6] cleanup for AMD811E ethernet driver varkabhadram
2014-07-14 6:25 ` [PATCH net-next v2 1/6] ethernet: amd: move amd111e_remove_one after probe varkabhadram
2014-07-14 6:25 ` [PATCH net-next v2 2/6] ethernet: amd: use devm_ioremap() varkabhadram
2014-07-14 6:25 ` [PATCH net-next v2 3/6] ethernet: amd: dynamic debug fixes varkabhadram
2014-07-14 8:06 ` Joe Perches
2014-07-14 8:21 ` Varka Bhadram
2014-07-14 6:25 ` [PATCH net-next v2 4/6] ethernet: amd: fix comment styles varkabhadram
2014-07-14 6:25 ` [PATCH net-next v2 5/6] ethernet: amd: fix pci device ids varkabhadram
2014-07-14 17:36 ` Sergei Shtylyov [this message]
2014-07-14 6:25 ` [PATCH net-next v2 6/6] ethernet: amd: fix 'foo* bar' varkabhadram
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=53C41511.5090204@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=Thomas.Lendacky@amd.com \
--cc=davem@davemloft.net \
--cc=ebiederm@xmission.com \
--cc=geert+renesas@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=macro@linux-mips.org \
--cc=netdev@vger.kernel.org \
--cc=varkab@cdac.in \
--cc=varkabhadram@gmail.com \
/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.