Skip to content

Commit 623c301

Browse files
andy-shevRussell King (Oracle)
authored andcommitted
ARM: 9445/1: clkdev: Mark some functions with __printf() attribute
Some of the functions are using printf() type of format, and compiler is not happy about them as is: clkdev.c:185:17: error: function ‘vclkdev_alloc’ might be a candidate for gnu_printf’ format attribute [-Werror=suggest-attribute=format] clkdev.c:224:9: error: function ‘vclkdev_create’ might be a candidate for gnu_printf’ format attribute [-Werror=suggest-attribute=format] clkdev.c:314:9: error: function ‘__clk_register_clkdev’ might be a candidate for ‘gnu_printf’ format attribute [-Werror=suggest-attribute=format] Fix the compilation errors by adding __printf() attributes. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
1 parent c3d944a commit 623c301

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

drivers/clk/clkdev.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ struct clk_lookup_alloc {
153153
char con_id[MAX_CON_ID];
154154
};
155155

156-
static struct clk_lookup * __ref
156+
static __printf(3, 0) struct clk_lookup * __ref
157157
vclkdev_alloc(struct clk_hw *hw, const char *con_id, const char *dev_fmt,
158158
va_list ap)
159159
{
@@ -215,7 +215,7 @@ vclkdev_alloc(struct clk_hw *hw, const char *con_id, const char *dev_fmt,
215215
return &cla->cl;
216216
}
217217

218-
static struct clk_lookup *
218+
static __printf(3, 0) struct clk_lookup *
219219
vclkdev_create(struct clk_hw *hw, const char *con_id, const char *dev_fmt,
220220
va_list ap)
221221
{
@@ -303,9 +303,8 @@ void clkdev_drop(struct clk_lookup *cl)
303303
}
304304
EXPORT_SYMBOL(clkdev_drop);
305305

306-
static struct clk_lookup *__clk_register_clkdev(struct clk_hw *hw,
307-
const char *con_id,
308-
const char *dev_id, ...)
306+
static __printf(3, 4) struct clk_lookup *
307+
__clk_register_clkdev(struct clk_hw *hw, const char *con_id, const char *dev_id, ...)
309308
{
310309
struct clk_lookup *cl;
311310
va_list ap;

0 commit comments

Comments
 (0)