[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <446476BDCB53C441A1847D74CB603378DA72D5@avmb3.qlogic.org>
Date: Mon, 24 Jun 2013 18:17:04 +0000
From: Pratik Pujar <pratik.pujar@...gic.com>
To: Joe Perches <joe@...ches.com>,
Jitendra Kalsaria <jitendra.kalsaria@...gic.com>
CC: David Miller <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
Sony Chacko <sony.chacko@...gic.com>,
Shahed Shaikh <shahed.shaikh@...gic.com>,
Dept-NX Linux NIC Driver
<Dept_NX_Linux_NIC_Driver@...gic.com>
Subject: RE: [PATCH v2 net-next 5/8] qlcnic: Cleanup of structure
qlcnic_hardware_context
>-----Original Message-----
>From: Joe Perches [mailto:joe@...ches.com]
>Sent: 22 June 2013 16:24
>To: Jitendra Kalsaria
>Cc: David Miller; netdev; Sony Chacko; Shahed Shaikh; Dept-NX Linux NIC
>Driver; Pratik Pujar
>Subject: Re: [PATCH v2 net-next 5/8] qlcnic: Cleanup of structure
>qlcnic_hardware_context
>
>On Sat, 2013-06-22 at 04:12 -0400, Jitendra Kalsaria wrote:
>> From: Pratik Pujar <pratik.pujar@...gic.com>
>
>This isn't really a cleanup.
>It's allowing more capabilities.
The driver was dealing with extra capabilities but separate variables were used for these. Now instead of using separate variables, clubbed in a single array.
>
>> diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
>> b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
>[]
>> @@ -449,7 +449,7 @@ struct qlcnic_hardware_context {
>> u16 max_pci_func;
>>
>> u32 capabilities;
>> - u32 capabilities2;
>> + u32 extra_capability[3];
>
>Also, it looks like it's used as a bitfield.
>
>I suggest instead using an array of ulongs and something like tg3's use of
>tg3_flag_set|tg3_flag_clear.
>
>
The extra_capability is read-only field. Driver does not perform any set/clear operations on this.
Thanks,
Pratik.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists