diff options
author | Jakub Kicinski <kuba@kernel.org> | 2020-10-30 11:31:46 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-10-30 11:31:46 -0700 |
commit | bfa45445be797b47f83c62e469d01ca1a4df3ef4 (patch) | |
tree | 68144270189cbe50c9d2fe84bcbbbab6e40b3b29 | |
parent | b3b7e64bcbcb46542650d1980ea22ff25f0332ee (diff) | |
parent | 79b1119b851d11f78b0e33b072f0bd6f347421b5 (diff) | |
download | linux-stable-bfa45445be797b47f83c62e469d01ca1a4df3ef4.tar.gz linux-stable-bfa45445be797b47f83c62e469d01ca1a4df3ef4.tar.bz2 linux-stable-bfa45445be797b47f83c62e469d01ca1a4df3ef4.zip |
Merge branch 'markup-some-printk-like-functions'
Andrew Lunn says:
====================
Markup some printk like functions
W=1 warns of functions which look like printk but don't have
attributes so the compile can check that arguments matches the format
string.
====================
Link: https://lore.kernel.org/r/20201028003849.929490-1-andrew@lunn.ch
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r-- | net/dccp/ccid.c | 2 | ||||
-rw-r--r-- | net/tipc/netlink_compat.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/net/dccp/ccid.c b/net/dccp/ccid.c index 1e9bb121ba72..6beac5d348e2 100644 --- a/net/dccp/ccid.c +++ b/net/dccp/ccid.c @@ -76,7 +76,7 @@ int ccid_getsockopt_builtin_ccids(struct sock *sk, int len, return err; } -static struct kmem_cache *ccid_kmem_cache_create(int obj_size, char *slab_name_fmt, const char *fmt,...) +static __printf(3, 4) struct kmem_cache *ccid_kmem_cache_create(int obj_size, char *slab_name_fmt, const char *fmt,...) { struct kmem_cache *slab; va_list args; 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; |