From: Binbin WuThanks, I will check whether they are better to be put in the parameter list directly instead of using a local variable.
Sent: 11 May 2023 02:26...
You can also dispense with the extra local variable andThanks, will update it.unsigned max_size;this can be more dense:
- return __linearize(ctxt, addr, &max_size, size, write, false,
+ u32 flags = 0;
+
+ if (write)
+ flags |= X86EMUL_F_WRITE;
u32 flags = write ? X86EMUL_F_WRITE : 0;
put the ?: into the parameter list.
Even more so with the other calls sites.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)