From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755408AbbBGMiQ (ORCPT ); Sat, 7 Feb 2015 07:38:16 -0500 Received: from mail-lb0-f175.google.com ([209.85.217.175]:53498 "EHLO mail-lb0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752939AbbBGMiO (ORCPT ); Sat, 7 Feb 2015 07:38:14 -0500 From: Rasmus Villemoes To: Joe Perches Cc: "David S. Miller" , Pravin B Shelar , Nicolas Dichtel , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Dan Carpenter Subject: Re: [PATCH] vxlan: Wrong type passed to %pIS Organization: D03 References: <1423275451-3663-1-git-send-email-linux@rasmusvillemoes.dk> <1423280138.2933.3.camel@perches.com> X-Hashcash: 1:20:150207:netdev@vger.kernel.org::gzGlnT9MT3YmCkNt:0000000000000000000000000000000000000000N0Y X-Hashcash: 1:20:150207:davem@davemloft.net::kvDBRfiMQpjToCQ0:0000000000000000000000000000000000000000002DgY X-Hashcash: 1:20:150207:nicolas.dichtel@6wind.com::ydP/5QpnkrvruTR7:0000000000000000000000000000000000005BNf X-Hashcash: 1:20:150207:pshelar@nicira.com::pTwYJO9wF9R7pMqz:00000000000000000000000000000000000000000005QPg X-Hashcash: 1:20:150207:joe@perches.com::SkcghzAOlKlRyvle:005LWZ X-Hashcash: 1:20:150207:linux-kernel@vger.kernel.org::koO6tcpzzEsa4uxy:00000000000000000000000000000000088SY Date: Sat, 07 Feb 2015 13:38:10 +0100 In-Reply-To: <1423280138.2933.3.camel@perches.com> (Joe Perches's message of "Fri, 06 Feb 2015 19:35:38 -0800") Message-ID: <87siehnbgt.fsf@rasmusvillemoes.dk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 07 2015, Joe Perches 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