Skip to content

Commit d537a3a

Browse files
committed
PCI: pciehp: Reduce PCIe slot_ctrl to 16 bits
4283c70 ("PCI: pciehp: Make pcie_wait_cmd() self-contained") added a cache of the most recent command written to the Slot Control register. This register is only 16 bits wide, but the cache ("slot_ctrl") is 32 bits. Reduce slot_ctrl to a u16 so it matches the register size. No functional change. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
1 parent 1302fcf commit d537a3a

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/pci/hotplug/pciehp.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ struct controller {
9292
struct slot *slot;
9393
wait_queue_head_t queue; /* sleep & wake process */
9494
u32 slot_cap;
95-
u32 slot_ctrl;
95+
u16 slot_ctrl;
9696
struct timer_list poll_timer;
9797
unsigned long cmd_started; /* jiffies */
9898
unsigned int cmd_busy:1;

‎drivers/pci/hotplug/pciehp_hpc.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ static void pcie_wait_cmd(struct controller *ctrl)
171171
* interrupts.
172172
*/
173173
if (!rc)
174-
ctrl_info(ctrl, "Timeout on hotplug command %#010x (issued %u msec ago)\n",
174+
ctrl_info(ctrl, "Timeout on hotplug command %#06x (issued %u msec ago)\n",
175175
ctrl->slot_ctrl,
176176
jiffies_to_msecs(now - ctrl->cmd_started));
177177
}

0 commit comments

Comments
 (0)