mirror-linux/drivers/hwmon/occ
Arnd Bergmann 831a2b2791 hwmon: (occ) Mark occ_init_attribute() as __printf
This is a printf-style function, which gcc -Werror=suggest-attribute=format
correctly points out:

drivers/hwmon/occ/common.c: In function 'occ_init_attribute':
drivers/hwmon/occ/common.c:761:9: error: function 'occ_init_attribute' might be a candidate for 'gnu_printf' format attribute [-Werror=suggest-attribute=format]

Add the attribute to avoid this warning and ensure any incorrect
format strings are detected here.

Fixes: 744c2fe950 ("hwmon: (occ) Rework attribute registration for stack usage")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20260203163440.2674340-1-arnd@kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-02-04 14:40:36 -08:00
..
Kconfig
Makefile
common.c hwmon: (occ) Mark occ_init_attribute() as __printf 2026-02-04 14:40:36 -08:00
common.h
p8_i2c.c
p9_sbe.c hwmon: (occ/p9_sbe) Constify 'struct bin_attribute' 2024-12-15 22:02:26 -08:00
sysfs.c