linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Aiqun(Maria) Yu" <quic_aiquny@quicinc.com>
To: David Hildenbrand <david@redhat.com>, <akpm@linux-foundation.org>,
	<ziy@nvidia.com>, <linux-kernel@vger.kernel.org>,
	<linux-mm@kvack.org>
Cc: <mike.kravetz@oracle.com>, <opendmb@gmail.com>
Subject: Re: [PATCH v2 1/1] mm/page_isolation: fix clang deadcode warning
Date: Fri, 21 Oct 2022 16:21:26 +0800	[thread overview]
Message-ID: <1dd08ecb-2b08-0556-64ac-3f39a8fec76c@quicinc.com> (raw)
In-Reply-To: <d00d6e23-6e4f-074f-67c3-5f00e8a913d2@redhat.com>

On 10/21/2022 2:54 PM, David Hildenbrand wrote:
> On 21.10.22 07:19, 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.
>>
>> Signed-off-by: Maria Yu <quic_aiquny@quicinc.com>
>> ---
>>   mm/page_isolation.c | 5 ++---
>>   1 file changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/mm/page_isolation.c b/mm/page_isolation.c
>> index 04141a9bea70..a7a478a22123 100644
>> --- a/mm/page_isolation.c
>> +++ b/mm/page_isolation.c
>> @@ -330,9 +330,8 @@ static int isolate_single_pageblock(unsigned long 
>> boundary_pfn, int flags,
>>                         zone->zone_start_pfn);
>>       if (skip_isolation) {
>> -        int mt = 
>> get_pageblock_migratetype(pfn_to_page(isolate_pageblock));
> 
> __maybe_unused should work as well. Was that considered?
> 
good idea.

-- 
Thx and BRs,
Aiqun(Maria) Yu


      reply	other threads:[~2022-10-21  8:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-21  5:19 [PATCH v2 0/1] " Maria Yu
2022-10-21  5:19 ` [PATCH v2 1/1] " Maria Yu
2022-10-21  6:54   ` David Hildenbrand
2022-10-21  8:21     ` Aiqun(Maria) Yu [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=1dd08ecb-2b08-0556-64ac-3f39a8fec76c@quicinc.com \
    --to=quic_aiquny@quicinc.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mike.kravetz@oracle.com \
    --cc=opendmb@gmail.com \
    --cc=ziy@nvidia.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox