From: Qian Cai <cai@lca.pw>
To: Souptick Joarder <jrdr.linux@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Matthew Wilcox <willy@infradead.org>,
Linux-MM <linux-mm@kvack.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] mm/hugepages: fix "orig_pud" set but not used
Date: Mon, 4 Mar 2019 09:09:12 -0500 [thread overview]
Message-ID: <935fc484-70e3-ed7a-ed82-329529e0e280@lca.pw> (raw)
In-Reply-To: <CAFqt6zZr8ZCM6_7QDzDEf=5gH=+EkaumXk86X35dGTdn_SLvvA@mail.gmail.com>
On 3/4/19 7:02 AM, Souptick Joarder wrote:
> On Sat, Mar 2, 2019 at 3:50 AM Qian Cai <cai@lca.pw> wrote:
>>
>> The commit a00cc7d9dd93 ("mm, x86: add support for PUD-sized transparent
>> hugepages") introduced pudp_huge_get_and_clear_full() but no one uses
>> its return code. In order to not diverge from
>> pmdp_huge_get_and_clear_full(), just change zap_huge_pud() to not assign
>> the return value from pudp_huge_get_and_clear_full().
>>
>> mm/huge_memory.c: In function 'zap_huge_pud':
>> mm/huge_memory.c:1982:8: warning: variable 'orig_pud' set but not used
>> [-Wunused-but-set-variable]
>> pud_t orig_pud;
>> ^~~~~~~~
>>
>
> 4th argument passed to pudp_huge_get_and_clear_full() is not used.
> Is it fine to remove *int full * in pudp_huge_get_and_clear_full() if
> there is no plan to use it in future ?
>
> This is applicable to below functions as well -
> pmdp_huge_get_and_clear_full()
> ptep_get_and_clear_full()
> pte_clear_not_present_full()
I suppose arches may override those that could make use of "int full".
prev parent reply other threads:[~2019-03-04 14:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-01 22:19 Qian Cai
2019-03-04 12:02 ` Souptick Joarder
2019-03-04 14:09 ` Qian Cai [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=935fc484-70e3-ed7a-ed82-329529e0e280@lca.pw \
--to=cai@lca.pw \
--cc=akpm@linux-foundation.org \
--cc=jrdr.linux@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=willy@infradead.org \
/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