From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Rostedt Subject: Re: [patch V2 01/29] tracing: Cleanup stack trace code Date: Thu, 18 Apr 2019 20:39:54 -0400 Message-ID: <20190418203954.631914cb@oasis.local.home> References: <20190418084119.056416939@linutronix.de> <20190418084253.142712304@linutronix.de> <20190418181938.2e2a9a04@gandalf.local.home> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Thomas Gleixner Cc: Mike Snitzer , David Airlie , Catalin Marinas , dri-devel@lists.freedesktop.org, linux-mm@kvack.org, dm-devel@redhat.com, Alexander Potapenko , Christoph Lameter , Christoph Hellwig , Alasdair Kergon , Marek Szyprowski , linux-arch@vger.kernel.org, x86@kernel.org, kasan-dev@googlegroups.com, Johannes Thumshirn , Andrey Ryabinin , Alexey Dobriyan , intel-gfx@lists.freedesktop.org, David Rientjes , Akinobu Mita , Josef Bacik , Mike Rapoport , Andy Lutomirski , Josh Poimboeuf , David Sterba , Dmitry Vyukov List-Id: iommu@lists.linux-foundation.org T24gRnJpLCAxOSBBcHIgMjAxOSAwMDo0NDoxNyArMDIwMCAoQ0VTVCkKVGhvbWFzIEdsZWl4bmVy IDx0Z2x4QGxpbnV0cm9uaXguZGU+IHdyb3RlOgoKPiBPbiBUaHUsIDE4IEFwciAyMDE5LCBTdGV2 ZW4gUm9zdGVkdCB3cm90ZToKPiA+IE9uIFRodSwgMTggQXByIDIwMTkgMTA6NDE6MjAgKzAyMDAK PiA+IFRob21hcyBHbGVpeG5lciA8dGdseEBsaW51dHJvbml4LmRlPiB3cm90ZToKPiA+ICAgCj4g PiA+IEBAIC00MTIsMjMgKzQwNCwyMCBAQCBzdGFja190cmFjZV9zeXNjdGwoc3RydWN0IGN0bF90 YWJsZSAqdGFiCj4gPiA+ICAJCSAgIHZva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iAKPiBUaGUgeW91bmcgcGFydCBpcyBnb25l IGZvciBzdXJlIDopCgpJIHB1cnBvc2VseSBzZXQgeW91IHVwIGZvciB0aGF0IHJlc3BvbnNlLgoK PiAKPiA+IE90aGVyIHRoZW4gdGhlIGFib3ZlIG5pdCBhbmQgcmVtb3ZpbmcgdGhlIHVubmVlZGVk ICsxIGluIG1heF9lbnRyaWVzOiAgCj4gCj4gcy8rMS8tMS8KClRoYXQgd2FzIGFuIG9kZSB0byBH KwoKLS0gU3RldmUKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X18KSW50ZWwtZ2Z4IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3Jn Cmh0dHBzOi8vbGlzdHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vaW50ZWwtZ2Z4 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3200DC10F14 for ; Fri, 19 Apr 2019 00:40:17 +0000 (UTC) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EF20A217FA for ; Fri, 19 Apr 2019 00:40:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EF20A217FA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id BD8532161; Fri, 19 Apr 2019 00:40:16 +0000 (UTC) Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 77BC5214E for ; Fri, 19 Apr 2019 00:40:00 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id D889F466 for ; Fri, 19 Apr 2019 00:39:59 +0000 (UTC) Received: from oasis.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 51E6C2171F; Fri, 19 Apr 2019 00:39:56 +0000 (UTC) Date: Thu, 18 Apr 2019 20:39:54 -0400 From: Steven Rostedt To: Thomas Gleixner Subject: Re: [patch V2 01/29] tracing: Cleanup stack trace code Message-ID: <20190418203954.631914cb@oasis.local.home> In-Reply-To: References: <20190418084119.056416939@linutronix.de> <20190418084253.142712304@linutronix.de> <20190418181938.2e2a9a04@gandalf.local.home> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Cc: Mike Snitzer , David Airlie , Catalin Marinas , Joonas Lahtinen , dri-devel@lists.freedesktop.org, linux-mm@kvack.org, dm-devel@redhat.com, Alexander Potapenko , Christoph Lameter , Christoph Hellwig , Alasdair Kergon , linux-arch@vger.kernel.org, x86@kernel.org, kasan-dev@googlegroups.com, Johannes Thumshirn , Andrey Ryabinin , Alexey Dobriyan , intel-gfx@lists.freedesktop.org, David Rientjes , Maarten Lankhorst , Akinobu Mita , Jani Nikula , Josef Bacik , Rodrigo Vivi , Mike Rapoport , Andy Lutomirski , Josh Poimboeuf , David Sterba , Dmitry Vyukov , Chris Mason , LKML , Pekka Enberg , iommu@lists.linux-foundation.org, Daniel Vetter , Andrew Morton , Robin Murphy , linux-btrfs@vger.kernel.org X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Sender: iommu-bounces@lists.linux-foundation.org Errors-To: iommu-bounces@lists.linux-foundation.org Message-ID: <20190419003954.yyHubnyKRfImIMg8xc1HTJf-gGhiJ6tvwS8aoBN1QZ8@z> On Fri, 19 Apr 2019 00:44:17 +0200 (CEST) Thomas Gleixner wrote: > On Thu, 18 Apr 2019, Steven Rostedt wrote: > > On Thu, 18 Apr 2019 10:41:20 +0200 > > Thomas Gleixner wrote: > > > > > @@ -412,23 +404,20 @@ stack_trace_sysctl(struct ctl_table *tab > > > void __user *buffer, size_t *lenp, > > > loff_t *ppos) > > > { > > > - int ret; > > > + int ret, was_enabled; > > > > One small nit. Could this be: > > > > int was_enabled; > > int ret; > > > > I prefer only joining variables that are related on the same line. > > Makes it look cleaner IMO. > > If you wish so. To me it's waste of screen space :) At least you didn't say it helps the compiler ;-) > > > > > > > mutex_lock(&stack_sysctl_mutex); > > > + was_enabled = !!stack_tracer_enabled; > > > > > > > Bah, not sure why I didn't do it this way to begin with. I think I > > copied something else that couldn't do it this way for some reason and > > didn't put any brain power behind the copy. :-/ But that was back in > > 2008 so I blame it on being "young and stupid" ;-) > > The young part is gone for sure :) I purposely set you up for that response. > > > Other then the above nit and removing the unneeded +1 in max_entries: > > s/+1/-1/ That was an ode to G+ -- Steve _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu