Re: [PATCH mm v2] tracing: incorrect gfp_t conversion

From: Andrew Morton
Date: Mon May 16 2022 - 17:13:59 EST


On Wed, 11 May 2022 10:20:39 +0300 Vasily Averin <vvs@xxxxxxxxxx> wrote:

> Fixes the following sparse warnings:
>
> include/trace/events/*: sparse: cast to restricted gfp_t
> include/trace/events/*: sparse: restricted gfp_t degrades to integer
>
> gfp_t type is bitwise and requires __force attributes for any casts.

I already moved the previous version into mm-stable. Would prefer not
to have to rebase it.

> v2: 1) re-based to 5.18-rc6
> 2) re-defined __def_gfpflag_names array according to
> akpm@, willy@ and Joe Perches recommendations

Please redo this against the mm-stable or mm-unstable branches against
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm, or against your
own previous version.

The new patch will simply switch to the gfpflag_string() trick, so it will
not be a "fix", so please let's position it as a "cleanup".