Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752971AbbBXOtp (ORCPT ); Tue, 24 Feb 2015 09:49:45 -0500 Received: from smtprelay0064.hostedemail.com ([216.40.44.64]:37073 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751059AbbBXOtn (ORCPT ); Tue, 24 Feb 2015 09:49:43 -0500 X-Session-Marker: 6E657665747340676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1183:1260:1277:1311:1313:1314:1345:1359:1434:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:3138:3139:3140:3141:3142:3352:3622:3865:3866:3868:3872:4250:4605:5007:6117:6119:6261:7875:7903:7904:10004:10400:10848:10967:11026:11232:11233:11658:11914:12043:12296:12517:12519:12555:12740:13069:13311:13357:14096:14097:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: moon00_378bc736e8f44 X-Filterd-Recvd-Size: 2292 Date: Tue, 24 Feb 2015 09:49:40 -0500 From: Steven Rostedt To: Trond Myklebust Cc: James Hogan , Jeff Layton , "J. Bruce Fields" , Linux Kernel Mailing List , Ingo Molnar , Stable Tree Mailing List Subject: Re: [PATCH] sunrpc: Fix trace events to store data in the struct Message-ID: <20150224094940.63323081@gandalf.local.home> In-Reply-To: References: <1424778476-28242-1-git-send-email-james.hogan@imgtec.com> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1357 Lines: 35 On Tue, 24 Feb 2015 08:36:48 -0500 Trond Myklebust wrote: > > diff --git a/include/trace/events/sunrpc.h b/include/trace/events/sunrpc.h > > index b9c1dc6c825a..47dfcaebfaaf 100644 > > --- a/include/trace/events/sunrpc.h > > +++ b/include/trace/events/sunrpc.h > > @@ -503,18 +503,22 @@ TRACE_EVENT(svc_xprt_do_enqueue, > > > > TP_STRUCT__entry( > > __field(struct svc_xprt *, xprt) > > - __field(struct svc_rqst *, rqst) > > + __field_struct(struct sockaddr_storage, ss) > > + __field(unsigned long, flags); > > + __field(int, pid) > > ), > > > > TP_fast_assign( > > __entry->xprt = xprt; > > - __entry->rqst = rqst; > > + xprt ? memcpy(&__entry->ss, &xprt->xpt_remote, sizeof(__entry->ss)) : memset(&__entry->ss, 0, sizeof(__entry->ss)); > > How could xprt ever be NULL here, and even if it was, why the esoteric > C instead of a simple 'if' statement? If it can never be NULL here, then we do not need the conditional. -- Steve -- 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/