From nobody Tue Mar 3 05:12:18 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1771624059; cv=none; d=zohomail.com; s=zohoarc; b=HBytl3MdIPPOuj6eFY8evMwmzAf7lC2aY/9iYlqopKKFGjs6IM9QQJLZB/I1aBW2oMvMcWBT/CfuUzDxEJqoydOznuQtYOvOZ2LQwnVeaDkWBXHUadZRXKS+A7KQM/2puHBMn2lPuWlvQWhM3Ta5Smu2rcQMK9RKdKryiZlcOok= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1771624059; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=QL0YluuNljQpopZEfgU7W97F1VvgWXQ8YTIYrdrO7hc=; b=emLAJWtIrSaK7mCc1q8F4WtrPAGzK9FB/qxVtputcHqqG5OwjhN07S+NzyF2Aa6x5ggpoCYQorCSnm7th6iP5+hO+o3dVn3oPP77Nxp6zFVvPQRA8mSJxBSI2rWUO4Z7zAMJtYxjZVhVgVRICMp6aYGTahSV8N3/zdRsnBFM5gw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1771624059032302.7322719681099; Fri, 20 Feb 2026 13:47:39 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.1237619.1539950 (Exim 4.92) (envelope-from ) id 1vtYLE-0002NW-R4; Fri, 20 Feb 2026 21:47:16 +0000 Received: by outflank-mailman (output) from mailman id 1237619.1539950; Fri, 20 Feb 2026 21:47:16 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vtYLE-0002KG-Cf; Fri, 20 Feb 2026 21:47:16 +0000 Received: by outflank-mailman (input) for mailman id 1237619; Fri, 20 Feb 2026 21:47:13 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vtYLB-0008Ew-Cs for xen-devel@lists.xenproject.org; Fri, 20 Feb 2026 21:47:13 +0000 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [2a00:1450:4864:20::430]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id b61d39a9-0ea5-11f1-b164-2bf370ae4941; Fri, 20 Feb 2026 22:47:11 +0100 (CET) Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-436356740e6so2654077f8f.2 for ; Fri, 20 Feb 2026 13:47:11 -0800 (PST) Received: from localhost.localdomain (host-92-22-18-152.as13285.net. [92.22.18.152]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-483a8df83bcsm28940205e9.13.2026.02.20.13.47.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Feb 2026 13:47:10 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: b61d39a9-0ea5-11f1-b164-2bf370ae4941 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1771624031; x=1772228831; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QL0YluuNljQpopZEfgU7W97F1VvgWXQ8YTIYrdrO7hc=; b=Q2M2FZisofsQDWxzuJLABo41tKT3ptdHqJDDaU5HpZVCoGqDc0Bm32JHdghcTbVbzE zFUGHHOxTNaAQLXZiB13yVBzhP6KhSRhxJ4B8Vte/RhZrdHRQYZhFM+nuOWj2mpEf+uK WPP6A4B43Ed1Wf48s67ZDHMHWEUcU0B3ZQT4g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771624031; x=1772228831; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=QL0YluuNljQpopZEfgU7W97F1VvgWXQ8YTIYrdrO7hc=; b=WcWZXIK1XI5IpTFiP+/cgyz7VSdaaoiUjTtY9dm0lTb1SN2bDsSWY4oN4H5jwnouYY SiGF3K/twIYDAPO/Qu6eMQcxQ66FjpFKmdlVcAHIEb2N5uKPsYg3K7oFGpEYKeXBnYkA Jl+JxlxM+zfxcTm7ZnYL6qtLVjcC93TbKCIFkoUY0NK+3JnpR38HRM/ShoxyxxlNbtVZ yvsdnXhPCEBqhYxWC56eyinwHBVVvyi7HVpZqAKVzM5z3Vw0Nz3ytqBUFLc25dGwN8yi uO7yycp3hgG++CcjmBmegTmzCverV3FGsIs1kY0Fotj6I3/yF+UDk+cvmUG6KIz6JgsA DgpA== X-Gm-Message-State: AOJu0Yx/fs0RPfQrmkzYwEsQV64oth7aGScxVBmup8YQYpAPNuaOFjjb qVhylPCbp62mAQkggJC38WLMiS3LGHf0vNc7XzKA37lquEmu6EceXiZRNGo6xIOwrkkZQZWWTrK H+I7pDaATNA== X-Gm-Gg: AZuq6aLlIHR4MJwhmMdYzJMLeUpnvc3AxqR5MfYo6TWLjyzzJrNj6OY2pkIIo4os9rQ QrujDU56iGtmWn/CCrJkaWpTHKaJh+/lLFhI6cYQmYmXSeEDFgApJZsGGGGrmM2I3DgKJgmHPE9 MLC1yFcumgmGKX64KfY3KkPMT/paimpLvcAoRPRPSPCViEMNyhmJFjFBZYgW1hf4tDQIVbSmfE+ evnPgqo5B2ly2fSe3Nguduyqkf1hP96AkMlycQUk4tTEN2GI3poEQZ9EhHuEItFgPs+5+p+ZAoU iyxwFnfUVLQzMEgwl6bwNoPOk4G2bXezPCas5NfU+fivsa0mK15Z4aJzx3TmGanI8NPGCwAJ7SR bmffEHuQw/6g57XsmlvQRjYtqS6p544baKwoDV5ntAxoLm9WZto8aBY+8ozAucVTDYSDozaTM6B 00S+HZ6sZYeF25fghn5qV+ZXodwbr2KI2zWuYE1GR74duDlrWInpK02SpuEBgtC+aybqb1ZEQ= X-Received: by 2002:a05:600c:3b10:b0:483:43da:6c87 with SMTP id 5b1f17b1804b1-483a963d603mr13512275e9.33.1771624030450; Fri, 20 Feb 2026 13:47:10 -0800 (PST) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Stefano Stabellini , Julien Grall , Volodymyr Babchuk , Bertrand Marquis , Michal Orzel , "consulting @ bugseng . com" , Nicola Vetrini Subject: [PATCH 11/12] xen: Bracket uses of macro parameters Date: Fri, 20 Feb 2026 21:46:52 +0000 Message-Id: <20260220214653.3497384-12-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20260220214653.3497384-1-andrew.cooper3@citrix.com> References: <20260220214653.3497384-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1771624061087158500 Fixing Rule 20.7 violations. No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Michal Orzel Reviewed-by: Nicola Vetrini --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 CC: Stefano Stabellini CC: Julien Grall CC: Volodymyr Babchuk CC: Bertrand Marquis CC: Michal Orzel CC: consulting@bugseng.com CC: Nicola Vetrini --- xen/arch/arm/pci/pci-access.c | 6 +++--- xen/arch/x86/include/asm/bootinfo.h | 2 +- xen/arch/x86/mm/shadow/multi.c | 2 +- xen/common/kimage.c | 11 ++++++----- xen/common/livepatch.c | 11 ++++++----- xen/crypto/vmac.c | 8 ++++---- xen/include/xen/libfdt/libfdt.h | 6 +++--- 7 files changed, 24 insertions(+), 22 deletions(-) diff --git a/xen/arch/arm/pci/pci-access.c b/xen/arch/arm/pci/pci-access.c index 2b23d552bbfb..7bd6877596d4 100644 --- a/xen/arch/arm/pci/pci-access.c +++ b/xen/arch/arm/pci/pci-access.c @@ -16,7 +16,7 @@ #include =20 #define INVALID_VALUE (~0U) -#define PCI_ERR_VALUE(len) GENMASK(0, len * 8) +#define PCI_ERR_VALUE(len) GENMASK(0, (len) * 8) =20 static const struct pci_ops *get_ops(struct pci_host_bridge *bridge, pci_sbdf_t sbdf) @@ -139,14 +139,14 @@ static void pci_config_write(pci_sbdf_t sbdf, unsigne= d int reg, void pci_conf_write##size(pci_sbdf_t sbdf, \ unsigned int reg, type data) \ { \ - pci_config_write(sbdf, reg, size / 8, data); \ + pci_config_write(sbdf, reg, (size) / 8, data); \ } =20 #define PCI_OP_READ(size, type) \ type pci_conf_read##size(pci_sbdf_t sbdf, \ unsigned int reg) \ { \ - return pci_config_read(sbdf, reg, size / 8); \ + return pci_config_read(sbdf, reg, (size) / 8); \ } =20 PCI_OP_READ(8, uint8_t) diff --git a/xen/arch/x86/include/asm/bootinfo.h b/xen/arch/x86/include/asm= /bootinfo.h index 4f2cc5906e59..b3a6b2acf3ac 100644 --- a/xen/arch/x86/include/asm/bootinfo.h +++ b/xen/arch/x86/include/asm/bootinfo.h @@ -75,7 +75,7 @@ static inline unsigned int __init next_boot_module_index( #define for_each_boot_module_by_type(i, b, t) \ for ( (i) =3D first_boot_module_index(b, t); \ (i) <=3D (b)->nr_modules; \ - (i) =3D next_boot_module_index(b, t, i + 1) ) + (i) =3D next_boot_module_index(b, t, (i) + 1) ) =20 #endif /* X86_BOOTINFO_H */ =20 diff --git a/xen/arch/x86/mm/shadow/multi.c b/xen/arch/x86/mm/shadow/multi.c index 3bbaceec1287..9de60720db20 100644 --- a/xen/arch/x86/mm/shadow/multi.c +++ b/xen/arch/x86/mm/shadow/multi.c @@ -793,7 +793,7 @@ do { = \ do { \ int __done =3D 0; \ _FOREACH_PRESENT_L1E(_sl1mfn, _sl1e, _gl1p, \ - ({ (__done =3D _done); }), _code); \ + ({ (__done =3D (_done)); }), _code); \ _sl1mfn =3D sh_next_page(_sl1mfn); \ if ( !__done ) \ _FOREACH_PRESENT_L1E(_sl1mfn, _sl1e, _gl1p, _done, _code); \ diff --git a/xen/common/kimage.c b/xen/common/kimage.c index e1aec5a18a54..972301368443 100644 --- a/xen/common/kimage.c +++ b/xen/common/kimage.c @@ -491,11 +491,12 @@ static void kimage_terminate(struct kexec_image *imag= e) * Call unmap_domain_page(ptr) after the loop exits. */ #define for_each_kimage_entry(image, ptr, entry) \ - for ( ptr =3D map_domain_page(_mfn(paddr_to_pfn(image->head))); \ - (entry =3D *ptr) && !(entry & IND_DONE); \ - ptr =3D (entry & IND_INDIRECTION) ? \ - (unmap_domain_page(ptr), map_domain_page(_mfn(paddr_to_pfn(e= ntry)))) \ - : ptr + 1 ) + for ( (ptr) =3D map_domain_page(_mfn(paddr_to_pfn((image)->head))); \ + ((entry) =3D *(ptr)) && !((entry) & IND_DONE); \ + (ptr) =3D (((entry) & IND_INDIRECTION) \ + ? (unmap_domain_page(ptr), \ + map_domain_page(_mfn(paddr_to_pfn(entry)))) \ + : (ptr) + 1) ) =20 static void kimage_free_entry(kimage_entry_t entry) { diff --git a/xen/common/livepatch.c b/xen/common/livepatch.c index 7446533c8cfb..63473925cafb 100644 --- a/xen/common/livepatch.c +++ b/xen/common/livepatch.c @@ -664,9 +664,10 @@ static inline int livepatch_check_expectations(const s= truct payload *payload) const struct livepatch_elf_sec *__sec =3D livepatch_elf_sec_by_name(el= f, section_name); \ if ( !__sec ) = \ break; = \ - if ( !section_ok(elf, __sec, sizeof(*hook)) || __sec->sec->sh_size != =3D sizeof(*hook) ) \ + if ( !section_ok(elf, __sec, sizeof(*(hook))) || = \ + __sec->sec->sh_size !=3D sizeof(*(hook)) ) = \ return -EINVAL; = \ - hook =3D __sec->addr; = \ + (hook) =3D __sec->addr; = \ } while (0) =20 /* @@ -678,10 +679,10 @@ static inline int livepatch_check_expectations(const = struct payload *payload) const struct livepatch_elf_sec *__sec =3D livepatch_elf_sec_by_name(el= f, section_name); \ if ( !__sec ) = \ break; = \ - if ( !section_ok(elf, __sec, sizeof(*hook)) ) = \ + if ( !section_ok(elf, __sec, sizeof(*(hook))) ) = \ return -EINVAL; = \ - hook =3D __sec->addr; = \ - nhooks =3D __sec->sec->sh_size / sizeof(*hook); = \ + (hook) =3D __sec->addr; = \ + (nhooks) =3D __sec->sec->sh_size / sizeof(*(hook)); = \ } while (0) =20 static int prepare_payload(struct payload *payload, diff --git a/xen/crypto/vmac.c b/xen/crypto/vmac.c index c9914d2c7c1d..c7aa1e9be3b9 100644 --- a/xen/crypto/vmac.c +++ b/xen/crypto/vmac.c @@ -203,7 +203,7 @@ const uint64_t mpoly =3D UINT64_C(0x1fffffff1fffffff); = /* Poly key mask */ #define nh_16(mp, kp, nw, rh, rl) = \ { int i; uint64_t th, tl; = \ rh =3D rl =3D 0; = \ - for (i =3D 0; i < nw; i+=3D 2) { = \ + for (i =3D 0; i < (nw); i+=3D 2) { = \ MUL64(th,tl,get64PE((mp)+i )+(kp)[i ],get64PE((mp)+i+1)+(kp)[i+1= ]);\ ADD128(rh,rl,th,tl); = \ } = \ @@ -211,7 +211,7 @@ const uint64_t mpoly =3D UINT64_C(0x1fffffff1fffffff); = /* Poly key mask */ #define nh_16_2(mp, kp, nw, rh, rl, rh1, rl1) = \ { int i; uint64_t th, tl; = \ rh1 =3D rl1 =3D rh =3D rl =3D 0; = \ - for (i =3D 0; i < nw; i+=3D 2) { = \ + for (i =3D 0; i < (nw); i+=3D 2) { = \ MUL64(th,tl,get64PE((mp)+i )+(kp)[i ],get64PE((mp)+i+1)+(kp)[i+1= ]);\ ADD128(rh,rl,th,tl); = \ MUL64(th,tl,get64PE((mp)+i )+(kp)[i+2],get64PE((mp)+i+1)+(kp)[i+3= ]);\ @@ -223,7 +223,7 @@ const uint64_t mpoly =3D UINT64_C(0x1fffffff1fffffff); = /* Poly key mask */ #define nh_vmac_nhbytes(mp, kp, nw, rh, rl) = \ { int i; uint64_t th, tl; = \ rh =3D rl =3D 0; = \ - for (i =3D 0; i < nw; i+=3D 8) { = \ + for (i =3D 0; i < (nw); i+=3D 8) { = \ MUL64(th,tl,get64PE((mp)+i )+(kp)[i ],get64PE((mp)+i+1)+(kp)[i+1= ]);\ ADD128(rh,rl,th,tl); = \ MUL64(th,tl,get64PE((mp)+i+2)+(kp)[i+2],get64PE((mp)+i+3)+(kp)[i+3= ]);\ @@ -237,7 +237,7 @@ const uint64_t mpoly =3D UINT64_C(0x1fffffff1fffffff); = /* Poly key mask */ #define nh_vmac_nhbytes_2(mp, kp, nw, rh, rl, rh1, rl1) = \ { int i; uint64_t th, tl; = \ rh1 =3D rl1 =3D rh =3D rl =3D 0; = \ - for (i =3D 0; i < nw; i+=3D 8) { = \ + for (i =3D 0; i < (nw); i+=3D 8) { = \ MUL64(th,tl,get64PE((mp)+i )+(kp)[i ],get64PE((mp)+i+1)+(kp)[i+1= ]);\ ADD128(rh,rl,th,tl); = \ MUL64(th,tl,get64PE((mp)+i )+(kp)[i+2],get64PE((mp)+i+1)+(kp)[i+3= ]);\ diff --git a/xen/include/xen/libfdt/libfdt.h b/xen/include/xen/libfdt/libfd= t.h index fabddbee8cec..1b09bba28eea 100644 --- a/xen/include/xen/libfdt/libfdt.h +++ b/xen/include/xen/libfdt/libfdt.h @@ -230,9 +230,9 @@ int fdt_next_subnode(const void *fdt, int offset); * literal. */ #define fdt_for_each_subnode(node, fdt, parent) \ - for (node =3D fdt_first_subnode(fdt, parent); \ - node >=3D 0; \ - node =3D fdt_next_subnode(fdt, node)) + for ((node) =3D fdt_first_subnode(fdt, parent); \ + (node) >=3D 0; \ + (node) =3D fdt_next_subnode(fdt, node)) =20 /**********************************************************************/ /* General functions */ --=20 2.39.5