Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757840AbcCUTou (ORCPT ); Mon, 21 Mar 2016 15:44:50 -0400 Received: from smtprelay0251.hostedemail.com ([216.40.44.251]:50906 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756262AbcCUTos (ORCPT ); Mon, 21 Mar 2016 15:44:48 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359: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:3867:3868:3871:3872:3874:4321:4605:5007:6119:6120:6261:7875:7901:7903:8603:8957:9040:10004:10400:10848:10967:11026:11232:11658:11914:12517:12519:12555:12740:13069:13255:13311:13357:13439:14181:14659:14721:21067:21080:30054:30090:30091,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,LFtime:50,LUA_SUMMARY:none X-HE-Tag: robin27_46d67e2213f56 X-Filterd-Recvd-Size: 1953 Date: Mon, 21 Mar 2016 15:44:45 -0400 From: Steven Rostedt To: Mika Kukkonen Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] [JANITOR] Actually use the calculated cnt in kernel/trace/ring_buffer.c Message-ID: <20160321154445.3217597a@gandalf.local.home> In-Reply-To: References: X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.29; 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: 1029 Lines: 30 On Mon, 21 Mar 2016 21:28:39 +0200 Mika Kukkonen wrote: > Was deleting an old github kernel tree and noticed this one line patch > I had made years back. Can't remember the compiler warning anymore but > clearly it complained about pointless assigment to cnt since it is not > used after that, although to me it looks like it should. I'll take this. Thanks Mika! -- Steve > > Signed-off-by: Mika Kukkonen > > diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c > index 95181e3..22d1007 100644 > --- a/kernel/trace/ring_buffer.c > +++ b/kernel/trace/ring_buffer.c > @@ -4756,7 +4756,7 @@ static __init int rb_write_something(struct > rb_test_data *data, bool nested) > cnt = data->cnt + (nested ? 27 : 0); > > /* Multiply cnt by ~e, to make some unique increment */ > - size = (data->cnt * 68 / 25) % (sizeof(rb_string) - 1); > + size = (cnt * 68 / 25) % (sizeof(rb_string) - 1); > > len = size + sizeof(struct rb_item); > > --MiKu