Skip to content

Commit 73c8246

Browse files
committed
Merge branch 'pci/misc'
- Update the aer-inject URL (Yicong Yang) - Declare pci_filp_private only when HAVE_PCI_MMAP to avoid unused struct definition (Krzysztof Wilczyński) - Remove unused assignments (Bjorn Helgaas) - Add #includes to asm/pci_x86.h to prevent build errors (Randy Dunlap) * pci/misc: x86/PCI: Add #includes to asm/pci_x86.h PCI: ibmphp: Remove unused assignments PCI: cpqphp: Remove unused assignments PCI: fu740: Remove unused assignments PCI: kirin: Remove unused assignments PCI: Remove unused assignments PCI: Declare pci_filp_private only when HAVE_PCI_MMAP PCI/AER: Update aer-inject URL
2 parents f787b68 + b9fae6a commit 73c8246

13 files changed

Lines changed: 18 additions & 40 deletions

File tree

arch/x86/include/asm/pci_x86.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
* (c) 1999 Martin Mares <mj@ucw.cz>
66
*/
77

8+
#include <linux/errno.h>
9+
#include <linux/init.h>
810
#include <linux/ioport.h>
11+
#include <linux/spinlock.h>
912

1013
#undef DEBUG
1114

drivers/pci/controller/dwc/pcie-fu740.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ static int fu740_pcie_host_init(struct pcie_port *pp)
224224
/* Clear hold_phy_rst */
225225
writel_relaxed(0x0, afp->mgmt_base + PCIEX8MGMT_APP_HOLD_PHY_RST);
226226
/* Enable pcieauxclk */
227-
ret = clk_prepare_enable(afp->pcie_aux);
227+
clk_prepare_enable(afp->pcie_aux);
228228
/* Set RC mode */
229229
writel_relaxed(0x4, afp->mgmt_base + PCIEX8MGMT_DEVICE_TYPE);
230230

drivers/pci/controller/dwc/pcie-kirin.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,9 +332,6 @@ static int hi3660_pcie_phy_init(struct platform_device *pdev,
332332
pcie->phy_priv = phy;
333333
phy->dev = dev;
334334

335-
/* registers */
336-
pdev = container_of(dev, struct platform_device, dev);
337-
338335
ret = hi3660_pcie_phy_get_clk(phy);
339336
if (ret)
340337
return ret;

drivers/pci/hotplug/cpqphp_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1254,7 +1254,7 @@ static void __exit unload_cpqphpd(void)
12541254
struct pci_resource *res;
12551255
struct pci_resource *tres;
12561256

1257-
rc = compaq_nvram_store(cpqhp_rom_start);
1257+
compaq_nvram_store(cpqhp_rom_start);
12581258

12591259
ctrl = cpqhp_ctrl_list;
12601260

drivers/pci/hotplug/cpqphp_ctrl.c

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,6 @@ irqreturn_t cpqhp_ctrl_intr(int IRQ, void *data)
881881
u8 reset;
882882
u16 misc;
883883
u32 Diff;
884-
u32 temp_dword;
885884

886885

887886
misc = readw(ctrl->hpc_reg + MISC);
@@ -917,7 +916,7 @@ irqreturn_t cpqhp_ctrl_intr(int IRQ, void *data)
917916
writel(Diff, ctrl->hpc_reg + INT_INPUT_CLEAR);
918917

919918
/* Read it back to clear any posted writes */
920-
temp_dword = readl(ctrl->hpc_reg + INT_INPUT_CLEAR);
919+
readl(ctrl->hpc_reg + INT_INPUT_CLEAR);
921920

922921
if (!Diff)
923922
/* Clear all interrupts */
@@ -1412,7 +1411,6 @@ static u32 board_added(struct pci_func *func, struct controller *ctrl)
14121411
u32 rc = 0;
14131412
struct pci_func *new_slot = NULL;
14141413
struct pci_bus *bus = ctrl->pci_bus;
1415-
struct slot *p_slot;
14161414
struct resource_lists res_lists;
14171415

14181416
hp_slot = func->device - ctrl->slot_device_offset;
@@ -1459,7 +1457,7 @@ static u32 board_added(struct pci_func *func, struct controller *ctrl)
14591457
if (rc)
14601458
return rc;
14611459

1462-
p_slot = cpqhp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset);
1460+
cpqhp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset);
14631461

14641462
/* turn on board and blink green LED */
14651463

