From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <54ECA0BD.8010004@gmail.com> Date: Tue, 24 Feb 2015 09:03:09 -0700 From: David Ahern MIME-Version: 1.0 To: Steven Rostedt , James Hogan CC: Jeff Layton , "J. Bruce Fields" , linux-kernel@vger.kernel.org, Trond Myklebust , Ingo Molnar , stable@vger.kernel.org Subject: Re: [PATCH] sunrpc: Fix trace events to store data in the struct References: <1424778476-28242-1-git-send-email-james.hogan@imgtec.com> <20150224090915.40d8c7ff@grimm.local.home> <54EC885B.6090905@imgtec.com> <20150224094848.36dc2c88@gandalf.local.home> In-Reply-To: <20150224094848.36dc2c88@gandalf.local.home> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: On 2/24/15 7:48 AM, Steven Rostedt wrote: > I assume that the %pISpc expects a "struct sockaddr" passed to it as > that is what is typecast in the print. We might as well make the ss into > that structure instead of a struct sockaddr_storage, as it looks like > the storage one is much larger, and we only care about the sockaddr > part. Let's not waste the ring buffer if we don't need to. Per lib/vsprintf.c, it expects either a sockaddr_in or sockaddr_in6: case 'S': { const union { struct sockaddr raw; struct sockaddr_in v4; struct sockaddr_in6 v6; } *sa = ptr; sockaddr_in6 > sockaddr so ss should be declared accordingly. David