linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: John Hubbard <jhubbard@nvidia.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "Jérôme Glisse" <jglisse@redhat.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Ralph Campbell" <rcampbell@nvidia.com>,
	"Stephen Rothwell" <sfr@canb.auug.org.au>,
	"Dan Williams" <dan.j.williams@intel.com>,
	Linux-MM <linux-mm@kvack.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm/hmm: fix unused variable warnings
Date: Wed, 6 Mar 2019 10:34:15 -0800	[thread overview]
Message-ID: <745a2366-23e2-0718-92f4-ccadad5ccf8a@nvidia.com> (raw)
In-Reply-To: <CAK8P3a2no2gjWXTcgg_g1DJ9B-j8LfyaeOn+Ji18bWS5mQNZUA@mail.gmail.com>

On 3/6/19 2:19 AM, Arnd Bergmann wrote:
> On Wed, Mar 6, 2019 at 12:51 AM John Hubbard <jhubbard@nvidia.com> wrote:
>>
>> With some Kconfig local hacks that removed all HUGE* support, while leaving
>> HMM enabled, I was able to reproduce your results, and also to verify the
>> fix. It also makes sense from reading it.
> 
> Thanks for the confirmation.
> 
>> Also, I ran into one more warning as well:
>>
>> mm/hmm.c: In function ‘hmm_vma_walk_pud’:
>> mm/hmm.c:764:25: warning: unused variable ‘vma’ [-Wunused-variable]
>>   struct vm_area_struct *vma = walk->vma;
>>                          ^~~
>>
>> ...which can be fixed like this:
>>
>> diff --git a/mm/hmm.c b/mm/hmm.c
>> index c4beb1628cad..c1cbe82d12b5 100644
>> --- a/mm/hmm.c
>> +++ b/mm/hmm.c
>> @@ -761,7 +761,6 @@ static int hmm_vma_walk_pud(pud_t *pudp,
>>  {
>>         struct hmm_vma_walk *hmm_vma_walk = walk->private;
>>         struct hmm_range *range = hmm_vma_walk->range;
>> -       struct vm_area_struct *vma = walk->vma;
>>         unsigned long addr = start, next;
>>         pmd_t *pmdp;
>>         pud_t pud;
>> @@ -807,7 +806,7 @@ static int hmm_vma_walk_pud(pud_t *pudp,
>>                 return 0;
>>         }
>>
>> -       split_huge_pud(vma, pudp, addr);
>> +       split_huge_pud(walk->vma, pudp, addr);
>>         if (pud_none(*pudp))
>>                 goto again;
>>
>> ...so maybe you'd like to fold that into your patch?
> 
> I also ran into this one last night during further randconfig testing,
> and came up with the same patch that you showed here. I'll
> send this one to Andrew and add a Reported-by line for you,
> since he already merged the first patch.
> 
> I'll leave it up to Andrew to fold the fixes into one, or into the original
> patches if he thinks that makes sense.
> 
>      Arnd
> 

Sounds good!

thanks,
-- 
John Hubbard
NVIDIA


      reply	other threads:[~2019-03-06 18:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-04 20:00 Arnd Bergmann
2019-03-05 12:18 ` Anshuman Khandual
2019-03-06 10:26   ` Arnd Bergmann
2019-03-05 23:51 ` John Hubbard
2019-03-06 10:19   ` Arnd Bergmann
2019-03-06 18:34     ` John Hubbard [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=745a2366-23e2-0718-92f4-ccadad5ccf8a@nvidia.com \
    --to=jhubbard@nvidia.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=dan.j.williams@intel.com \
    --cc=jglisse@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rcampbell@nvidia.com \
    --cc=sfr@canb.auug.org.au \
    /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