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 8E7C5A0543 for ; Thu, 22 Sep 2022 21:05:52 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1985542BD6; Thu, 22 Sep 2022 21:05:49 +0200 (CEST) Received: from dpdk.org (dpdk.org [92.243.24.197]) by mails.dpdk.org (Postfix) with ESMTP id 80DCC42BBA for ; Thu, 22 Sep 2022 21:05:45 +0200 (CEST) Received: by dpdk.org (Postfix, from userid 65534) id 7B1C5121F02; Thu, 22 Sep 2022 21:05:45 +0200 (CEST) Subject: |WARNING| pw116666 [v1 02/19] net/mlx5: split flow item matcher and value translation In-Reply-To: <20220922190345.394-3-valex@nvidia.com> References: <20220922190345.394-3-valex@nvidia.com> To: test-report@dpdk.org From: checkpatch@dpdk.org Cc: Alex Vesker Message-Id: <20220922190545.7B1C5121F02@dpdk.org> Date: Thu, 22 Sep 2022 21:05:45 +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/116666 _coding style issues_ CHECK:MACRO_ARG_REUSE: Macro argument reuse 'item' - possible side-effects? #183: FILE: drivers/net/mlx5/mlx5_flow_dv.c:66: +#define MLX5_ITEM_VALID(item, key_type) \ + (((MLX5_SET_MATCHER_SW & (key_type)) && !((item)->spec)) || \ + ((MLX5_SET_MATCHER_HS_V == (key_type)) && !((item)->spec)) || \ + ((MLX5_SET_MATCHER_HS_M == (key_type)) && !((item)->mask))) CHECK:MACRO_ARG_REUSE: Macro argument reuse 'key_type' - possible side-effects? #183: FILE: drivers/net/mlx5/mlx5_flow_dv.c:66: +#define MLX5_ITEM_VALID(item, key_type) \ + (((MLX5_SET_MATCHER_SW & (key_type)) && !((item)->spec)) || \ + ((MLX5_SET_MATCHER_HS_V == (key_type)) && !((item)->spec)) || \ + ((MLX5_SET_MATCHER_HS_M == (key_type)) && !((item)->mask))) CHECK:MACRO_ARG_REUSE: Macro argument reuse 'item' - possible side-effects? #188: FILE: drivers/net/mlx5/mlx5_flow_dv.c:71: +#define MLX5_ITEM_UPDATE(item, key_type, v, m, gm) \ + do { \ + if ((key_type) == MLX5_SET_MATCHER_SW_V) { \ + v = (item)->spec; \ + m = (item)->mask ? (item)->mask : (gm); \ + } else if ((key_type) == MLX5_SET_MATCHER_HS_V) { \ + v = (item)->spec; \ + m = (v); \ + } else { \ + v = (item)->mask ? (item)->mask : (gm); \ + m = (v); \ + } \ + } while (0) CHECK:MACRO_ARG_REUSE: Macro argument reuse 'key_type' - possible side-effects? #188: FILE: drivers/net/mlx5/mlx5_flow_dv.c:71: +#define MLX5_ITEM_UPDATE(item, key_type, v, m, gm) \ + do { \ + if ((key_type) == MLX5_SET_MATCHER_SW_V) { \ + v = (item)->spec; \ + m = (item)->mask ? (item)->mask : (gm); \ + } else if ((key_type) == MLX5_SET_MATCHER_HS_V) { \ + v = (item)->spec; \ + m = (v); \ + } else { \ + v = (item)->mask ? (item)->mask : (gm); \ + m = (v); \ + } \ + } while (0) CHECK:MACRO_ARG_REUSE: Macro argument reuse 'v' - possible side-effects? #188: FILE: drivers/net/mlx5/mlx5_flow_dv.c:71: +#define MLX5_ITEM_UPDATE(item, key_type, v, m, gm) \ + do { \ + if ((key_type) == MLX5_SET_MATCHER_SW_V) { \ + v = (item)->spec; \ + m = (item)->mask ? (item)->mask : (gm); \ + } else if ((key_type) == MLX5_SET_MATCHER_HS_V) { \ + v = (item)->spec; \ + m = (v); \ + } else { \ + v = (item)->mask ? (item)->mask : (gm); \ + m = (v); \ + } \ + } while (0) CHECK:MACRO_ARG_REUSE: Macro argument reuse 'm' - possible side-effects? #188: FILE: drivers/net/mlx5/mlx5_flow_dv.c:71: +#define MLX5_ITEM_UPDATE(item, key_type, v, m, gm) \ + do { \ + if ((key_type) == MLX5_SET_MATCHER_SW_V) { \ + v = (item)->spec; \ + m = (item)->mask ? (item)->mask : (gm); \ + } else if ((key_type) == MLX5_SET_MATCHER_HS_V) { \ + v = (item)->spec; \ + m = (v); \ + } else { \ + v = (item)->mask ? (item)->mask : (gm); \ + m = (v); \ + } \ + } while (0) CHECK:MACRO_ARG_REUSE: Macro argument reuse 'gm' - possible side-effects? #188: FILE: drivers/net/mlx5/mlx5_flow_dv.c:71: +#define MLX5_ITEM_UPDATE(item, key_type, v, m, gm) \ + do { \ + if ((key_type) == MLX5_SET_MATCHER_SW_V) { \ + v = (item)->spec; \ + m = (item)->mask ? (item)->mask : (gm); \ + } else if ((key_type) == MLX5_SET_MATCHER_HS_V) { \ + v = (item)->spec; \ + m = (v); \ + } else { \ + v = (item)->mask ? (item)->mask : (gm); \ + m = (v); \ + } \ + } while (0) total: 0 errors, 0 warnings, 7 checks, 3615 lines checked