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

2018-03-01 Thread Lorenzo Bianconi
> Nevermind. round_up instead of DIV_ROUND_UP. > > Bas Vermeulen > > > > On 01-03-18 11:22, Bas Vermeulen wrote: >> >> >> >> On 28-02-18 15:26, Lorenzo Bianconi wrote: >>> >>> Fix the following sparse warning in mt7601u_efuse_physical_size_check: >>> -

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

2018-03-01 Thread Bas Vermeulen
Nevermind. round_up instead of DIV_ROUND_UP. Bas Vermeulen On 01-03-18 11:22, Bas Vermeulen wrote: On 28-02-18 15:26, Lorenzo Bianconi wrote: Fix the following sparse warning in mt7601u_efuse_physical_size_check: - drivers/net/wireless/mediatek/mt7601u/eeprom.c:77:27: warning:    Variable

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

2018-03-01 Thread Bas Vermeulen
On 28-02-18 15:26, Lorenzo Bianconi wrote: Fix the following sparse warning in mt7601u_efuse_physical_size_check: - drivers/net/wireless/mediatek/mt7601u/eeprom.c:77:27: warning: Variable length array is used Signed-off-by: Lorenzo Bianconi ---

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

2018-02-28 Thread Jakub Kicinski
On Wed, 28 Feb 2018 15:26:57 +0100, Lorenzo Bianconi wrote: > Fix the following sparse warning in mt7601u_efuse_physical_size_check: > - drivers/net/wireless/mediatek/mt7601u/eeprom.c:77:27: warning: > Variable length array is used > > Signed-off-by: Lorenzo Bianconi

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

2018-02-28 Thread Johannes Berg
On Wed, 2018-02-28 at 17:01 +0100, Lorenzo Bianconi wrote: > > 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,

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

2018-02-28 Thread Lorenzo Bianconi
> 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 =

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

2018-02-28 Thread Johannes Berg
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 =

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

2018-02-28 Thread Lorenzo Bianconi
Fix the following sparse warning in mt7601u_efuse_physical_size_check: - drivers/net/wireless/mediatek/mt7601u/eeprom.c:77:27: warning: Variable length array is used Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/mediatek/mt7601u/eeprom.c | 2 +- 1 file