linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Pavel Tatashin <pasha.tatashin@soleen.com>
Cc: jmorris@namei.org, sashal@kernel.org, ebiederm@xmission.com,
	linux-kernel@vger.kernel.org, corbet@lwn.net,
	catalin.marinas@arm.com, will@kernel.org,
	linux-arm-kernel@lists.infradead.org, maz@kernel.org,
	james.morse@arm.com, vladimir.murzin@arm.com,
	matthias.bgg@gmail.com, mark.rutland@arm.com,
	steve.capper@arm.com, rfontana@redhat.com, selindag@gmail.com,
	tyhicks@linux.microsoft.com
Subject: Re: [PATCH 1/1] arm64: hibernate: add __force attribute to gfp_t casting
Date: Tue, 2 Feb 2021 08:42:43 +0000	[thread overview]
Message-ID: <20210202084243.GA3558964@infradead.org> (raw)
In-Reply-To: <20210201150306.54099-2-pasha.tatashin@soleen.com>

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@intel.com>
> Signed-off-by: Pavel Tatashin <pasha.tatashin@soleen.com>

What about just passing the gfp_t value by reference which would be much
cleaner?

  reply	other threads:[~2021-02-02  8:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-01 15:03 [PATCH 0/1] arm64/hibernate: sparse warnings fix Pavel Tatashin
2021-02-01 15:03 ` [PATCH 1/1] arm64: hibernate: add __force attribute to gfp_t casting Pavel Tatashin
2021-02-02  8:42   ` Christoph Hellwig [this message]
2021-02-02 15:05     ` Pavel Tatashin
2021-02-01 17:13 ` [PATCH 0/1] arm64/hibernate: sparse warnings fix Will Deacon

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=20210202084243.GA3558964@infradead.org \
    --to=hch@infradead.org \
    --cc=catalin.marinas@arm.com \
    --cc=corbet@lwn.net \
    --cc=ebiederm@xmission.com \
    --cc=james.morse@arm.com \
    --cc=jmorris@namei.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=matthias.bgg@gmail.com \
    --cc=maz@kernel.org \
    --cc=pasha.tatashin@soleen.com \
    --cc=rfontana@redhat.com \
    --cc=sashal@kernel.org \
    --cc=selindag@gmail.com \
    --cc=steve.capper@arm.com \
    --cc=tyhicks@linux.microsoft.com \
    --cc=vladimir.murzin@arm.com \
    --cc=will@kernel.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;
as well as URLs for NNTP newsgroup(s).