lkml.org 
[lkml]   [2022]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH -next 5/5] perf: Remove unused macro K
Date
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.

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
\
 
 \ /
  Last update: 2022-09-26 05:19    [W:0.097 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site