From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
To: Khalid Aziz <khalid.aziz@oracle.com>
Cc: "Bartosz Golaszewski" <brgl@bgdev.pl>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Anthony Yznaga" <anthony.yznaga@oracle.com>,
"Aneesh Kumar K . V" <aneesh.kumar@linux.ibm.com>,
"Jérôme Glisse" <jglisse@redhat.com>,
linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm: remove unused variable
Date: Tue, 12 Mar 2019 15:03:52 +0100 [thread overview]
Message-ID: <CAMpxmJVeeMRPaXMKp29mE08pKFU4RRMetY=9-pWmazLg3DMLbg@mail.gmail.com> (raw)
In-Reply-To: <c86234af-a83a-712a-8dc8-0ec2a5dad103@oracle.com>
wt., 12 mar 2019 o 14:59 Khalid Aziz <khalid.aziz@oracle.com> napisał(a):
>
> On 3/12/19 7:28 AM, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> >
> > The mm variable is set but unused. Remove it.
>
> It is used. Look further down for calls to set_pte_at().
>
> --
> Khalid
>
> >
> > Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> > ---
> > mm/mprotect.c | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/mm/mprotect.c b/mm/mprotect.c
> > index 028c724dcb1a..130dac3ad04f 100644
> > --- a/mm/mprotect.c
> > +++ b/mm/mprotect.c
> > @@ -39,7 +39,6 @@ static unsigned long change_pte_range(struct vm_area_struct *vma, pmd_t *pmd,
> > unsigned long addr, unsigned long end, pgprot_t newprot,
> > int dirty_accountable, int prot_numa)
> > {
> > - struct mm_struct *mm = vma->vm_mm;
> > pte_t *pte, oldpte;
> > spinlock_t *ptl;
> > unsigned long pages = 0;
> >
>
>
Oops, I blindly assumed the compiler is right, sorry for that. GCC
complains it's unused when building usermode linux. I guess it's a
matter of how set_pte_at() is defined for ARCH=um. I'll take a second
look.
Bart
next prev parent reply other threads:[~2019-03-12 14:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-12 13:28 Bartosz Golaszewski
2019-03-12 13:58 ` Khalid Aziz
2019-03-12 14:03 ` Bartosz Golaszewski [this message]
2019-03-12 21:18 ` Andrew Morton
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='CAMpxmJVeeMRPaXMKp29mE08pKFU4RRMetY=9-pWmazLg3DMLbg@mail.gmail.com' \
--to=bgolaszewski@baylibre.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.ibm.com \
--cc=anthony.yznaga@oracle.com \
--cc=brgl@bgdev.pl \
--cc=jglisse@redhat.com \
--cc=khalid.aziz@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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