linux-next: build warning after merge of the kspp-gustavo tree
Hi all,
After merging the kspp-gustavo tree, today's linux-next build (x86_64 allmodconfig) produced this warning:
In function 'aspeed_create_fan_tach_channel',
inlined from 'aspeed_create_fan' at drivers/hwmon/aspeed-pwm-tacho.c:877:2,
inlined from 'aspeed_pwm_tacho_probe' at drivers/hwmon/aspeed-pwm-tacho.c:936:9:drivers/hwmon/aspeed-pwm-tacho.c:751:49: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
751 | priv->fan_tach_ch_source[index] = pwm_source;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
drivers/hwmon/aspeed-pwm-tacho.c: In function 'aspeed_pwm_tacho_probe':
drivers/hwmon/aspeed-pwm-tacho.c:193:12: note: at offset [48, 255] into destination object 'fan_tach_ch_source' of size 16
193 | u8 fan_tach_ch_source[16];
| ^~~~~~~~~~~~~~~~~~Exposed by commit
1b56c90018f0 ("Makefile: Enable -Wstringop-overflow globally")
This is with your tree on top of Linus' tree (and some fix patches but nothing that obviously touches anything relevent) and CONFIG_WERROR not set.
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 16 lines · Stephen Rothwell
Hi all,
After merging the kspp-gustavo tree, today's linux-next build (
x86_64allmodconfig) produced this warning:In function '
aspeed_create_fan_tach_channel',
inlined from 'aspeed_create_fan' atdrivers/hwmon/aspeed-pwm-tacho.c:877:2,
inlined from 'aspeed_pwm_tacho_probe' atdrivers/hwmon/aspeed-pwm-tacho.c:936:9:drivers/hwmon/aspeed-pwm-tacho.c:751:49: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]751 | priv->fan_tach_ch_source[index] = pwm_source; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ drivers/hwmon/aspeed-pwm-tacho.c: In function 'aspeed_pwm_tacho_probe': drivers/hwmon/aspeed-pwm-tacho.c:193:12: note: at offset [48, 255] into destination object 'fan_tach_ch_source' of size 16 193 | u8 fan_tach_ch_source[16]; | ^~~~~~~~~~~~~~~~~~
Quoted 8 lines
Exposed by commit
1b56c90018f0 ("Makefile: Enable -Wstringop-overflow globally")This is with your tree on top of Linus' tree (and some fix patches but nothing that obviously touches anything relevent) and
CONFIG_WERRORnot set.
Hi Stephen,
The fix for this issue is also in linux-next already:
Thanks!
--
Gustavo