Skip to content

Commit 6a8fcf7

Browse files
committed
PCI: ibmphp: Remove unused assignments
Remove variables and assignments that are never used. Found by Krzysztof using cppcheck, e.g.: $ cppcheck --enable=all --force unreadVariable drivers/pci/hotplug/ibmphp_res.c:1958 Variable 'bus_sec' is assigned a value that is never used. Reported-by: Krzysztof Wilczyński <kw@linux.com> Link: https://lore.kernel.org/r/20220313192933.434746-6-helgaas@kernel.org Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
1 parent af8b8b6 commit 6a8fcf7

2 files changed

Lines changed: 1 addition & 4 deletions

File tree

drivers/pci/hotplug/ibmphp_hpc.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,11 +325,9 @@ static u8 i2c_ctrl_write(struct controller *ctlr_ptr, void __iomem *WPGBbar, u8
325325
static u8 isa_ctrl_read(struct controller *ctlr_ptr, u8 offset)
326326
{
327327
u16 start_address;
328-
u16 end_address;
329328
u8 data;
330329

331330
start_address = ctlr_ptr->u.isa_ctlr.io_start;
332-
end_address = ctlr_ptr->u.isa_ctlr.io_end;
333331
data = inb(start_address + offset);
334332
return data;
335333
}

drivers/pci/hotplug/ibmphp_res.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1955,7 +1955,7 @@ static int __init update_bridge_ranges(struct bus_node **bus)
19551955
bus_sec = find_bus_wprev(sec_busno, NULL, 0);
19561956
/* this bus structure doesn't exist yet, PPB was configured during previous loading of ibmphp */
19571957
if (!bus_sec) {
1958-
bus_sec = alloc_error_bus(NULL, sec_busno, 1);
1958+
alloc_error_bus(NULL, sec_busno, 1);
19591959
/* the rest will be populated during NVRAM call */
19601960
return 0;
19611961
}
@@ -2114,6 +2114,5 @@ static int __init update_bridge_ranges(struct bus_node **bus)
21142114
} /* end for function */
21152115
} /* end for device */
21162116

2117-
bus = &bus_cur;
21182117
return 0;
21192118
}

0 commit comments

Comments
 (0)