Remove last use and references to DEFINE_PCI_DEVICE_TABLE
Subsystems (4)
Joe Perches
maintainercover Remove last use and references to DEFINE_PCI_DEVICE_TABLE
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(-)
Signature · 1 line
2.10.0.rc2.1.gb2aa91d
Joe Perches
maintainerPATCH 1/2 wd719x: Remove last declaration using DEFINE_PCI_DEVICE_TABLE
Convert it to the preferred const struct pci_device_id instead.
--- drivers/scsi/wd719x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/wd719x.c +1 -1
@@ -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 ) }, {} };
Signature · 1 line
2.10.0.rc2.1.gb2aa91d
Re: [PATCH 1/2] wd719x: Remove last declaration using DEFINE_PCI_DEVICE_TABLE
Quoted 1 line · Joe Perches
Convert it to the preferred const struct
pci_device_idinstead.
Martin K. Petersen
AppliedRe: [PATCH 1/2] wd719x: Remove last declaration using DEFINE_PCI_DEVICE_TABLE
In reply to Joe PerchesQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Joe" == Joe Perches <[email protected]> writes:
Joe> Convert it to the preferred const struct pci_device_id instead.
Applied to 4.9/scsi-queue.
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Re: [PATCH 1/2] wd719x: Remove last declaration using DEFINE_PCI_DEVICE_TABLE
Quoted 5 lines · On Fri, 02 Sep 2016 06:36:05 -0400 "Martin K. Petersen"…
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Joe" == Joe Perches <[email protected]> writes:
Joe> Convert it to the preferred const struct
pci_device_idinstead.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.
Re: [PATCH 1/2] wd719x: Remove last declaration using DEFINE_PCI_DEVICE_TABLE
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Andrew" == Andrew Morton <[email protected]> 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.
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Joe Perches
maintainerPATCH 2/2 treewide: Remove references to the now unnecessary DEFINE_PCI_DEVICE_TABLE
In reply to Joe PerchesIt's been eliminated from the sources, remove it from everywhere else.
--- Documentation/PCI/pci.txt | 1 - include/linux/pci.h | 9 --------- scripts/checkpatch.pl | 9 --------- scripts/tags.sh | 1 - 4 files changed, 20 deletions(-)
Documentation/PCI/pci.txt +0 -1
@@ -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:
include/linux/pci.h +0 -9
@@ -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
scripts/checkpatch.pl +0 -9
@@ -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/ &&
scripts/tags.sh +0 -1
@@ -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/'
Signature · 1 line
2.10.0.rc2.1.gb2aa91d