From 6214d6c7f6ad6f2114dc0e5cb38c4ceda0260bb6 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Tue, 21 Dec 2021 11:25:54 -0800 Subject: [PATCH] proxy, server: update clang-format Signed-off-by: Chia-I Wu Reviewed-by: Yiwei Zhang Reviewed-by: Ryan Neph --- src/proxy/proxy_context.c | 7 +++---- src/venus/.clang-format | 8 +++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/proxy/proxy_context.c b/src/proxy/proxy_context.c index 029893f..82458b1 100644 --- a/src/proxy/proxy_context.c +++ b/src/proxy/proxy_context.c @@ -92,8 +92,7 @@ proxy_context_retire_timeline_fences_locked(struct proxy_context *ctx, timeline->cur_seqno = cur_seqno; timeline->cur_seqno_stall_count = 0; - list_for_each_entry_safe(struct proxy_fence, fence, &timeline->fences, head) - { + list_for_each_entry_safe (struct proxy_fence, fence, &timeline->fences, head) { if (!proxy_fence_is_signaled(fence, timeline->cur_seqno) && !force_retire_all) return false; @@ -444,13 +443,13 @@ proxy_context_destroy(struct virgl_context *base) if (ctx->timeline_seqnos) { for (uint32_t i = 0; i < PROXY_CONTEXT_TIMELINE_COUNT; i++) { struct proxy_timeline *timeline = &ctx->timelines[i]; - list_for_each_entry_safe(struct proxy_fence, fence, &timeline->fences, head) + list_for_each_entry_safe (struct proxy_fence, fence, &timeline->fences, head) free(fence); } } mtx_destroy(&ctx->timeline_mutex); - list_for_each_entry_safe(struct proxy_fence, fence, &ctx->free_fences, head) + list_for_each_entry_safe (struct proxy_fence, fence, &ctx->free_fences, head) free(fence); mtx_destroy(&ctx->free_fences_mutex); diff --git a/src/venus/.clang-format b/src/venus/.clang-format index 00011ee..74cb184 100644 --- a/src/venus/.clang-format +++ b/src/venus/.clang-format @@ -15,13 +15,15 @@ Cpp11BracedListStyle: false ForEachMacros: - LIST_FOR_EACH_ENTRY - LIST_FOR_EACH_ENTRY_SAFE + - list_for_each_entry + - list_for_each_entry_safe IncludeBlocks: Regroup IncludeCategories: - - Regex: '^("config.h"|"vkr_common.h")$' + - Regex: '^"(config|vkr_common|proxy_common|render_common).h"$' Priority: 0 - - Regex: '^"vkr_' + - Regex: '^"(vkr|proxy|render)_' Priority: 3 - - Regex: '^"(virgl|vrend_|c11/|util/|os/|pipe/|venus-protocol/)' + - Regex: '^"(virgl|vrend_|c11/|util/|os/|pipe/|venus-protocol/|server/)' Priority: 2 - Regex: '.*' Priority: 1