summaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2020-10-28 01:38:49 +0100
committerJakub Kicinski <kuba@kernel.org>2020-10-30 11:31:46 -0700
commit79b1119b851d11f78b0e33b072f0bd6f347421b5 (patch)
tree68144270189cbe50c9d2fe84bcbbbab6e40b3b29 /net/tipc
parentc7bb86885e0a4712d8a8eff9816f43454e4cc5db (diff)
downloadlinux-79b1119b851d11f78b0e33b072f0bd6f347421b5.tar.bz2
net: tipc: Add __printf() markup to fix -Wsuggest-attribute=format
net/tipc/netlink_compat.c: In function ‘tipc_tlv_sprintf’: net/tipc/netlink_compat.c:137:2: warning: function ‘tipc_tlv_sprintf’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] 137 | n = vscnprintf(buf, rem, fmt, args); Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/netlink_compat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/tipc/netlink_compat.c b/net/tipc/netlink_compat.c
index 591a3018c8a2..5c6206c9d6a8 100644
--- a/net/tipc/netlink_compat.c
+++ b/net/tipc/netlink_compat.c
@@ -118,7 +118,8 @@ static void tipc_tlv_init(struct sk_buff *skb, u16 type)
skb_put(skb, sizeof(struct tlv_desc));
}
-static int tipc_tlv_sprintf(struct sk_buff *skb, const char *fmt, ...)
+static __printf(2, 3) int tipc_tlv_sprintf(struct sk_buff *skb,
+ const char *fmt, ...)
{
int n;
u16 len;