linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Matthias Kraemer <matthiasmartinsson@gmail.com>, ulf.hansson@linaro.org
Cc: linux-mmc <linux-mmc@vger.kernel.org>
Subject: Re: [PATCH] mmc: sdhci-pci: Use macros in pci_ids definition
Date: Thu, 13 Apr 2017 11:52:39 +0300	[thread overview]
Message-ID: <3b1dd7a6-65a8-e7ea-97b8-24e742b6f62d@intel.com> (raw)
In-Reply-To: <1491417893-16095-2-git-send-email-matthiasmartinsson@gmail.com>

On 05/04/17 21:44, Matthias Kraemer wrote:
> This patch applies the PCI_DEVICE_ macros to specify the pci_ids instead
> of open-coding them within the sdhci-pci driver.
> 
> v2:
> Suggested-by Adrian Hunter <adrian.hunter@intel.com>
> Instead of using the generic PCI_ marcos, introduce device specific macros
> to be able to shorten the table entries even further.
> 
> Signed-off-by: Matthias Kraemer <matthiasmartinsson@gmail.com>
> ---
>  drivers/mmc/host/sdhci-pci-core.c | 673 +++++++-------------------------------
>  drivers/mmc/host/sdhci-pci.h      |  14 +
>  2 files changed, 139 insertions(+), 548 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
> index 86560d5..b5292b0 100644
> --- a/drivers/mmc/host/sdhci-pci-core.c
> +++ b/drivers/mmc/host/sdhci-pci-core.c
> @@ -992,554 +992,131 @@ static const struct sdhci_pci_fixes sdhci_amd = {
>  };
>  
>  static const struct pci_device_id pci_ids[] = {
> -	{
> -		.vendor		= PCI_VENDOR_ID_RICOH,
> -		.device		= PCI_DEVICE_ID_RICOH_R5C822,
> -		.subvendor	= PCI_ANY_ID,
> -		.subdevice	= PCI_ANY_ID,
> -		.driver_data	= (kernel_ulong_t)&sdhci_ricoh,
> -	},
> -
> -	{
> -		.vendor         = PCI_VENDOR_ID_RICOH,
> -		.device         = 0x843,
> -		.subvendor      = PCI_ANY_ID,
> -		.subdevice      = PCI_ANY_ID,
> -		.driver_data    = (kernel_ulong_t)&sdhci_ricoh_mmc,
> -	},
> -

<SNIP>

> +	{SDHCI_PCI_DEVICE(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5C822,
> +			  sdhci_ricoh)},
> +	{SDHCI_PCI_DEVICE(PCI_VENDOR_ID_RICOH, 0x843, sdhci_ricoh_mmc)},

There are still duplicate PCI_VENDOR_ID_... and PCI_DEVICE_ID_... and
sdhci_... and {}.  I would just expect to see:

	SDHCI_PCI_DEV(RICOH, RICOH_R5C822, ricoh),
	SDHCI_PCI_DEV(RICOH, 0x843, ricoh_mmc),

Where there are numbers with no define, just define them:

	#define PCI_DEVICE_ID_0x843	0x843


       reply	other threads:[~2017-04-13  8:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1491417893-16095-1-git-send-email-matthiasmartinsson@gmail.com>
     [not found] ` <1491417893-16095-2-git-send-email-matthiasmartinsson@gmail.com>
2017-04-13  8:52   ` Adrian Hunter [this message]
2017-05-15 21:44 [PATCH V6] mmc: sdhci-pci: Use macros in pci_ids definition Matthias Kraemer
2017-05-15 21:44 ` [PATCH] " Matthias Kraemer
2017-05-30  9:09   ` Adrian Hunter
2017-05-30  9:55   ` Ulf Hansson
  -- strict thread matches above, loose matches on Subject: below --
2017-05-07  7:15 Matthias Kraemer
2017-05-07  7:15 ` Matthias Kraemer
2017-05-08  7:23   ` Adrian Hunter
2017-05-04 18:55 Matthias Kraemer
2017-05-04 18:55 ` Matthias Kraemer
2017-05-05  6:09   ` Adrian Hunter
2017-05-04 18:43 Matthias Kraemer
2017-05-04 18:43 ` Matthias Kraemer
2017-04-12 20:37 Matthias Kraemer
2017-04-12 20:37 ` Matthias Kraemer

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=3b1dd7a6-65a8-e7ea-97b8-24e742b6f62d@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=matthiasmartinsson@gmail.com \
    --cc=ulf.hansson@linaro.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).