RE: [PATCH v8 1/6] KVM: x86: Consolidate flags for __linearize()

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

 



From: Binbin Wu
> Sent: 11 May 2023 02:26
...
> >> 	unsigned max_size;
> >> -	return __linearize(ctxt, addr, &max_size, size, write, false,
> >> +	u32 flags = 0;
> >> +
> >> +	if (write)
> >> +		flags |= X86EMUL_F_WRITE;
> > this can be more dense:
> >
> > 	u32 flags = write ? X86EMUL_F_WRITE : 0;
> Thanks, will update it.

You can also dispense with the extra local variable and
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)




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux