From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9532C489BE for ; Fri, 24 Oct 2025 07:49:47 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 914284064F; Fri, 24 Oct 2025 07:49:47 +0200 (CEST) Received: from dpdk.org (dpdk.org [92.243.24.197]) by mails.dpdk.org (Postfix) with ESMTP id 8BF1D4064F for ; Fri, 24 Oct 2025 07:49:45 +0200 (CEST) Received: by dpdk.org (Postfix, from userid 65534) id 7C3771242B8; Fri, 24 Oct 2025 07:49:16 +0200 (CEST) Subject: |WARNING| pw158064 [PATCH v11 4/9] lib/pmu: reimplement per-arch ops as callbacks In-Reply-To: <20251024054830.933910-5-tduszynski@marvell.com> References: <20251024054830.933910-5-tduszynski@marvell.com> To: test-report@dpdk.org From: checkpatch@dpdk.org Cc: Tomasz Duszynski Message-Id: <20251024054916.7C3771242B8@dpdk.org> Date: Fri, 24 Oct 2025 07:49:16 +0200 (CEST) X-BeenThere: test-report@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: automatic DPDK test reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: test-report-bounces@dpdk.org Test-Label: checkpatch Test-Status: WARNING http://dpdk.org/patch/158064 _coding style issues_ ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses #195: FILE: lib/pmu/pmu_private.h:19: +#define PMU_SET_ARCH_OPS(ops) \ + RTE_INIT(libpmu_set_arch_ops) \ + { \ + arch_ops = &(ops); \ + } BUT SEE: do {} while (0) advice is over-stated in a few situations: The more obvious case is macros, like MODULE_PARM_DESC, invoked at file-scope, where C disallows code (it must be in functions). See $exceptions if you have one to add by name. More troublesome is declarative macros used at top of new scope, like DECLARE_PER_CPU. These might just compile with a do-while-0 wrapper, but would be incorrect. Most of these are handled by detecting struct,union,etc declaration primitives in $exceptions. Theres also macros called inside an if (block), which "return" an expression. These cannot do-while, and need a ({}) wrapper. Enjoy this qualification while we work to improve our heuristics. total: 1 errors, 0 warnings, 125 lines checked