mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Mika Kukkonen <mikukkon@iki.fi>
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
Date: Mon, 21 Mar 2016 15:44:45 -0400	[thread overview]
Message-ID: <20160321154445.3217597a@gandalf.local.home> (raw)
In-Reply-To: <CANj=StrD-fmQDHQ-8MLdn0YTn=s5tv1TH25HLaSBS0ZiTcQc+Q@mail.gmail.com>

On Mon, 21 Mar 2016 21:28:39 +0200
Mika Kukkonen <mikukkon@iki.fi> 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 <mikukkon@iki.fi>
> 
> 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

      reply	other threads:[~2016-03-21 19:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-21 19:28 Mika Kukkonen
2016-03-21 19:44 ` Steven Rostedt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160321154445.3217597a@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikukkon@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®