Re: [PATCH] vxlan: Wrong type passed to %pIS

From: Rasmus Villemoes
Date: Sat Feb 07 2015 - 07:38:21 EST


On Sat, Feb 07 2015, Joe Perches <joe@xxxxxxxxxxx> wrote:

> On Sat, 2015-02-07 at 03:17 +0100, Rasmus Villemoes wrote:
>> src_ip is a pointer to a union vxlan_addr, one member of which is a
>> struct sockaddr. Passing a pointer to src_ip is wrong; one should pass
>> the value of src_ip itself. Since %pIS formally expects something of
>> type struct sockaddr*, let's pass a pointer to the appropriate union
>> member, though this of course doesn't change the generated code.
>
> Hello Rasmus
>
> Are you finding these mismatches by hand or
> are you using some tool?

I've extended smatch to do format checking (mostly for the %p
extensions; gcc already does all the other stuff just fine). I'll try
and see if I can get it on github sometime in the coming week.

Rasmus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/