lkml.org 
[lkml]   [2015]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 04/27] IB/Verbs: Reform IB-core cm


On 04/16/2015 02:43 PM, Hal Rosenstock wrote:
[snip]
>> +
>> + count++;
>> }
>> +
>> + if (!count) {
>> + device_unregister(cm_dev->device);
>> + kfree(cm_dev);
>> + return;
>
> Nit: alternatively, this could be goto at end of this routine where
> there is same 2 calls. I think Jason made this comment on earlier set of
> these patches.

Thanks for the notify, I guess I missed it, my bad :-P

Will be "goto free" in next version.

Regards,
Michael Wang

>
> -- Hal
>
>> + }
>> +
>> ib_set_client_data(ib_device, &cm_client, cm_dev);
>>
>> write_lock_irqsave(&cm.device_lock, flags);
>> @@ -3825,6 +3835,9 @@ error1:
>> port_modify.set_port_cap_mask = 0;
>> port_modify.clr_port_cap_mask = IB_PORT_CM_SUP;
>> while (--i) {
>> + if (!rdma_ib_or_iboe(ib_device, i))
>> + continue;
>> +
>> port = cm_dev->port[i-1];
>> ib_modify_port(ib_device, port->port_num, 0, &port_modify);
>> ib_unregister_mad_agent(port->mad_agent);
>> @@ -3853,6 +3866,9 @@ static void cm_remove_one(struct ib_device *ib_device)
>> write_unlock_irqrestore(&cm.device_lock, flags);
>>
>> for (i = 1; i <= ib_device->phys_port_cnt; i++) {
>> + if (!rdma_ib_or_iboe(ib_device, i))
>> + continue;
>> +
>> port = cm_dev->port[i-1];
>> ib_modify_port(ib_device, port->port_num, 0, &port_modify);
>> ib_unregister_mad_agent(port->mad_agent);
>


\
 
 \ /
  Last update: 2015-04-16 15:21    [W:0.079 / U:4.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site