From: Tom Rix Date: Mon, 21 Dec 2020 16:03:02 +0000 (-0800) Subject: PNP: add printf attribute to log function X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=b1f4213cfa2a21d07fc34519cb8c6c999f8784b1;p=linux.git PNP: add printf attribute to log function Attributing the function allows the compiler to more thoroughly check the use of the function with -Wformat and similar flags. Signed-off-by: Tom Rix Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/pnp/interface.c b/drivers/pnp/interface.c index 187e4a1175b0d..602c46893e831 100644 --- a/drivers/pnp/interface.c +++ b/drivers/pnp/interface.c @@ -33,6 +33,7 @@ struct pnp_info_buffer { typedef struct pnp_info_buffer pnp_info_buffer_t; +__printf(2, 3) static int pnp_printf(pnp_info_buffer_t * buffer, char *fmt, ...) { va_list args;