lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YzIB17zCYhhRJFPY@kernel.org>
Date:   Mon, 26 Sep 2022 20:47:35 +0100
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Chen Zhongjin <chenzhongjin@...wei.com>
Cc:     linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org,
        peterz@...radead.org, mingo@...hat.com, mark.rutland@....com,
        alexander.shishkin@...ux.intel.com, jolsa@...nel.org,
        namhyung@...nel.org, irogers@...gle.com, john.garry@...wei.com,
        adrian.hunter@...el.com, ak@...ux.intel.com,
        florian.fischer@...q.space
Subject: Re: [PATCH -next 5/5] perf: Remove unused macro K

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@...wei.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