Search Linux Wireless

Re: [PATCH] mt7601u: remove a warning in mt7601u_efuse_physical_size_check()

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

 



> On Wed, 2018-02-28 at 15:26 +0100, Lorenzo Bianconi wrote:
>>
>>       const int map_reads = DIV_ROUND_UP(MT_EFUSE_USAGE_MAP_SIZE, 16);
>> -     u8 data[map_reads * 16];
>> +     u8 data[round_up(MT_EFUSE_USAGE_MAP_SIZE, 16)];
>>
> You could turn it upside down and make
>
> const int map_reads = ARRAY_SIZE(data);

map_reads is actually 2 since MT_EFUSE_USAGE_MAP_SIZE is 29. Using
ARRAY_SIZE(data) map_reads will be set to 32

Regards,
Lorenzo

>
> johannes



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux