From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Chen Zhongjin <chenzhongjin@huawei.com>
Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
peterz@infradead.org, mingo@redhat.com, mark.rutland@arm.com,
alexander.shishkin@linux.intel.com, jolsa@kernel.org,
namhyung@kernel.org, irogers@google.com, john.garry@huawei.com,
adrian.hunter@intel.com, ak@linux.intel.com,
florian.fischer@muhq.space
Subject: Re: [PATCH -next 5/5] perf: Remove unused macro K
Date: Mon, 26 Sep 2022 20:47:35 +0100 [thread overview]
Message-ID: <YzIB17zCYhhRJFPY@kernel.org> (raw)
In-Reply-To: <20220926031440.28275-6-chenzhongjin@huawei.com>
Em Mon, Sep 26, 2022 at 11:14:40AM +0800, Chen Zhongjin escreveu:
> Unused macro reported by [-Wunused-macros].
>
> This macro is introduced to calculate the 'unit' size, in:
> 'd2fb8b4151a9 ("perf tools: Add new perf_atoll() function to parse string representing size in bytes")'
>
> '8ba7f6c2faad ("saner perf_atoll()")'
> This commit has simplified the perf_atoll() function and remove the
> 'unit' variable. This macro is not deleted, but nowhere else is using it.
>
> A single letter macro is confusing and easy to be misused.
> So remove it for code cleaning.
Thanks, applied.
- Arnaldo
> Signed-off-by: Chen Zhongjin <chenzhongjin@huawei.com>
> ---
> tools/perf/util/string.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/tools/perf/util/string.c b/tools/perf/util/string.c
> index f6d90cdd9225..4f12a96f33cc 100644
> --- a/tools/perf/util/string.c
> +++ b/tools/perf/util/string.c
> @@ -15,7 +15,6 @@ const char *dots =
> "....................................................................."
> ".....................................................................";
>
> -#define K 1024LL
> /*
> * perf_atoll()
> * Parse (\d+)(b|B|kb|KB|mb|MB|gb|GB|tb|TB) (e.g. "256MB")
> --
> 2.17.1
--
- Arnaldo
prev parent reply other threads:[~2022-09-26 19:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-26 3:14 [PATCH -next 0/5] perf: Minor fixes and cleanup Chen Zhongjin
2022-09-26 3:14 ` [PATCH -next 1/5] perf: Fix show_arg_names not working for tp arg names Chen Zhongjin
2022-09-26 19:50 ` Arnaldo Carvalho de Melo
2022-09-26 3:14 ` [PATCH -next 2/5] perf: Fix incorrectly parsed flags in filter Chen Zhongjin
2022-09-26 19:51 ` Arnaldo Carvalho de Melo
2022-09-26 3:14 ` [PATCH -next 3/5] perf: Remove duplicate errbuf Chen Zhongjin
2022-09-26 19:54 ` Arnaldo Carvalho de Melo
2022-09-27 1:20 ` Chen Zhongjin
2022-09-26 3:14 ` [PATCH -next 4/5] perf: Remove unused macros __PERF_EVENT_FIELD Chen Zhongjin
2022-09-26 19:48 ` Arnaldo Carvalho de Melo
2022-09-26 3:14 ` [PATCH -next 5/5] perf: Remove unused macro K Chen Zhongjin
2022-09-26 19:47 ` Arnaldo Carvalho de Melo [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=YzIB17zCYhhRJFPY@kernel.org \
--to=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=chenzhongjin@huawei.com \
--cc=florian.fischer@muhq.space \
--cc=irogers@google.com \
--cc=john.garry@huawei.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.