On 07/17/2018 06:49 AM, Ram Pai wrote: > - shifted_pkey_reg = (pkey_reg >> (pkey * PKEY_BITS_PER_PKEY)); > + shifted_pkey_reg = right_shift_bits(pkey, pkey_reg); > dprintf2("%s() shifted_pkey_reg: "PKEY_REG_FMT"\n", __func__, > shifted_pkey_reg); > masked_pkey_reg = shifted_pkey_reg & mask;
I'm not a fan of how this looks. This is almost certainly going to get the argument order mixed up at some point. Why do we need this? The description doesn't say.