pci:ipmi: Move IPMI PCI device defines to pci_ids.h
PATCH 1/1 pci:ipmi: Move IPMI PCI device defines to pci_ids.h
From: Corey Minyard <[email protected]>
Signed-off-by Corey Minyard <[email protected]>
--- drivers/char/ipmi/ipmi_si_pci.c | 7 ------- include/linux/pci_ids.h | 5 +++++ 2 files changed, 5 insertions(+), 7 deletions(-)
It seems better to have these definitions in pci_ids.h and not in the IPMI driver.
drivers/char/ipmi/ipmi_si_pci.c +0 -7
@@ -18,13 +18,6 @@ module_param_named(trypci, si_trypci, bool, 0);MODULE_PARM_DESC (trypci,"Setting this to zero will disable the" " default scan of the interfaces identified via pci" ); -#define PCI_CLASS_SERIAL_IPMI 0x0c07 -#define PCI_CLASS_SERIAL_IPMI_SMIC 0x0c0700 -#define PCI_CLASS_SERIAL_IPMI_KCS 0x0c0701 -#define PCI_CLASS_SERIAL_IPMI_BT 0x0c0702 - -#define PCI_DEVICE_ID_HP_MMC 0x121A -static void ipmi_pci_cleanup (struct si_sm_io *io) {struct pci_dev *pdev = io->addr_source_data;
include/linux/pci_ids.h +5 -0
@@ -117,6 +117,10 @@#define PCI_CLASS_SERIAL_USB_DEVICE 0x0c03fe#define PCI_CLASS_SERIAL_FIBER 0x0c04#define PCI_CLASS_SERIAL_SMBUS 0x0c05 +#define PCI_CLASS_SERIAL_IPMI 0x0c07 +#define PCI_CLASS_SERIAL_IPMI_SMIC 0x0c0700 +#define PCI_CLASS_SERIAL_IPMI_KCS 0x0c0701 +#define PCI_CLASS_SERIAL_IPMI_BT 0x0c0702#define PCI_BASE_CLASS_WIRELESS 0x0d#define PCI_CLASS_WIRELESS_RF_CONTROLLER 0x0d10
@@ -759,6 +763,7 @@#define PCI_DEVICE_ID_HP_DIVA_MAESTRO 0x104B#define PCI_DEVICE_ID_HP_REO_IOC 0x10f1#define PCI_DEVICE_ID_HP_VISUALIZE_FXE 0x108b +#define PCI_DEVICE_ID_HP_MMC 0x121a#define PCI_DEVICE_ID_HP_DIVA_HALFDOME 0x1223#define PCI_DEVICE_ID_HP_DIVA_KEYSTONE 0x1226#define PCI_DEVICE_ID_HP_DIVA_POWERBAR 0x1227
Signature · 1 line
2.7.4
Quoted 34 lines · On Wed, Apr 18, 2018 at 10:18:00AM -0500, [email protected] wrote:
From: Corey Minyard <[email protected]>
Signed-off-by Corey Minyard <[email protected]>--- drivers/char/ipmi/ipmi_si_pci.c | 7 ------- include/linux/pci_ids.h | 5 +++++ 2 files changed, 5 insertions(+), 7 deletions(-)It seems better to have these definitions in
pci_ids.hand not in the IPMI driver.drivers/char/ipmi/ipmi_si_pci.c +0
-7@@ -18,13 +18,6 @@ module_param_named(trypci, si_trypci, bool, 0);MODULE_PARM_DESC (trypci,"Setting this to zero will disable the" " default scan of the interfaces identified via pci" ); -#define PCI_CLASS_SERIAL_IPMI 0x0c07 -#define PCI_CLASS_SERIAL_IPMI_SMIC 0x0c0700 -#define PCI_CLASS_SERIAL_IPMI_KCS 0x0c0701 -#define PCI_CLASS_SERIAL_IPMI_BT 0x0c0702 - -#define PCI_DEVICE_ID_HP_MMC 0x121A -static void ipmi_pci_cleanup (struct si_sm_io *io) {struct pci_dev *pdev = io->addr_source_data;include/linux/pci_ids.h +0
-0
include/linux/pci_ids.h line 123
Quoted 7 lines
include/linux/pci_ids.h +4
-0@@ -117,6 +117,10 @@#define PCI_CLASS_SERIAL_USB_DEVICE 0x0c03fe#define PCI_CLASS_SERIAL_FIBER 0x0c04#define PCI_CLASS_SERIAL_SMBUS 0x0c05 +#define PCI_CLASS_SERIAL_IPMI 0x0c07 +#define PCI_CLASS_SERIAL_IPMI_SMIC 0x0c0700 +#define PCI_CLASS_SERIAL_IPMI_KCS 0x0c0701 +#define PCI_CLASS_SERIAL_IPMI_BT 0x0c0702
I'm in favor of this part -- it makes sense to define these along with all the other similar things.
include/linux/pci_ids.h line 766
Quoted 7 lines
include/linux/pci_ids.h +1
-0#define PCI_BASE_CLASS_WIRELESS 0x0d#define PCI_CLASS_WIRELESS_RF_CONTROLLER 0x0d10@@ -759,6 +763,7 @@#define PCI_DEVICE_ID_HP_DIVA_MAESTRO 0x104B#define PCI_DEVICE_ID_HP_REO_IOC 0x10f1#define PCI_DEVICE_ID_HP_VISUALIZE_FXE 0x108b +#define PCI_DEVICE_ID_HP_MMC 0x121a
But I don't think I'd include this one because it's only used on one driver, so by the guideline at the top of pci_ids.h, we wouldn't include it there.
Given that, I would change the subject so it mentions "class IDs", not "device IDs".
Quoted 6 lines
include/linux/pci_ids.h +0
-0#define PCI_DEVICE_ID_HP_DIVA_HALFDOME 0x1223#define PCI_DEVICE_ID_HP_DIVA_KEYSTONE 0x1226#define PCI_DEVICE_ID_HP_DIVA_POWERBAR 0x1227Signature · 1 line
2.7.4