Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752775AbbBXQDL (ORCPT ); Tue, 24 Feb 2015 11:03:11 -0500 Received: from mail-ie0-f180.google.com ([209.85.223.180]:35030 "EHLO mail-ie0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751973AbbBXQDJ (ORCPT ); Tue, 24 Feb 2015 11:03:09 -0500 Message-ID: <54ECA0BD.8010004@gmail.com> Date: Tue, 24 Feb 2015 09:03:09 -0700 From: David Ahern User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 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: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1067 Lines: 24 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/