Re: [Pcihpd-discuss] [PATCH 5/6]: hotplug/ia64: SN Hotplug Driver - SN Hotplug Driver code

From: Prarit Bhargava <prarit_at_sgi.com>
Date: 2005-05-18 01:41:01
Eike,

Thanks for the comments -- I'm going through them now.

Rolf Eike Beer wrote:

> 
>>+	sprintf(bss_hotplug_slot->name, "module_%c%c%c%c%.2d_b_%d_s_%d",
>>+		'0'+RACK_GET_CLASS(MODULE_GET_RACK(pcibus_info->pbi_moduleid)),
>>+		'0'+RACK_GET_GROUP(MODULE_GET_RACK(pcibus_info->pbi_moduleid)),
>>+		'0'+RACK_GET_NUM(MODULE_GET_RACK(pcibus_info->pbi_moduleid)),
>>+		MODULE_GET_BTCHAR(pcibus_info->pbi_moduleid),
>>+		MODULE_GET_BPOS(pcibus_info->pbi_moduleid),
>>+		((int)pcibus_info->pbi_buscommon.bs_persist_busnum) & 0xf,
>>+		device + 1);
> 
> 
> *eek* Sorry, but that looks really ugly. Wouldn't it be enough do name it like 
> the device that would be in slot, something like DOMAIN_BUS_SLOT and maybe 
> one extra number?
> 
> 

Unfortunately, yes, the longer name is prefered in this case.  The rack class
ID, etc., are need to identify locations on the Altix platform.

>>+	if (action == PCI_REQ_SLOT_ELIGIBLE && rc == PCI_SLOT_ALREADY_DOWN) {
> 
>I would feel better if you add extra braces around the tests, but I'm probably 
>just a bit paranoid about this things. Greg?

I was asked to remove the braces in an earlier version.  I too would prefer
to have them but am going with current comments on the code.

P.

-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Tue May 17 11:44:45 2005

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:39 EST