[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZYp7P1fH8nvkr4o0@memverge.com>
Date: Tue, 26 Dec 2023 02:05:35 -0500
From: Gregory Price <gregory.price@...verge.com>
To: "Huang, Ying" <ying.huang@...el.com>
Cc: Gregory Price <gourry.memverge@...il.com>, linux-mm@...ck.org,
linux-doc@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-api@...r.kernel.org,
x86@...nel.org, akpm@...ux-foundation.org, arnd@...db.de,
tglx@...utronix.de, luto@...nel.org, mingo@...hat.com, bp@...en8.de,
dave.hansen@...ux.intel.com, hpa@...or.com, mhocko@...nel.org,
tj@...nel.org, corbet@....net, rakie.kim@...com,
hyeongtak.ji@...com, honggyu.kim@...com, vtavarespetr@...ron.com,
peterz@...radead.org, jgroves@...ron.com, ravis.opensrc@...ron.com,
sthanneeru@...ron.com, emirakhur@...ron.com, Hasan.Maruf@....com,
seungjun.ha@...sung.com
Subject: Re: [PATCH v5 03/11] mm/mempolicy: refactor sanitize_mpol_flags for
reuse
On Wed, Dec 27, 2023 at 04:39:29PM +0800, Huang, Ying wrote:
> Gregory Price <gourry.memverge@...il.com> writes:
>
> > + * fields and return just the mode in mode_arg and flags in flags.
> > + */
> > +static inline int sanitize_mpol_flags(int *mode_arg, unsigned short *flags)
> > +{
> > + unsigned short mode = (*mode_arg & ~MPOL_MODE_FLAGS);
> > +
> > + *flags = *mode_arg & MPOL_MODE_FLAGS;
> > + *mode_arg = mode;
>
> It appears that it's unnecessary to introduce a local variable to split
> mode/flags. Just reuse the original code?
>
ack
~Gregory
Powered by blists - more mailing lists