[RFT PATCH 1/7] perf stat: Check color's length instead of the pointer
wangyushan
wangyushan12 at huawei.com
Thu Jan 29 07:19:57 PST 2026
On 1/27/2026 11:58 PM, Jonathan Cameron wrote:
> On Mon, 26 Jan 2026 20:35:08 +0800
> Yushan Wang <wangyushan12 at huawei.com> wrote:
>
>> Color string returned by metric_threshold_classify__color() is never
>> NULL, check the presence of *color will always return true.
>>
>> Fix this by change the checks against length of *color.
>>
>> Fixes: 37b77ae95416 ("perf stat: Change color to threshold in print_metric")
>>
> No blank line between tags.
>
> Fixes: 37b77ae95416 ("perf stat: Change color to threshold in print_metric")
> Signed-off-by: Yushan Wang <wangyushan12 at huawei.com>
>
> Some of the scripting run against the kernel uses that lack of blank lines
> as a heuristic to identify what is a tag vs other similar looking text.
Thanks for reminding, will fix it in the next version.
> Thanks,
>
> Jonathan
>
>> Signed-off-by: Yushan Wang <wangyushan12 at huawei.com>
>> ---
>> tools/perf/builtin-script.c | 2 +-
>> tools/perf/util/stat-display.c | 4 ++--
>> 2 files changed, 3 insertions(+), 3 deletions(-)
>>
[...]
Thanks!
Yushan
More information about the linux-arm-kernel
mailing list