All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Neuling <mikey@neuling.org>
To: Vaishali Thakkar <vthakkar1994@gmail.com>
Cc: Ian Munsie <imunsie@au1.ibm.com>,
	linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cxl: Remove use of macro DEFINE_PCI_DEVICE_TABLE
Date: Mon, 20 Jul 2015 12:42:25 +1000	[thread overview]
Message-ID: <1437360145.6255.37.camel@neuling.org> (raw)
In-Reply-To: <20150719172352.GA14386@vaishali-Ideapad-Z570>

On Sun, 2015-07-19 at 22:53 +0530, Vaishali Thakkar wrote:
> Macro DEFINE_PCI_DEVICE_TABLE is deprecated. So, here use
> struct pci_device_id instead of DEFINE_PCI_DEVICE_TABLE with
> the goal of getting rid of this macro completely.
>=20
> The Coccinelle semantic patch that performs this transformation
> is as follows:
>=20
> @@
> identifier a;
> declarer name DEFINE_PCI_DEVICE_TABLE;
> initializer i;
> @@
> - DEFINE_PCI_DEVICE_TABLE(a)
> + const struct pci_device_id a[]
> =3D i;
>=20
> Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>

Looks good, thanks!

Acked-by: Michael Neuling <mikey@neuling.org>


> ---
>  drivers/misc/cxl/pci.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>=20
> diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.c
> index 32ad097..3ed0621 100644
> --- a/drivers/misc/cxl/pci.c
> +++ b/drivers/misc/cxl/pci.c
> @@ -133,7 +133,7 @@ u8 cxl_afu_cr_read8(struct cxl_afu *afu, int cr, u64 =
off)
>  	return (val >> ((off & 0x3) * 8)) & 0xff;
>  }
> =20
> -static DEFINE_PCI_DEVICE_TABLE(cxl_pci_tbl) =3D {
> +static const struct pci_device_id cxl_pci_tbl[] =3D {
>  	{ PCI_DEVICE(PCI_VENDOR_ID_IBM, 0x0477), },
>  	{ PCI_DEVICE(PCI_VENDOR_ID_IBM, 0x044b), },
>  	{ PCI_DEVICE(PCI_VENDOR_ID_IBM, 0x04cf), },

WARNING: multiple messages have this Message-ID (diff)
From: Michael Neuling <mikey@neuling.org>
To: Vaishali Thakkar <vthakkar1994@gmail.com>
Cc: Ian Munsie <imunsie@au1.ibm.com>,
	linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cxl: Remove use of macro DEFINE_PCI_DEVICE_TABLE
Date: Mon, 20 Jul 2015 12:42:25 +1000	[thread overview]
Message-ID: <1437360145.6255.37.camel@neuling.org> (raw)
In-Reply-To: <20150719172352.GA14386@vaishali-Ideapad-Z570>

On Sun, 2015-07-19 at 22:53 +0530, Vaishali Thakkar wrote:
> Macro DEFINE_PCI_DEVICE_TABLE is deprecated. So, here use
> struct pci_device_id instead of DEFINE_PCI_DEVICE_TABLE with
> the goal of getting rid of this macro completely.
> 
> The Coccinelle semantic patch that performs this transformation
> is as follows:
> 
> @@
> identifier a;
> declarer name DEFINE_PCI_DEVICE_TABLE;
> initializer i;
> @@
> - DEFINE_PCI_DEVICE_TABLE(a)
> + const struct pci_device_id a[]
> = i;
> 
> Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>

Looks good, thanks!

Acked-by: Michael Neuling <mikey@neuling.org>


> ---
>  drivers/misc/cxl/pci.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.c
> index 32ad097..3ed0621 100644
> --- a/drivers/misc/cxl/pci.c
> +++ b/drivers/misc/cxl/pci.c
> @@ -133,7 +133,7 @@ u8 cxl_afu_cr_read8(struct cxl_afu *afu, int cr, u64 off)
>  	return (val >> ((off & 0x3) * 8)) & 0xff;
>  }
>  
> -static DEFINE_PCI_DEVICE_TABLE(cxl_pci_tbl) = {
> +static const struct pci_device_id cxl_pci_tbl[] = {
>  	{ PCI_DEVICE(PCI_VENDOR_ID_IBM, 0x0477), },
>  	{ PCI_DEVICE(PCI_VENDOR_ID_IBM, 0x044b), },
>  	{ PCI_DEVICE(PCI_VENDOR_ID_IBM, 0x04cf), },


  reply	other threads:[~2015-07-20  2:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-19 17:23 [PATCH] cxl: Remove use of macro DEFINE_PCI_DEVICE_TABLE Vaishali Thakkar
2015-07-20  2:42 ` Michael Neuling [this message]
2015-07-20  2:42   ` Michael Neuling
2015-07-20  2:46 ` Ian Munsie
2015-08-27 21:58 ` Michael Ellerman

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=1437360145.6255.37.camel@neuling.org \
    --to=mikey@neuling.org \
    --cc=imunsie@au1.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=vthakkar1994@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.