[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Tue, 2 Feb 2021 10:05:03 -0500
From: Pavel Tatashin <pasha.tatashin@...een.com>
To: Christoph Hellwig <hch@...radead.org>
Cc: James Morris <jmorris@...ei.org>, Sasha Levin <sashal@...nel.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
LKML <linux-kernel@...r.kernel.org>,
Jonathan Corbet <corbet@....net>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
Marc Zyngier <maz@...nel.org>,
James Morse <james.morse@....com>,
Vladimir Murzin <vladimir.murzin@....com>,
Matthias Brugger <matthias.bgg@...il.com>,
Mark Rutland <mark.rutland@....com>, steve.capper@....com,
rfontana@...hat.com, Selin Dag <selindag@...il.com>,
Tyler Hicks <tyhicks@...ux.microsoft.com>
Subject: Re: [PATCH 1/1] arm64: hibernate: add __force attribute to gfp_t casting
On Tue, Feb 2, 2021 at 3:42 AM Christoph Hellwig <hch@...radead.org> wrote:
>
> On Mon, Feb 01, 2021 at 10:03:06AM -0500, Pavel Tatashin wrote:
> > Two new warnings are reported by sparse:
> >
> > "sparse warnings: (new ones prefixed by >>)"
> > >> arch/arm64/kernel/hibernate.c:181:39: sparse: sparse: cast to
> > restricted gfp_t
> > >> arch/arm64/kernel/hibernate.c:202:44: sparse: sparse: cast from
> > restricted gfp_t
> >
> > gfp_t has __bitwise type attribute and requires __force added to casting
> > in order to avoid these warnings.
> >
> > Fixes: 50f53fb72181 ("arm64: trans_pgd: make trans_pgd_map_page generic")
> > Reported-by: kernel test robot <lkp@...el.com>
> > Signed-off-by: Pavel Tatashin <pasha.tatashin@...een.com>
>
> What about just passing the gfp_t value by reference which would be much
> cleaner?
Hi Christoph,
Thank you for your suggestions. Passing by reference is OK. I am not
sure it would be much cleaner because for GFP_ATOMIC we would need to
declare another variable on stack before trans_info.
Pasha
Powered by blists - more mailing lists