mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: baomingtong001@208suo.com
To: peterz@infradead.org, mingo@redhat.com, acme@kernel.org,
	mark.rutland@arm.com, alexander.shishkin@linux.intel.com,
	jolsa@kernel.org, namhyung@kernel.org, irogers@google.com,
	adrian.hunter@intel.com, anshuman.khandual@arm.com
Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] perf tools:remove unneeded variable from perf_event_attr__fprintf()
Date: Wed, 14 Jun 2023 14:25:32 +0800	[thread overview]
Message-ID: <329a5b1b6e2c9061467ed6ef82247b8d@208suo.com> (raw)
In-Reply-To: <20230614062234.24149-1-luojianhong@cdjrlc.com>

fix the following coccicheck warning:

tools/perf/util/perf_event_attr_fprintf.c:97:5-8: Unneeded variable: 
"ret". Return "0".

Signed-off-by: Mingtong Bao <baomingtong001@208suo.com>
---
  tools/perf/util/perf_event_attr_fprintf.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/perf/util/perf_event_attr_fprintf.c 
b/tools/perf/util/perf_event_attr_fprintf.c
index 7e5e7b30510d..4a8f625b80c7 100644
--- a/tools/perf/util/perf_event_attr_fprintf.c
+++ b/tools/perf/util/perf_event_attr_fprintf.c
@@ -94,7 +94,6 @@ int perf_event_attr__fprintf(FILE *fp, struct 
perf_event_attr *attr,
                   attr__fprintf_f attr__fprintf, void *priv)
  {
      char buf[BUF_SIZE];
-    int ret = 0;

      PRINT_ATTRf(type, p_unsigned);
      PRINT_ATTRf(size, p_unsigned);
@@ -155,5 +154,5 @@ int perf_event_attr__fprintf(FILE *fp, struct 
perf_event_attr *attr,
      PRINT_ATTRf(aux_sample_size, p_unsigned);
      PRINT_ATTRf(sig_data, p_unsigned);

-    return ret;
+    return 0;
  }

       reply	other threads:[~2023-06-14  6:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230614062234.24149-1-luojianhong@cdjrlc.com>
2023-06-14  6:25 ` baomingtong001 [this message]
2023-07-13  1:20   ` Ian Rogers
2024-01-03 21:19     ` Arnaldo Carvalho de Melo

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=329a5b1b6e2c9061467ed6ef82247b8d@208suo.com \
    --to=baomingtong001@208suo.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=anshuman.khandual@arm.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /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®