From 11a65dbedc9c4df357705eb6ac1d69d174e3a1f6 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Sat, 17 Apr 2021 11:08:56 -0700 Subject: [PATCH] venus: clang-format clean Add parentheses to VN_DEBUG to avoid confusing clang-format. Remove redundant comments, that confuse clang-format, because VN_USE_WSI_PLATFORM can serve as comments. Signed-off-by: Chia-I Wu Reviewed-by: Yiwei Zhang Part-of: --- src/virtio/vulkan/vn_common.h | 2 +- src/virtio/vulkan/vn_device.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/virtio/vulkan/vn_common.h b/src/virtio/vulkan/vn_common.h index 40d08b2049e..28c18e221d5 100644 --- a/src/virtio/vulkan/vn_common.h +++ b/src/virtio/vulkan/vn_common.h @@ -41,7 +41,7 @@ #define VN_DEFAULT_ALIGN 8 -#define VN_DEBUG(category) unlikely(vn_debug & VN_DEBUG_##category) +#define VN_DEBUG(category) (unlikely(vn_debug & VN_DEBUG_##category)) #define vn_error(instance, error) \ (VN_DEBUG(RESULT) ? vn_log_result((instance), (error), __func__) : (error)) diff --git a/src/virtio/vulkan/vn_device.c b/src/virtio/vulkan/vn_device.c index 17cc2a73b43..a94dcf8cefa 100644 --- a/src/virtio/vulkan/vn_device.c +++ b/src/virtio/vulkan/vn_device.c @@ -43,7 +43,6 @@ static const struct vk_instance_extension_table .KHR_external_semaphore_capabilities = true, .KHR_get_physical_device_properties2 = true, - /* WSI */ #ifdef VN_USE_WSI_PLATFORM .KHR_get_surface_capabilities2 = true, .KHR_surface = true, @@ -1410,7 +1409,6 @@ vn_physical_device_get_supported_extensions( struct vk_device_extension_table *recognized) { *supported = (struct vk_device_extension_table){ - /* WSI */ #ifdef VN_USE_WSI_PLATFORM .KHR_incremental_present = true, .KHR_swapchain = true,