@@ -1614,7 +1612,6 @@ static u32 remove_board(struct pci_func *func, u32 replace_flag, struct controll
16141612
u8 device;
16151613
u8 hp_slot;
16161614
u8 temp_byte;
1617-
u32 rc;
16181615
struct resource_lists res_lists;
16191616
struct pci_func *temp_func;
16201617

@@ -1629,7 +1626,7 @@ static u32 remove_board(struct pci_func *func, u32 replace_flag, struct controll
16291626
/* When we get here, it is safe to change base address registers.
16301627
* We will attempt to save the base address register lengths */
16311628
if (replace_flag || !ctrl->add_support)
1632-
rc = cpqhp_save_base_addr_length(ctrl, func);
1629+
cpqhp_save_base_addr_length(ctrl, func);
16331630
else if (!func->bus_head && !func->mem_head &&
16341631
!func->p_mem_head && !func->io_head) {
16351632
/* Here we check to see if we've saved any of the board's
@@ -1647,7 +1644,7 @@ static u32 remove_board(struct pci_func *func, u32 replace_flag, struct controll
16471644
}
16481645

16491646
if (!skip)
1650-
rc = cpqhp_save_used_resources(ctrl, func);
1647+
cpqhp_save_used_resources(ctrl, func);
16511648
}
16521649
/* Change status to shutdown */
16531650
if (func->is_a_board)
@@ -1767,7 +1764,7 @@ void cpqhp_event_stop_thread(void)
17671764

17681765
static void interrupt_event_handler(struct controller *ctrl)
17691766
{
1770-
int loop = 0;
1767+
int loop;
17711768
int change = 1;
17721769
struct pci_func *func;
17731770
u8 hp_slot;
@@ -1885,16 +1882,13 @@ static void interrupt_event_handler(struct controller *ctrl)
18851882
void cpqhp_pushbutton_thread(struct timer_list *t)
18861883
{
18871884
u8 hp_slot;
1888-
u8 device;
18891885
struct pci_func *func;
18901886
struct slot *p_slot = from_timer(p_slot, t, task_event);
18911887
struct controller *ctrl = (struct controller *) p_slot->ctrl;
18921888

18931889
pushbutton_pending = NULL;
18941890
hp_slot = p_slot->hp_slot;
18951891

1896-
device = p_slot->device;
1897-
18981892
if (is_slot_enabled(ctrl, hp_slot)) {
18991893
p_slot->state = POWEROFF_STATE;
19001894
/* power Down board */
@@ -1951,15 +1945,12 @@ int cpqhp_process_SI(struct controller *ctrl, struct pci_func *func)
19511945
u32 tempdword;
19521946
int rc;
19531947
struct slot *p_slot;
1954-
int physical_slot = 0;
19551948

19561949
tempdword = 0;
19571950

19581951
device = func->device;
19591952
hp_slot = device - ctrl->slot_device_offset;
19601953
p_slot = cpqhp_find_slot(ctrl, device);
1961-
if (p_slot)
1962-
physical_slot = p_slot->number;
19631954

19641955
/* Check to see if the interlock is closed */
19651956
tempdword = readl(ctrl->hpc_reg + INT_INPUT_CLEAR);
@@ -2043,13 +2034,10 @@ int cpqhp_process_SS(struct controller *ctrl, struct pci_func *func)
20432034
unsigned int devfn;
20442035
struct slot *p_slot;
20452036
struct pci_bus *pci_bus = ctrl->pci_bus;
2046-
int physical_slot = 0;
20472037

20482038
device = func->device;
20492039
func = cpqhp_slot_find(ctrl->bus, device, index++);
20502040
p_slot = cpqhp_find_slot(ctrl, device);
2051-
if (p_slot)
2052-
physical_slot = p_slot->number;
20532041

20542042
/* Make sure there are no video controllers here */
20552043
while (func && !rc) {

drivers/pci/hotplug/cpqphp_pci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ int cpqhp_save_slot_config(struct controller *ctrl, struct pci_func *new_slot)
473473
int sub_bus;
474474
int max_functions;
475475
int function = 0;
476-
int cloop = 0;
476+
int cloop;
477477
int stop_it;
478478

479479
ID = 0xFFFFFFFF;

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
}

drivers/pci/pci-sysfs.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -754,8 +754,6 @@ static ssize_t pci_read_config(struct file *filp, struct kobject *kobj,
754754
u8 val;
755755
pci_user_read_config_byte(dev, off, &val);
756756
data[off - init_off] = val;
757-
off++;
758-
--size;
759757
}
760758

761759
pci_config_pm_runtime_put(dev);
@@ -818,11 +816,8 @@ static ssize_t pci_write_config(struct file *filp, struct kobject *kobj,
818816
size -= 2;
819817
}
820818

821-
if (size) {
819+
if (size)
822820
pci_user_write_config_byte(dev, off, data[off - init_off]);
823-
off++;
824-
--size;
825-
}
826821

827822
pci_config_pm_runtime_put(dev);
828823

drivers/pci/pcie/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ config PCIEAER_INJECT
4343
error injection can fake almost all kinds of errors with the
4444
help of a user space helper tool aer-inject, which can be
4545
gotten from:
46-
https://www.kernel.org/pub/linux/utils/pci/aer-inject/
46+
https://git.kernel.org/cgit/linux/kernel/git/gong.chen/aer-inject.git/
4747

4848
#
4949
# PCI Express ECRC

0 commit comments

Comments
 (0)