Search Linux Wireless

RE: [PATCH] mwifiex: remove linked list implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Johannes,

> -----Original Message-----
> From: linux-wireless-owner@xxxxxxxxxxxxxxx [mailto:linux-wireless-owner@xxxxxxxxxxxxxxx] On Behalf Of
> Johannes Berg
> Sent: Sunday, January 09, 2011 1:47 AM
> To: Bing Zhao
> Cc: linux-wireless@xxxxxxxxxxxxxxx; John W. Linville; Amitkumar Karwar; Kiran Divekar; Frank Huang
> Subject: Re: [PATCH] mwifiex: remove linked list implementation
> 
> On Fri, 2011-01-07 at 17:10 -0800, Bing Zhao wrote:
> 
> > +	tx_ba_tsr_tbl = (struct mwifiex_tx_ba_stream_tbl *)
> > +					priv->tx_ba_stream_tbl_ptr.next;
> 
> Don't do that. Always use list_first_entry() etc, because otherwise the
> struct list_head must be the first member in the struct, which is very
> non-ideomatic and everybody who is used to the kernel will get it wrong
> when modifying your driver.
> 
> Treat struct list_head as completely opaque -- never look into it. There
> are macros for any kind of manipulation with it.
> 
> Also, all your loops are open coded -- use list_for_each_entry() instead
> of doing that (even the code I quoted above is from an open coded loop)

Thanks for your comments. We will make changes and resend the patch.

Regards,

Bing

> 
> johannes
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
ÿô.nlj·Ÿ®‰­†+%ŠË±é¥Šwÿº{.nlj·¥Š{±ÿ«zW¬³ø¡Ü}©ž²ÆzÚj:+v‰¨þø®w¥þŠàÞ¨è&¢)ß«a¶Úÿûz¹ÞúŽŠÝjÿŠwèf



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux