[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201221160302.3752887-1-trix@redhat.com>
Date: Mon, 21 Dec 2020 08:03:02 -0800
From: trix@...hat.com
To: rafael.j.wysocki@...el.com
Cc: linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
Tom Rix <trix@...hat.com>
Subject: [PATCH] PNP: add printf attribute to log function
From: Tom Rix <trix@...hat.com>
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 <trix@...hat.com>
---
drivers/pnp/interface.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pnp/interface.c b/drivers/pnp/interface.c
index 187e4a1175b0..602c46893e83 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;
--
2.27.0
Powered by blists - more mailing lists