Commit bfa45445 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

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: default avatarJakub Kicinski <kuba@kernel.org>
parents b3b7e64b 79b1119b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
+2 −1
Original line number Diff line number Diff line
@@ -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;