Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932519AbcCUT2q (ORCPT ); Mon, 21 Mar 2016 15:28:46 -0400 Received: from mail-lb0-f176.google.com ([209.85.217.176]:36444 "EHLO mail-lb0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932457AbcCUT2l (ORCPT ); Mon, 21 Mar 2016 15:28:41 -0400 MIME-Version: 1.0 Date: Mon, 21 Mar 2016 21:28:39 +0200 X-Google-Sender-Auth: J3LL4KWsqH1etYdcTGmB6hRzy9I Message-ID: Subject: [PATCH] [JANITOR] Actually use the calculated cnt in kernel/trace/ring_buffer.c From: Mika Kukkonen To: rostedt@goodmis.org Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 869 Lines: 22 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. 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