1. 11 May, 2004 9 commits
    • Luiz Capitulino's avatar
      [PATCH] PCI Hotplug: fix wrong var used in hotplug/shpchp_ctrl.c. · 86ff0b3f
      Luiz Capitulino authored
      Zhenmin's checker tool <zli4@cs.uiuc.edu> detected this:
      
       9. /drivers/pci/hotplug/shpchp_ctrl.c, Line 1575:
       err("%s: Failed to disable slot, error code(%d)\n", __FUNCTION__, rc);
      
       Maybe change to:
       err("%s: Failed to disable slot, error code(%d)\n", __FUNCTION__,
       retval);
      
       I think it is right because at line 1564, the slot is turned off, and
      in this line (1575) is checked the status to see if we got an error; if
      so, the error number is shown. This number is in 'retval', not in 'rc'
      ('rc' does have the return of configure_new_device()).
      
       The patch bellow fixes that:
      86ff0b3f
    • Rolf Eike Beer's avatar
      [PATCH] SHPC PCI Hotplug: fix cleanup_slots again... · 08c7b59b
      Rolf Eike Beer authored
      Am Donnerstag, 6. Mai 2004 02:48 schrieb Sy, Dely L:
      > On Fri, 30 Apr 2004 12:31:18 +0200, Rolf Eike Beer wrote:
      
      >> -
      >> -static int cleanup_slots (struct controller * ctrl)
      >> +static void cleanup_slots(const struct controller *ctrl)
      >> {
      >> -	struct slot *old_slot, *next_slot;
      >> +	struct slot *old_slot;
      >>
      >> 	old_slot = ctrl->slot;
      >> 	ctrl->slot = NULL;
      >>
      >> 	while (old_slot) {
      >> -		next_slot = old_slot->next;
      >> -		pci_hp_deregister (old_slot->hotplug_slot);
      >> -		kfree(old_slot->hotplug_slot->info);
      >> -		kfree(old_slot->hotplug_slot->name);
      >> -		kfree(old_slot->hotplug_slot);
      >> -		kfree(old_slot);
      >> -		old_slot = next_slot;
      >> +		pci_hp_deregister(old_slot->hotplug_slot);
      >> +		old_slot = old_slot->next;
      >>  	}
      >
      > The variable next_slot and its assignment should be kept, for once
      > pci_hp_deregister() is called and the release callback function, which
      > you added, may come in and clean up old_slot structure before the next
      > ptr is saved.  The code should be:
      >
      > static void cleanup_slots(const struct controller *ctrl)
      > {
      > 	struct slot *old_slot, *next_slot;
      >
      > 	old_slot = ctrl->slot;
      >  	ctrl->slot = NULL;
      >
      >  	while (old_slot) {
      > 		next_slot = old_slot->next;
      > 		pci_hp_deregister (old_slot->hotplug_slot);
      > 		old_slot = next_slot;
      >  	}
      > }
      
      Yes, good point. Greg, this patch makes does it. Please apply on top of the
      other stuff.
      08c7b59b
    • Rolf Eike Beer's avatar
    • Rolf Eike Beer's avatar
      [PATCH] CompactPCI: remove two useless functions · 5b0b68ad
      Rolf Eike Beer authored
      This 2 get_* functions do the same the hotplug core does if this functions
      would not be there. Kill Bil^H^H^Hem!
      
      Eike
      5b0b68ad
    • Rolf Eike Beer's avatar
      [PATCH] CompactPCI: remove slot_paranoia_check and get_slot · d75debd2
      Rolf Eike Beer authored
      slot_paranoia_check is only another kind of checking everything for NULL.
      Removing this leads to function get_slot is reduced to a simple cast, so this
      function can be killed also.
      
      Eike
      d75debd2
    • Rolf Eike Beer's avatar
      [PATCH] CompactPCI: remove useless NULL checks · 9bbb91f0
      Rolf Eike Beer authored
      If the "struct hotplug_slot *" parameter is ever NULL then something bogus is
      going on, we should not hide this bug by catching it. Also the name used in
      debug messages is fixed.
      
      Eike
      9bbb91f0
    • Rolf Eike Beer's avatar
      [PATCH] CompactPCI: use goto for error handling · 6ab00129
      Rolf Eike Beer authored
      Convert cpci_hotplug_core.c::cpci_hp_register_bus to use goto for error
      handling.
      
      Eike
      6ab00129
    • Rolf Eike Beer's avatar
      [PATCH] CompactPCI: remove two useless checks · c1600f7c
      Rolf Eike Beer authored
      This two checks are useless: cpci_hp_register_bus is only called from two
      places, one has constant arguments, the other one passes the module
      parameters which are checked for this condition on module load. And the bus
      argument of cpci_hp_unregister_bus can never be NULL, all functions calling
      this function use fields of the bus struct before so they will oops if it
      would ever be NULL.
      
      Eike
      c1600f7c
    • Rolf Eike Beer's avatar
      [PATCH] CompactPCI: remove set_attention_status · 7c39c065
      Rolf Eike Beer authored
      This one removes useless code and fixes the issue that the return code of
      set_attention_status for cpcihp is always 0 even if cpci_set_attention_status
      returns an error.
      
      Eike
      7c39c065
  2. 05 May, 2004 3 commits
  3. 01 May, 2004 1 commit
  4. 30 Apr, 2004 27 commits