Re: [PATCH 3/3] Staging: rtl8723au: core: rtw_ieee80211: Fixed space and brace coding style issue.

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

 



Joe Perches <joe@xxxxxxxxxxx> writes:
> On Mon, 2016-02-01 at 07:29 -0500, Jes Sorensen wrote:
>> Joe Perches <joe@xxxxxxxxxxx> writes:
> []
>> > so this could be transformed into something like:
>> > 
>> > int rtw_get_bit_value_from_ieee_value23a(u8 val)
>> > {
>> > 	int i;
>> > 	static const u8 dot11_rate_table[] = {
>> > 		2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108
>> > 	};
>> 
>> and per my previous email, the above is worse than than the original.
>> The cleaner way to list it would be:
>> 
>> 	static const char dot11_rate_table[] =
>> 		{ 2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108 };
>
> Either style is OK, but the style I used is slightly
> more common in the kernel overall, about 2:1.

It wastes a line for now reason and having the open bracket on a line by
itself is slightly more obfuscating.

> The type should ideally be u8 and not char.

u8 or char is not a big deal for me here, I'm fine with either.

Jes
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux