Re: [kvm-unit-tests PATCH v1 2/2] s390x: add migration test for storage keys

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

 



On Thu, 2022-05-12 at 17:41 +0200, Claudio Imbrenda wrote:
> > diff --git a/s390x/migration-skey.c b/s390x/migration-skey.c
> > new file mode 100644
> > index 000000000000..6f3053d8ab40
[...]
> > +static void test_migration(void)
> > +{
[...]
> > +               /* ensure access key doesn't match storage key and
> > is never zero */
> > +               mismatching_key.str.acc = expected_key.str.acc < 15
> > ? expected_key.str.acc + 1 : 1;
> 
> mismatching_key.str.acc = (expected_key.str.acc ^ 2) | 1;

As discussed in person: I had something like this before and thought it is
easier to understand with the tertiary operator.  So I'd prefer to leave as-is.





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux