[PATCH] staging: rtl8192u: Improve readability and fix sparse warnings: cast from restricted __le16

Greg KH gregkh at linuxfoundation.org
Fri Apr 28 10:27:31 UTC 2017


On Sat, Apr 22, 2017 at 11:55:23PM +0100, Tuomo Rinne wrote:
> This patch fixes following sparse warnings:
> 
> drivers/staging/rtl8192u//r8192U_dm.c:2307:49: warning: cast from restricted __le16
> drivers/staging/rtl8192u//r8192U_dm.c:2308:44: warning: cast from restricted __le16
> drivers/staging/rtl8192u//r8192U_dm.c:2309:44: warning: cast from restricted __le16
> 
> In order to avoid the warnings the u4bAcParam variable is constructed
> using the cpu's endianness and in case of big endian architectures the
> variable is converted back to little endian before passed to write_nic_dword
> function.
> 
> Also the patch improves readability by getting rid of unnecessary scope
> and splitting complex variable construction to multiple lines.

Don't do multiple things in the same patch, please break this up into
different patches, each one doing only one thing.

thanks,

greg k-h


More information about the devel mailing list