Re: [PATCH v5 03/11] mm/mempolicy: refactor sanitize_mpol_flags for reuse

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 27, 2023 at 04:39:29PM +0800, Huang, Ying wrote:
> Gregory Price <gourry.memverge@xxxxxxxxx> 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




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux