Re: [PATCH] vhost: Don't use defined in VHOST_ARCH_CAN_ACCEL_UACCESS definition

2019-07-24 Thread Nathan Chancellor
On Thu, Jun 06, 2019 at 02:28:55PM -0400, Michael S. Tsirkin wrote: > I'd prefer just changing the definition. > ifdefs have a disadvantage that it's easy to get > wrong code if you forget to include a header. > > I queued the below - pls confirm it works for you. Fine by me, I figured that

[PATCH] vhost: Don't use defined in VHOST_ARCH_CAN_ACCEL_UACCESS definition

2019-07-24 Thread Nathan Chancellor
Clang warns: drivers/vhost/vhost.c:2085:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined] #if VHOST_ARCH_CAN_ACCEL_UACCESS ^ drivers/vhost/vhost.h:98:38: note: expanded from macro 'VHOST_ARCH_CAN_ACCEL_UACCESS' #define

Re: [PATCH] vhost: Don't use defined in VHOST_ARCH_CAN_ACCEL_UACCESS definition

2019-06-06 Thread Michael S. Tsirkin
On Thu, Jun 06, 2019 at 09:12:23AM -0700, Nathan Chancellor wrote: > Clang warns: > > drivers/vhost/vhost.c:2085:5: warning: macro expansion producing > 'defined' has undefined behavior [-Wexpansion-to-defined] > #if VHOST_ARCH_CAN_ACCEL_UACCESS > ^ > drivers/vhost/vhost.h:98:38: