From nobody Mon Nov 25 05:09:34 2024 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=1715369220; cv=none; d=zohomail.com; s=zohoarc; b=edmCON/nDCO7lO1+8+x0keGq00a4+bAlyXS93KT58hzoOQneFx82amuno+eN4Md/owphCJNoexu8AbjViKOn2Cseuftr7G9PPVipqRgi53P79rgJA4i/yNFIzGbNZkQqQIN0kQ12plMQkE2D4ywLJW+zdiBfUotEO2LEUMu5koo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1715369220; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=C1zO85bs5eljBEee9OS77+rFx14ErRnjC85N7aXgk4I=; b=l4Suy4hrLvI2WxLBkkC1tkMpwl4wVYAlqVAsBNPV5TsrWF/o0pEzAifFVu/AHMLlh2qWmGLgj6euYyx1WXbnDybTC/oVgSYzIwnekrRLG+Qkp3z7/zYOCh32d3D92VzqpHtytYtp8UCKR1nG3GOTyiUq607XwHMQUa/ogenkbjA= 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 1715369220366858.4082059714824; Fri, 10 May 2024 12:27:00 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.720035.1122967 (Exim 4.92) (envelope-from ) id 1s5Vt7-0000Ul-JU; Fri, 10 May 2024 19:26:37 +0000 Received: by outflank-mailman (output) from mailman id 720035.1122967; Fri, 10 May 2024 19:26:37 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s5Vt7-0000Ue-F3; Fri, 10 May 2024 19:26:37 +0000 Received: by outflank-mailman (input) for mailman id 720035; Fri, 10 May 2024 19:26:36 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s5Vt6-0000UW-Au for xen-devel@lists.xenproject.org; Fri, 10 May 2024 19:26:36 +0000 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [2a00:1450:4864:20::633]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 35efeb63-0f03-11ef-b4bb-af5377834399; Fri, 10 May 2024 21:26:33 +0200 (CEST) Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a59a64db066so632204866b.3 for ; Fri, 10 May 2024 12:26:33 -0700 (PDT) Received: from andrewcoop.citrite.net (default-46-102-197-194.interdsl.co.uk. [46.102.197.194]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5733becfcccsm2126414a12.40.2024.05.10.12.26.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 12:26:32 -0700 (PDT) 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: 35efeb63-0f03-11ef-b4bb-af5377834399 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1715369193; x=1715973993; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=C1zO85bs5eljBEee9OS77+rFx14ErRnjC85N7aXgk4I=; b=sJrgcjIa1trWeMP1i2RvNfRdWslT3uhJG3W57pmVRrTXvwbCo7j9tg1rZAhpDpg77Q Gf2fNSZHSsFmLfktPBGmMpfWs7lnYyqPD8tU+5FhZVU9Bgb5m4YdwPaQNCJNyegzjZhU dDOXJTVNVBiKuVx+6TbNwtUb/Qp5P9iHB2P3U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715369193; x=1715973993; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=C1zO85bs5eljBEee9OS77+rFx14ErRnjC85N7aXgk4I=; b=ozpiAXZsTGmXhwOBFDb9px8h0Okj2G18RhAmX2yNRp1/F70kvahWVZgDwMe/FVf8mD CrUXldDXuyk/7JkIZSVD2Y1enwuK1VlUixNdJ53NwpzIJQk+jDEn3ov6Y10KpxnqT3j0 vuHgiWlS4hJXBrZxhMhsgr6iRrgkwl3/0fC6hRS5iF8Dp5zH8+dS8RAXSC6ahfEeHg7t ScJTRD6FKbjiEcvY2+oenZ8OAWWauuu62baF89f8nZjK2UFOGRIUTgT6pqv5S1GgB5gD X8KDqpeNxti0opDNNZJLHgQkNRLE26C27HXZHtSAn+xyxsJqfo+YvEuLBk3jPRzX+rdb /Rug== X-Gm-Message-State: AOJu0Yzt+dlrBNASSE3SJZ8g3qaNihKcwQ5niJSUMbUQh10jgQ/7CKdS 3eb5NnbnubOsI7fqWqsN5KxR9fKaIZMp3Cz6SvydLy9amg5nVgjyrFQOKNa/Fv3SkyhlDSSrx3a P X-Google-Smtp-Source: AGHT+IE+6E5bagkzJq1ZWGqkrY22ZhIBGiY1ImI4WyxLzIQ7QwP/vbDCvTIW315SL3+aX6aLBUfbeA== X-Received: by 2002:a50:ee86:0:b0:573:4f61:ca9c with SMTP id 4fb4d7f45d1cf-5734f61cafemr2001581a12.4.1715369192998; Fri, 10 May 2024 12:26:32 -0700 (PDT) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= , Stefano Stabellini , Nicola Vetrini , "consulting @ bugseng . com" Subject: [PATCH] x86/io: Don't cast away constness in read{b..q}() Date: Fri, 10 May 2024 20:26:31 +0100 Message-Id: <20240510192631.2296870-1-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.30.2 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: 1715369221082100001 Addresses various MISRA R11.8 violations. Signed-off-by: Andrew Cooper Reviewed-by: Stefano Stabellini --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 CC: Marek Marczykowski-G=C3=B3recki CC: Stefano Stabellini CC: Nicola Vetrini CC: consulting@bugseng.com --- xen/arch/x86/include/asm/io.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/include/asm/io.h b/xen/arch/x86/include/asm/io.h index 9b19d2d389ee..1cb4217cff39 100644 --- a/xen/arch/x86/include/asm/io.h +++ b/xen/arch/x86/include/asm/io.h @@ -4,10 +4,10 @@ #include #include =20 -#define readb(x) (*(volatile uint8_t *)(x)) -#define readw(x) (*(volatile uint16_t *)(x)) -#define readl(x) (*(volatile uint32_t *)(x)) -#define readq(x) (*(volatile uint64_t *)(x)) +#define readb(x) (*(const volatile uint8_t *)(x)) +#define readw(x) (*(const volatile uint16_t *)(x)) +#define readl(x) (*(const volatile uint32_t *)(x)) +#define readq(x) (*(const volatile uint64_t *)(x)) #define writeb(d,x) (*(volatile uint8_t *)(x) =3D (d)) #define writew(d,x) (*(volatile uint16_t *)(x) =3D (d)) #define writel(d,x) (*(volatile uint32_t *)(x) =3D (d)) base-commit: b0082b908391b29b7c4dd5e6c389ebd6481926f8 --=20 2.30.2