Skip to content
  • Arnd Bergmann's avatar
    vhost: silence an unused-variable warning · cfdbb4ed
    Arnd Bergmann authored
    
    
    On some architectures, the MMU can be disabled, leading to access_ok()
    becoming an empty macro that does not evaluate its size argument,
    which in turn produces an unused-variable warning:
    
    drivers/vhost/vhost.c:1191:9: error: unused variable 's' [-Werror,-Wunused-variable]
            size_t s = vhost_has_feature(vq, VIRTIO_RING_F_EVENT_IDX) ? 2 : 0;
    
    Mark the variable as __maybe_unused to shut up that warning.
    
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    cfdbb4ed