@@ -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
17681765static 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)
18851882void 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 ) {
0 commit comments