[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <23081249-229b-b745-50f5-53e394b623c9@quicinc.com>
Date: Fri, 21 Oct 2022 11:26:22 +0800
From: "Aiqun(Maria) Yu" <quic_aiquny@...cinc.com>
To: Matthew Wilcox <willy@...radead.org>
CC: <akpm@...ux-foundation.org>, <ziy@...dia.com>, <david@...hat.com>,
<linux-kernel@...r.kernel.org>, <linux-mm@...ck.org>,
<mike.kravetz@...cle.com>, <opendmb@...il.com>
Subject: Re: [PATCH] mm/page_isolation: fix clang deadcode warning
On 10/21/2022 11:19 AM, Matthew Wilcox wrote:
> On Fri, Oct 21, 2022 at 11:09:53AM +0800, Maria Yu wrote:
>> When !CONFIG_VM_BUG_ON, there is warning of
>> clang-analyzer-deadcode.DeadStores:
>> Value stored to 'mt' during its initialization
>> is never read.
>
> Honestly, the cure is worse than the disease. I'd rather not have a
> line that's this long.
I don't like this long either. While the current Deadcode warning is
also annoying for our clang tidy check.
will the CONFIG check can be acceptable?
like:
#ifdef CONFIG_DEBUG_VM
or
if (IS_ENABLED(CONFIG_DEBUG_VM))
Any good ideas?
> >> - int mt = get_pageblock_migratetype(pfn_to_page(isolate_pageblock));
>> -
>> - VM_BUG_ON(!is_migrate_isolate(mt));
>> + VM_BUG_ON(!is_migrate_isolate(get_pageblock_migratetype(pfn_to_page(isolate_pageblock))));
--
Thx and BRs,
Aiqun(Maria) Yu
Powered by blists - more mailing lists