Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1473645 > unrolled thread

[PATCH 0/2] Remove last use and references to DEFINE_PCI_DEVICE_TABLE

Started byJoe Perches <joe@perches.com>
First post2016-08-31 18:20 +0200
Last post2016-09-02 20:10 +0200
Articles 7 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/2] Remove last use and references to DEFINE_PCI_DEVICE_TABLE Joe Perches <joe@perches.com> - 2016-08-31 18:20 +0200
    [PATCH 2/2] treewide: Remove references to the now unnecessary DEFINE_PCI_DEVICE_TABLE Joe Perches <joe@perches.com> - 2016-08-31 18:20 +0200
    [PATCH 1/2] wd719x: Remove last declaration using DEFINE_PCI_DEVICE_TABLE Joe Perches <joe@perches.com> - 2016-08-31 18:30 +0200
      Re: [PATCH 1/2] wd719x: Remove last declaration using  DEFINE_PCI_DEVICE_TABLE Bart Van Assche <Bart.VanAssche@sandisk.com> - 2016-09-01 03:10 +0200
      Re: [PATCH 1/2] wd719x: Remove last declaration using DEFINE_PCI_DEVICE_TABLE "Martin K. Petersen" <martin.petersen@oracle.com> - 2016-09-02 12:40 +0200
        Re: [PATCH 1/2] wd719x: Remove last declaration using  DEFINE_PCI_DEVICE_TABLE Andrew Morton <akpm@linux-foundation.org> - 2016-09-02 19:20 +0200
          Re: [PATCH 1/2] wd719x: Remove last declaration using DEFINE_PCI_DEVICE_TABLE "Martin K. Petersen" <martin.petersen@oracle.com> - 2016-09-02 20:10 +0200

#1473645 — [PATCH 0/2] Remove last use and references to DEFINE_PCI_DEVICE_TABLE

FromJoe Perches <joe@perches.com>
Date2016-08-31 18:20 +0200
Subject[PATCH 0/2] Remove last use and references to DEFINE_PCI_DEVICE_TABLE
Message-ID<scgp4-4D4-25@gated-at.bofh.it>
Joe Perches (2):
  wd719x: Remove last declaration using DEFINE_PCI_DEVICE_TABLE
  treewide: Remove references to the now unnecessary DEFINE_PCI_DEVICE_TABLE

 Documentation/PCI/pci.txt | 1 -
 drivers/scsi/wd719x.c     | 2 +-
 include/linux/pci.h       | 9 ---------
 scripts/checkpatch.pl     | 9 ---------
 scripts/tags.sh           | 1 -
 5 files changed, 1 insertion(+), 21 deletions(-)

-- 
2.10.0.rc2.1.gb2aa91d

[toc] | [next] | [standalone]


#1473652 — [PATCH 2/2] treewide: Remove references to the now unnecessary DEFINE_PCI_DEVICE_TABLE

FromJoe Perches <joe@perches.com>
Date2016-08-31 18:20 +0200
Subject[PATCH 2/2] treewide: Remove references to the now unnecessary DEFINE_PCI_DEVICE_TABLE
Message-ID<scgp5-4D4-35@gated-at.bofh.it>
In reply to#1473645
It's been eliminated from the sources, remove it from everywhere else.

Signed-off-by: Joe Perches <joe@perches.com>
---
 Documentation/PCI/pci.txt | 1 -
 include/linux/pci.h       | 9 ---------
 scripts/checkpatch.pl     | 9 ---------
 scripts/tags.sh           | 1 -
 4 files changed, 20 deletions(-)

diff --git a/Documentation/PCI/pci.txt b/Documentation/PCI/pci.txt
index 123881f..77f49dc 100644
--- a/Documentation/PCI/pci.txt
+++ b/Documentation/PCI/pci.txt
@@ -124,7 +124,6 @@ initialization with a pointer to a structure describing the driver
 
 The ID table is an array of struct pci_device_id entries ending with an
 all-zero entry.  Definitions with static const are generally preferred.
-Use of the deprecated macro DEFINE_PCI_DEVICE_TABLE should be avoided.
 
 Each entry consists of:
 
