mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] [JANITOR] Actually use the calculated cnt in kernel/trace/ring_buffer.c
@ 2016-03-21 19:28 Mika Kukkonen
  2016-03-21 19:44 ` Steven Rostedt
  0 siblings, 1 reply; 2+ messages in thread
From: Mika Kukkonen @ 2016-03-21 19:28 UTC (permalink / raw)
  To: rostedt; +Cc: linux-kernel, kernel-janitors

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 <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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-03-21 19:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-21 19:28 [PATCH] [JANITOR] Actually use the calculated cnt in kernel/trace/ring_buffer.c Mika Kukkonen
2016-03-21 19:44 ` Steven Rostedt

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®