From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] arm64: mm: dump: fix shift warning
Date: Fri, 5 Dec 2014 13:42:15 +0000 [thread overview]
Message-ID: <20141205134215.GB21313@leverpostej> (raw)
In-Reply-To: <CAPvkgC023qJ8w9vEFXq63_LrF20Eqs_MeSnJF+VdPyHm1DUUww@mail.gmail.com>
On Fri, Dec 05, 2014 at 01:39:56PM +0000, Steve Capper wrote:
> On 5 December 2014 at 12:34, Mark Rutland <mark.rutland@arm.com> wrote:
> > When building with 48-bit VAs, it's possible to get the following
> > warning when building the arm64 page table dumping code:
> >
> > arch/arm64/mm/dump.c: In function ?walk_pgd?:
> > arch/arm64/mm/dump.c:266:2: warning: right shift count >= width of type
> > pgd_t *pgd = pgd_offset(mm, 0);
> > ^
> >
> > As pgd_offset is a macro and the second argument is not cast to any
> > particular type, the zero will be given integer type by the compiler.
> > As pgd_offset passes the pargument to pgd_index, we then try to shift
> > the 32-bit integer by at least 39 bits (for 4k pages).
> >
> > Elsewhere the pgd_offset is passed a second argument of unsigned long
> > type, so let's do the same here by passing '0UL' rather than '0'.
> >
>
> Hi Mark,
> Thanks, I must not have spotted that warning earlier.
Me neither, I'd tested on this configuration but somehow missed the
build warning.
> Acked-by: Steve Capper <steve.capper@linaro.org>
Cheers!
Mark.
next prev parent reply other threads:[~2014-12-05 13:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-05 12:34 [PATCH 0/2] arm64: mm: dump: a couple of fixes Mark Rutland
2014-12-05 12:34 ` [PATCH 1/2] arm64: mm: dump: fix shift warning Mark Rutland
2014-12-05 13:39 ` Steve Capper
2014-12-05 13:42 ` Mark Rutland [this message]
2014-12-05 12:34 ` [PATCH 2/2] arm64: mm: dump: don't skip final region Mark Rutland
2014-12-05 16:08 ` Steve Capper
2014-12-10 17:56 ` [PATCH 0/2] arm64: mm: dump: a couple of fixes Laura Abbott
2014-12-11 18:20 ` Mark Rutland
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=20141205134215.GB21313@leverpostej \
--to=mark.rutland@arm.com \
--cc=linux-arm-kernel@lists.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