diff --git a/include/linux/pci.h b/include/linux/pci.h
index fbc1fa6..0ab8359 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -683,15 +683,6 @@ struct pci_driver {
 #define	to_pci_driver(drv) container_of(drv, struct pci_driver, driver)
 
 /**
- * DEFINE_PCI_DEVICE_TABLE - macro used to describe a pci device table
- * @_table: device table name
- *
- * This macro is deprecated and should not be used in new code.
- */
-#define DEFINE_PCI_DEVICE_TABLE(_table) \
-	const struct pci_device_id _table[]
-
-/**
  * PCI_DEVICE - macro used to describe a specific pci device
  * @vend: the 16 bit PCI Vendor ID
  * @dev: the 16 bit PCI Device ID
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 8946904..1c82b01 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3610,15 +3610,6 @@ sub process {
 			}
 		}
 
-# check for uses of DEFINE_PCI_DEVICE_TABLE
-		if ($line =~ /\bDEFINE_PCI_DEVICE_TABLE\s*\(\s*(\w+)\s*\)\s*=/) {
-			if (WARN("DEFINE_PCI_DEVICE_TABLE",
-				 "Prefer struct pci_device_id over deprecated DEFINE_PCI_DEVICE_TABLE\n" . $herecurr) &&
-			    $fix) {
-				$fixed[$fixlinenr] =~ s/\b(?:static\s+|)DEFINE_PCI_DEVICE_TABLE\s*\(\s*(\w+)\s*\)\s*=\s*/static const struct pci_device_id $1\[\] = /;
-			}
-		}
-
 # check for new typedefs, only function parameters and sparse annotations
 # make sense.
 		if ($line =~ /\btypedef\s/ &&
diff --git a/scripts/tags.sh b/scripts/tags.sh
index ed7eef2..b3775a9 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -206,7 +206,6 @@ regex_c=(
 	'/\<DEFINE_PER_CPU_SHARED_ALIGNED([^,]*, *\([[:alnum:]_]*\)/\1/v/'
 	'/\<DECLARE_WAIT_QUEUE_HEAD(\([[:alnum:]_]*\)/\1/v/'
 	'/\<DECLARE_\(TASKLET\|WORK\|DELAYED_WORK\)(\([[:alnum:]_]*\)/\2/v/'
-	'/\<DEFINE_PCI_DEVICE_TABLE(\([[:alnum:]_]*\)/\1/v/'
 	'/\(^\s\)OFFSET(\([[:alnum:]_]*\)/\2/v/'
 	'/\(^\s\)DEFINE(\([[:alnum:]_]*\)/\2/v/'
 	'/\<DEFINE_HASHTABLE(\([[:alnum:]_]*\)/\1/v/'
-- 
2.10.0.rc2.1.gb2aa91d

[toc] | [prev] | [next] | [standalone]


#1473662 — [PATCH 1/2] wd719x: Remove last declaration using DEFINE_PCI_DEVICE_TABLE

FromJoe Perches <joe@perches.com>
Date2016-08-31 18:30 +0200
Subject[PATCH 1/2] wd719x: Remove last declaration using DEFINE_PCI_DEVICE_TABLE
Message-ID<scgyK-4Gp-31@gated-at.bofh.it>
In reply to#1473645
Convert it to the preferred const struct pci_device_id instead.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/scsi/wd719x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/wd719x.c b/drivers/scsi/wd719x.c
index e3da1a2..2a9da2e 100644
--- a/drivers/scsi/wd719x.c
+++ b/drivers/scsi/wd719x.c
@@ -962,7 +962,7 @@ static void wd719x_pci_remove(struct pci_dev *pdev)
 	scsi_host_put(sh);
 }
 
-static DEFINE_PCI_DEVICE_TABLE(wd719x_pci_table) = {
+static const struct pci_device_id wd719x_pci_table[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_WD, 0x3296) },
 	{}
 };
-- 
2.10.0.rc2.1.gb2aa91d

[toc] | [prev] | [next] | [standalone]


#1474009 — Re: [PATCH 1/2] wd719x: Remove last declaration using DEFINE_PCI_DEVICE_TABLE

FromBart Van Assche <Bart.VanAssche@sandisk.com>
Date2016-09-01 03:10 +0200
SubjectRe: [PATCH 1/2] wd719x: Remove last declaration using DEFINE_PCI_DEVICE_TABLE
Message-ID<scoFX-1t0-5@gated-at.bofh.it>
In reply to#1473662
On 08/31/16 09:19, Joe Perches wrote:
> Convert it to the preferred const struct pci_device_id instead.

Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>

[toc] | [prev] | [next] | [standalone]


#1475017 — Re: [PATCH 1/2] wd719x: Remove last declaration using DEFINE_PCI_DEVICE_TABLE

From"Martin K. Petersen" <martin.petersen@oracle.com>
Date2016-09-02 12:40 +0200
SubjectRe: [PATCH 1/2] wd719x: Remove last declaration using DEFINE_PCI_DEVICE_TABLE
Message-ID<scU38-6Lt-15@gated-at.bofh.it>
In reply to#1473662
>>>>> "Joe" == Joe Perches <joe@perches.com> writes:

Joe> Convert it to the preferred const struct pci_device_id instead.

Applied to 4.9/scsi-queue.

-- 
Martin K. Petersen	Oracle Linux Engineering

[toc] | [prev] | [next] | [standalone]


#1475356 — Re: [PATCH 1/2] wd719x: Remove last declaration using DEFINE_PCI_DEVICE_TABLE

FromAndrew Morton <akpm@linux-foundation.org>
Date2016-09-02 19:20 +0200
SubjectRe: [PATCH 1/2] wd719x: Remove last declaration using DEFINE_PCI_DEVICE_TABLE
Message-ID<sd0id-2iu-1@gated-at.bofh.it>
In reply to#1475017
On Fri, 02 Sep 2016 06:36:05 -0400 "Martin K. Petersen" <martin.petersen@oracle.com> wrote:

> >>>>> "Joe" == Joe Perches <joe@perches.com> writes:
> 
> Joe> Convert it to the preferred const struct pci_device_id instead.
> 
> Applied to 4.9/scsi-queue.

That creates an ordering dependency between the scsi tree and -mm's
"treewide: remove references to the now unnecessary
DEFINE_PCI_DEVICE_TABLE".

So an ack would be preferred, please.

[toc] | [prev] | [next] | [standalone]


#1475383 — Re: [PATCH 1/2] wd719x: Remove last declaration using DEFINE_PCI_DEVICE_TABLE

From"Martin K. Petersen" <martin.petersen@oracle.com>
Date2016-09-02 20:10 +0200
SubjectRe: [PATCH 1/2] wd719x: Remove last declaration using DEFINE_PCI_DEVICE_TABLE
Message-ID<sd14C-2Oa-23@gated-at.bofh.it>
In reply to#1475356
>>>>> "Andrew" == Andrew Morton <akpm@linux-foundation.org> writes:

Andrew> That creates an ordering dependency between the scsi tree and
Andrew> -mm's "treewide: remove references to the now unnecessary
Andrew> DEFINE_PCI_DEVICE_TABLE".

Andrew> So an ack would be preferred, please.

OK. I was assuming that a subsequent patch would remove the macro.

I'll just drop the patch then.

-- 
Martin K. Petersen	Oracle Linux Engineering

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web