* [PATCH][next] tracing: remove redundant unread variable ret
@ 2017-08-23 11:23 ` Colin King
0 siblings, 0 replies; 4+ messages in thread
From: Colin King @ 2017-08-23 11:23 UTC (permalink / raw)
To: Steven Rostedt, Ingo Molnar; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Integer ret is being assigned but never used and hence it is
redundant. Remove it, fixes clang warning:
trace_events_hist.c:1077:3: warning: Value stored to 'ret' is never read
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
kernel/trace/trace_events_hist.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
index 1c21d0e2a145..f123b5d0c226 100644
--- a/kernel/trace/trace_events_hist.c
+++ b/kernel/trace/trace_events_hist.c
@@ -1062,7 +1062,7 @@ static void hist_trigger_show(struct seq_file *m,
struct event_trigger_data *data, int n)
{
struct hist_trigger_data *hist_data;
- int n_entries, ret = 0;
+ int n_entries;
if (n > 0)
seq_puts(m, "\n\n");
@@ -1073,10 +1073,8 @@ static void hist_trigger_show(struct seq_file *m,
hist_data = data->private_data;
n_entries = print_entries(m, hist_data);
- if (n_entries < 0) {
- ret = n_entries;
+ if (n_entries < 0)
n_entries = 0;
- }
seq_printf(m, "\nTotals:\n Hits: %llu\n Entries: %u\n Dropped: %llu\n",
(u64)atomic64_read(&hist_data->map->hits),
--
2.14.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH][next] tracing: remove redundant unread variable ret
@ 2017-08-23 11:23 ` Colin King
0 siblings, 0 replies; 4+ messages in thread
From: Colin King @ 2017-08-23 11:23 UTC (permalink / raw)
To: Steven Rostedt, Ingo Molnar; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Integer ret is being assigned but never used and hence it is
redundant. Remove it, fixes clang warning:
trace_events_hist.c:1077:3: warning: Value stored to 'ret' is never read
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
kernel/trace/trace_events_hist.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
index 1c21d0e2a145..f123b5d0c226 100644
--- a/kernel/trace/trace_events_hist.c
+++ b/kernel/trace/trace_events_hist.c
@@ -1062,7 +1062,7 @@ static void hist_trigger_show(struct seq_file *m,
struct event_trigger_data *data, int n)
{
struct hist_trigger_data *hist_data;
- int n_entries, ret = 0;
+ int n_entries;
if (n > 0)
seq_puts(m, "\n\n");
@@ -1073,10 +1073,8 @@ static void hist_trigger_show(struct seq_file *m,
hist_data = data->private_data;
n_entries = print_entries(m, hist_data);
- if (n_entries < 0) {
- ret = n_entries;
+ if (n_entries < 0)
n_entries = 0;
- }
seq_printf(m, "\nTotals:\n Hits: %llu\n Entries: %u\n Dropped: %llu\n",
(u64)atomic64_read(&hist_data->map->hits),
--
2.14.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH][next] tracing: remove redundant unread variable ret
2017-08-23 11:23 ` Colin King
@ 2017-09-19 16:43 ` Steven Rostedt
-1 siblings, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2017-09-19 16:43 UTC (permalink / raw)
To: Colin King; +Cc: Ingo Molnar, kernel-janitors, linux-kernel
On Wed, 23 Aug 2017 12:23:09 +0100
Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Integer ret is being assigned but never used and hence it is
> redundant. Remove it, fixes clang warning:
>
> trace_events_hist.c:1077:3: warning: Value stored to 'ret' is never read
Thanks! Applied (rather late :-/)
-- Steve
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> kernel/trace/trace_events_hist.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
> index 1c21d0e2a145..f123b5d0c226 100644
> --- a/kernel/trace/trace_events_hist.c
> +++ b/kernel/trace/trace_events_hist.c
> @@ -1062,7 +1062,7 @@ static void hist_trigger_show(struct seq_file *m,
> struct event_trigger_data *data, int n)
> {
> struct hist_trigger_data *hist_data;
> - int n_entries, ret = 0;
> + int n_entries;
>
> if (n > 0)
> seq_puts(m, "\n\n");
> @@ -1073,10 +1073,8 @@ static void hist_trigger_show(struct seq_file *m,
>
> hist_data = data->private_data;
> n_entries = print_entries(m, hist_data);
> - if (n_entries < 0) {
> - ret = n_entries;
> + if (n_entries < 0)
> n_entries = 0;
> - }
>
> seq_printf(m, "\nTotals:\n Hits: %llu\n Entries: %u\n Dropped: %llu\n",
> (u64)atomic64_read(&hist_data->map->hits),
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH][next] tracing: remove redundant unread variable ret
@ 2017-09-19 16:43 ` Steven Rostedt
0 siblings, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2017-09-19 16:43 UTC (permalink / raw)
To: Colin King; +Cc: Ingo Molnar, kernel-janitors, linux-kernel
On Wed, 23 Aug 2017 12:23:09 +0100
Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Integer ret is being assigned but never used and hence it is
> redundant. Remove it, fixes clang warning:
>
> trace_events_hist.c:1077:3: warning: Value stored to 'ret' is never read
Thanks! Applied (rather late :-/)
-- Steve
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> kernel/trace/trace_events_hist.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
> index 1c21d0e2a145..f123b5d0c226 100644
> --- a/kernel/trace/trace_events_hist.c
> +++ b/kernel/trace/trace_events_hist.c
> @@ -1062,7 +1062,7 @@ static void hist_trigger_show(struct seq_file *m,
> struct event_trigger_data *data, int n)
> {
> struct hist_trigger_data *hist_data;
> - int n_entries, ret = 0;
> + int n_entries;
>
> if (n > 0)
> seq_puts(m, "\n\n");
> @@ -1073,10 +1073,8 @@ static void hist_trigger_show(struct seq_file *m,
>
> hist_data = data->private_data;
> n_entries = print_entries(m, hist_data);
> - if (n_entries < 0) {
> - ret = n_entries;
> + if (n_entries < 0)
> n_entries = 0;
> - }
>
> seq_printf(m, "\nTotals:\n Hits: %llu\n Entries: %u\n Dropped: %llu\n",
> (u64)atomic64_read(&hist_data->map->hits),
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-09-19 16:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-23 11:23 [PATCH][next] tracing: remove redundant unread variable ret Colin King
2017-08-23 11:23 ` Colin King
2017-09-19 16:43 ` Steven Rostedt
2017-09-19 16:43 ` Steven Rostedt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.