pciehp: Remove the field controller->no_cmd_completed
PATCH 1/1 pciehp: Remove the field controller->no_cmd_completed
After following recent cleanups by Bjorn:
http://git.kernel.org/cgit/linux/kernel/git/helgaas/pci.git/log/?h=pci/hotplug
2cc56f3 PCI: pciehp: Remove assumptions about which commands cause 40b9608 PCI: pciehp: Compute timeout from hotplug command start time 3461a06 PCI: pciehp: Wait for hotplug command completion lazily 4283c70 PCI: pciehp: Make pcie_wait_cmd() self-contained
the bitfield no_cmd_complete is not really needed anymore, as there is only a single occurance of its use. Hence remove the unnecessary bit field, and use existing macro NO_CMD_CMPL() instead.
---
(This is rebased on top of Bjorn's pci/hotplug branch mentioned above)
drivers/pci/hotplug/pciehp.h | 1 - drivers/pci/hotplug/pciehp_hpc.c | 11 +---------- 2 files changed, 1 insertion(+), 11 deletions(-)
drivers/pci/hotplug/pciehp.h +0 -1
@@ -96,7 +96,6 @@ struct controller {struct timer_list poll_timer;unsigned long cmd_started;/* jiffies */ unsigned int cmd_busy:1; - unsigned int no_cmd_complete:1; unsigned int link_active_reporting:1; unsigned int notification_enabled:1;unsigned int power_fault_detected;
drivers/pci/hotplug/pciehp_hpc.c +1 -10
@@ -140,7 +140,7 @@ static void pcie_wait_cmd(struct controller *ctrl)* If the controller does not generate notifications for command * completions, we never need to wait between writes. */ -if (ctrl->no_cmd_complete) +if (NO_CMD_CMPL (ctrl))return ;if (!ctrl->cmd_busy)
@@ -772,15 +772,6 @@ struct controller *pcie_init(struct pcie_device *dev)init_waitqueue_head (&ctrl->queue);dbg_ctrl (ctrl); -/* -* Controller doesn't notify of command completion if the "No -* Command Completed Support" bit is set in Slot Capabilities. -* If set, it means the controller can accept hotplug commands -* with no delay between them. -*/ -if (NO_CMD_CMPL (ctrl)) - ctrl->no_cmd_complete =1 ; -/* Check if Data Link Layer Link Active Reporting is implemented */ pcie_capability_read_dword (pdev,PCI_EXP_LNKCAP , &link_cap);if (link_cap &PCI_EXP_LNKCAP_DLLLARC ) {
Signature · 1 line
1.7.9.5
Bjorn Helgaas
maintainerQuoted 9 lines · Rajat Jain
After following recent cleanups by Bjorn:
http://git.kernel.org/cgit/linux/kernel/git/helgaas/pci.git/log/?h=pci/hotplug
2cc56f3 PCI: pciehp: Remove assumptions about which commands cause 40b9608 PCI: pciehp: Compute timeout from hotplug command start time 3461a06 PCI: pciehp: Wait for hotplug command completion lazily 4283c70 PCI: pciehp: Make
pcie_wait_cmd()self-contained
Quoted 7 lines
the bitfield
no_cmd_completeis not really needed anymore, as there is only a single occurance of its use. Hence remove the unnecessary bit field, and use existing macroNO_CMD_CMPL()instead.Signed-off-by Rajat Jain <[email protected]>Signed-off-by Rajat Jain <[email protected]>Signed-off-by Guenter Roeck <[email protected]>
Great, thanks for fixing this! Applied to pci/hotplug for v3.17.
Quoted 51 lines
---
(This is rebased on top of Bjorn's pci/hotplug branch mentioned above)drivers/pci/hotplug/pciehp.h | 1 - drivers/pci/hotplug/pciehp_hpc.c | 11 +---------- 2 files changed, 1 insertion(+), 11 deletions(-)drivers/pci/hotplug/pciehp.h +0
-1@@ -96,7 +96,6 @@ struct controller {struct timer_list poll_timer;unsigned long cmd_started;/* jiffies */ unsigned int cmd_busy:1; - unsigned int no_cmd_complete:1; unsigned int link_active_reporting:1; unsigned int notification_enabled:1;unsigned int power_fault_detected;drivers/pci/hotplug/pciehp_hpc.c +1
-10@@ -140,7 +140,7 @@ static void pcie_wait_cmd(struct controller *ctrl)* If the controller does not generate notifications for command * completions, we never need to wait between writes. */ -if (ctrl->no_cmd_complete) +if (NO_CMD_CMPL (ctrl))return ;if (!ctrl->cmd_busy)@@ -772,15 +772,6 @@ struct controller *pcie_init(struct pcie_device *dev)init_waitqueue_head (&ctrl->queue);dbg_ctrl (ctrl); -/* -* Controller doesn't notify of command completion if the "No -* Command Completed Support" bit is set in Slot Capabilities. -* If set, it means the controller can accept hotplug commands -* with no delay between them. -*/ -if (NO_CMD_CMPL (ctrl)) - ctrl->no_cmd_complete =1 ; -/* Check if Data Link Layer Link Active Reporting is implemented */ pcie_capability_read_dword (pdev,PCI_EXP_LNKCAP , &link_cap);if (link_cap &PCI_EXP_LNKCAP_DLLLARC ) {Signature · 1 line
1.7.9.5