From 40a9fc57aa804b815e53b217299715f8ffc92ab0 Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Fri, 18 Nov 2022 05:38:36 +0800 Subject: [PATCH] tree-wide: Use __func__ instead of __FUNCTION__ in non-gallium code Signed-off-by: Yonggang Luo Acked-by: Erik Faye-Lund Acked-by: David Heidelberg Part-of: --- src/amd/common/ac_rtld.c | 2 +- src/asahi/compiler/agx_compile.c | 2 +- src/etnaviv/drm/etnaviv_priv.h | 8 ++++---- src/freedreno/decode/script.c | 2 +- src/freedreno/drm/freedreno_priv.h | 8 ++++---- src/freedreno/ir3/ir3_context.h | 2 +- src/intel/vulkan/genX_cmd_buffer.c | 2 +- src/intel/vulkan_hasvk/genX_cmd_buffer.c | 2 +- src/mesa/state_tracker/st_format.c | 2 +- src/panfrost/bifrost/bifrost_compile.c | 2 +- src/panfrost/midgard/midgard_compile.c | 2 +- 11 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/amd/common/ac_rtld.c b/src/amd/common/ac_rtld.c index 1883f0dfdad..03f8adf0655 100644 --- a/src/amd/common/ac_rtld.c +++ b/src/amd/common/ac_rtld.c @@ -156,7 +156,7 @@ static bool layout_symbols(struct ac_rtld_symbol *symbols, unsigned num_symbols, s->offset = total_size; if (total_size + s->size < total_size) { - report_errorf("%s: size overflow", __FUNCTION__); + report_errorf("%s: size overflow", __func__); return false; } diff --git a/src/asahi/compiler/agx_compile.c b/src/asahi/compiler/agx_compile.c index cdbfb97ce19..020947d0229 100644 --- a/src/asahi/compiler/agx_compile.c +++ b/src/asahi/compiler/agx_compile.c @@ -54,7 +54,7 @@ int agx_debug = 0; #define DBG(fmt, ...) \ do { if (agx_debug & AGX_DBG_MSGS) \ fprintf(stderr, "%s:%d: "fmt, \ - __FUNCTION__, __LINE__, ##__VA_ARGS__); } while (0) + __func__, __LINE__, ##__VA_ARGS__); } while (0) static agx_index agx_cached_preload(agx_context *ctx, agx_index *cache, unsigned base, enum agx_size size) diff --git a/src/etnaviv/drm/etnaviv_priv.h b/src/etnaviv/drm/etnaviv_priv.h index cc680c70ebb..0f34c63e16c 100644 --- a/src/etnaviv/drm/etnaviv_priv.h +++ b/src/etnaviv/drm/etnaviv_priv.h @@ -189,17 +189,17 @@ extern int etna_mesa_debug; #define INFO_MSG(fmt, ...) \ do { mesa_logi("%s:%d: " fmt, \ - __FUNCTION__, __LINE__, ##__VA_ARGS__); } while (0) + __func__, __LINE__, ##__VA_ARGS__); } while (0) #define DEBUG_MSG(fmt, ...) \ do if (etna_mesa_debug & ETNA_DRM_MSGS) { \ mesa_logd("%s:%d: " fmt, \ - __FUNCTION__, __LINE__, ##__VA_ARGS__); } while (0) + __func__, __LINE__, ##__VA_ARGS__); } while (0) #define WARN_MSG(fmt, ...) \ do { mesa_logw("%s:%d: " fmt, \ - __FUNCTION__, __LINE__, ##__VA_ARGS__); } while (0) + __func__, __LINE__, ##__VA_ARGS__); } while (0) #define ERROR_MSG(fmt, ...) \ do { mesa_loge("%s:%d: " fmt, \ - __FUNCTION__, __LINE__, ##__VA_ARGS__); } while (0) + __func__, __LINE__, ##__VA_ARGS__); } while (0) #define DEBUG_BO(msg, bo) \ DEBUG_MSG("%s %p, va: 0x%.8x, size: 0x%.8x, flags: 0x%.8x, " \ diff --git a/src/freedreno/decode/script.c b/src/freedreno/decode/script.c index 52962dfef9f..772241779f2 100644 --- a/src/freedreno/decode/script.c +++ b/src/freedreno/decode/script.c @@ -46,7 +46,7 @@ static lua_State *L; #if 0 #define DBG(fmt, ...) \ do { \ - printf(" ** %s:%d ** " fmt "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__); \ + printf(" ** %s:%d ** " fmt "\n", __func__, __LINE__, ##__VA_ARGS__); \ } while (0) #else #define DBG(fmt, ...) \ diff --git a/src/freedreno/drm/freedreno_priv.h b/src/freedreno/drm/freedreno_priv.h index 0781f2fad7a..379f649bc8b 100644 --- a/src/freedreno/drm/freedreno_priv.h +++ b/src/freedreno/drm/freedreno_priv.h @@ -355,21 +355,21 @@ bool fd_dbg(void); #define INFO_MSG(fmt, ...) \ do { \ if (fd_dbg()) \ - mesa_logi("%s:%d: " fmt, __FUNCTION__, __LINE__, ##__VA_ARGS__); \ + mesa_logi("%s:%d: " fmt, __func__, __LINE__, ##__VA_ARGS__); \ } while (0) #define DEBUG_MSG(fmt, ...) \ do \ if (enable_debug) { \ - mesa_logd("%s:%d: " fmt, __FUNCTION__, __LINE__, ##__VA_ARGS__); \ + mesa_logd("%s:%d: " fmt, __func__, __LINE__, ##__VA_ARGS__); \ } \ while (0) #define WARN_MSG(fmt, ...) \ do { \ - mesa_logw("%s:%d: " fmt, __FUNCTION__, __LINE__, ##__VA_ARGS__); \ + mesa_logw("%s:%d: " fmt, __func__, __LINE__, ##__VA_ARGS__); \ } while (0) #define ERROR_MSG(fmt, ...) \ do { \ - mesa_loge("%s:%d: " fmt, __FUNCTION__, __LINE__, ##__VA_ARGS__); \ + mesa_loge("%s:%d: " fmt, __func__, __LINE__, ##__VA_ARGS__); \ } while (0) #define U642VOID(x) ((void *)(unsigned long)(x)) diff --git a/src/freedreno/ir3/ir3_context.h b/src/freedreno/ir3/ir3_context.h index 29890f9e511..4d3e70627ed 100644 --- a/src/freedreno/ir3/ir3_context.h +++ b/src/freedreno/ir3/ir3_context.h @@ -36,7 +36,7 @@ #define DBG(fmt, ...) \ do { \ - mesa_logd("%s:%d: " fmt, __FUNCTION__, __LINE__, ##__VA_ARGS__); \ + mesa_logd("%s:%d: " fmt, __func__, __LINE__, ##__VA_ARGS__); \ } while (0) /** diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index 33cd8ddb894..294e5297f51 100644 --- a/src/intel/vulkan/genX_cmd_buffer.c +++ b/src/intel/vulkan/genX_cmd_buffer.c @@ -87,7 +87,7 @@ convert_pc_to_bits(struct GENX(PIPE_CONTROL) *pc) { if (INTEL_DEBUG(DEBUG_PIPE_CONTROL)) { \ fputs("pc: emit PC=( ", stderr); \ anv_dump_pipe_bits(convert_pc_to_bits(&(pc))); \ - fprintf(stderr, ") reason: %s\n", __FUNCTION__); \ + fprintf(stderr, ") reason: %s\n", __func__); \ } static bool diff --git a/src/intel/vulkan_hasvk/genX_cmd_buffer.c b/src/intel/vulkan_hasvk/genX_cmd_buffer.c index c98899d9c9f..dbb4e763004 100644 --- a/src/intel/vulkan_hasvk/genX_cmd_buffer.c +++ b/src/intel/vulkan_hasvk/genX_cmd_buffer.c @@ -87,7 +87,7 @@ convert_pc_to_bits(struct GENX(PIPE_CONTROL) *pc) { if (INTEL_DEBUG(DEBUG_PIPE_CONTROL)) { \ fputs("pc: emit PC=( ", stderr); \ anv_dump_pipe_bits(convert_pc_to_bits(&(pc))); \ - fprintf(stderr, ") reason: %s\n", __FUNCTION__); \ + fprintf(stderr, ") reason: %s\n", __func__); \ } static bool diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c index b28d36140f5..d0b87d0d2f0 100644 --- a/src/mesa/state_tracker/st_format.c +++ b/src/mesa/state_tracker/st_format.c @@ -1247,7 +1247,7 @@ st_choose_format(struct st_context *st, GLenum internalFormat, success: if (0) { debug_printf("%s(fmt=%s, type=%s, intFmt=%s) = %s\n", - __FUNCTION__, + __func__, _mesa_enum_to_string(format), _mesa_enum_to_string(type), _mesa_enum_to_string(internalFormat), diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c index f0aab763e38..e8b6cf73e82 100644 --- a/src/panfrost/bifrost/bifrost_compile.c +++ b/src/panfrost/bifrost/bifrost_compile.c @@ -70,7 +70,7 @@ int bifrost_debug = 0; #define DBG(fmt, ...) \ do { if (bifrost_debug & BIFROST_DBG_MSGS) \ fprintf(stderr, "%s:%d: "fmt, \ - __FUNCTION__, __LINE__, ##__VA_ARGS__); } while (0) + __func__, __LINE__, ##__VA_ARGS__); } while (0) static bi_block *emit_cf_list(bi_context *ctx, struct exec_list *list); diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c index 940a98b75e0..436795dbd3c 100644 --- a/src/panfrost/midgard/midgard_compile.c +++ b/src/panfrost/midgard/midgard_compile.c @@ -68,7 +68,7 @@ int midgard_debug = 0; #define DBG(fmt, ...) \ do { if (midgard_debug & MIDGARD_DBG_MSGS) \ fprintf(stderr, "%s:%d: "fmt, \ - __FUNCTION__, __LINE__, ##__VA_ARGS__); } while (0) + __func__, __LINE__, ##__VA_ARGS__); } while (0) static midgard_block * create_empty_block(compiler_context *ctx) {