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
..
common.c hwmon: (occ) Mark occ_init_attribute() as __printf 2026-02-04 14:40:36 -08:00
common.h hwmon: (occ) Prevent power cap command overwriting poll response 2022-06-29 13:59:23 -07:00
Kconfig hwmon: (occ) OCC sensors aren't arch-specific 2022-12-04 16:45:02 -08:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
p8_i2c.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
p9_sbe.c hwmon: (occ/p9_sbe) Constify 'struct bin_attribute' 2024-12-15 22:02:26 -08:00
sysfs.c hwmon: (occ) Delay hwmon registration until user request 2022-05-20 10:57:06 -07:00