All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: baomingtong001@208suo.com
Cc: peterz@infradead.org, mingo@redhat.com, mark.rutland@arm.com,
	alexander.shishkin@linux.intel.com, jolsa@kernel.org,
	namhyung@kernel.org, irogers@google.com, adrian.hunter@intel.com,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf bench: remove unneeded variable
Date: Wed, 14 Jun 2023 10:59:38 -0300	[thread overview]
Message-ID: <ZInHyuu4zT7xkbKw@kernel.org> (raw)
In-Reply-To: <475df60d9dd518e20ae9df396c60b69b@208suo.com>

Em Wed, Jun 14, 2023 at 11:38:41AM +0800, baomingtong001@208suo.com escreveu:
> fix the following coccicheck warning:
> 
> tools/perf/bench/find-bit-bench.c:127:5-8: Unneeded variable: "err". Return
> "0".

⬢[acme@toolbox perf-tools-next]$ patch -p1 < ~/wb/1.patch
patching file tools/perf/bench/find-bit-bench.c
patch: **** malformed patch at line 117: num_bits)

⬢[acme@toolbox perf-tools-next]$

Please check the process you're following to generate and send the
patch.

There is a doc file for that...

Documentation/process/submitting-patches.rst

Well, two:

Documentation/process/submit-checklist.rst

I'm applying this manually,

Thanks,

- Arnaldo
 
> Signed-off-by: Mingtong Bao <baomingtong001@208suo.com>
> ---
>  tools/perf/bench/find-bit-bench.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/perf/bench/find-bit-bench.c
> b/tools/perf/bench/find-bit-bench.c
> index 7e25b0e413f6..70619bc73841 100644
> --- a/tools/perf/bench/find-bit-bench.c
> +++ b/tools/perf/bench/find-bit-bench.c
> @@ -124,7 +124,7 @@ static int do_for_each_set_bit(unsigned int num_bits)
> 
>  int bench_mem_find_bit(int argc, const char **argv)
>  {
> -    int err = 0, i;
> +    int i;
> 
>      argc = parse_options(argc, argv, options, bench_usage, 0);
>      if (argc) {
> @@ -135,5 +135,5 @@ int bench_mem_find_bit(int argc, const char **argv)
>      for (i = 1; i <= 2048; i <<= 1)
>          do_for_each_set_bit(i);
> 
> -    return err;
> +    return 0;
>  }

-- 

- Arnaldo

  parent reply	other threads:[~2023-06-14 13:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230614033437.48549-1-luojianhong@cdjrlc.com>
2023-06-14  3:38 ` [PATCH] perf bench: remove unneeded variable baomingtong001
2023-06-14  4:43   ` Ian Rogers
2023-06-14 13:59   ` Arnaldo Carvalho de Melo [this message]
2021-04-12  9:20 [PATCH] perf: bench: Remove " Wan Jiabing

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=ZInHyuu4zT7xkbKw@kernel.org \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=baomingtong001@208suo.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 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.