From nobody Thu Apr 20 11:52:23 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q2GHD4byPz45yvH; Thu, 20 Apr 2023 11:52:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q2GHD0zw6z44cB; Thu, 20 Apr 2023 11:52:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681991544; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wyj+228PtfOuflqeWXfYvoJRCsWGeSnYllNm1XrCUwc=; b=h1oMjmVgabB/A6v2buxGNfSE4GdlQUiRImdTAIfzlA47iTOxtpcennCbj8qisiY1TmTWiv Biq9h0JdP1jmIkTBJPGDbVaDCKzCbsHKsOV7zL0NHf8GjEAGw5GD0cv7MaPdlEa/Eqr3LI UsIx2cYJ28sUef6Z8+SysYyQYcD+S4rhwQEC8CXi9XRfNJe1gB6IseKicVgQWiPki0WAWm dk83KdT88mOacr7dqGQKbwdY62q48uT/GqLwfTP0zXiHDFNDY58oaIc61hZYJJrbgR5OtE ZMvX7Ozku7u3kTeMzfncClbCBVmR7Euv0XK8o9Yz5KRmTbyKRpjO+FS63q0kSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681991544; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wyj+228PtfOuflqeWXfYvoJRCsWGeSnYllNm1XrCUwc=; b=pY/aIoqfsyX3l4TD0PqhoPUxxAKwF4qj7egdFo0h3VMbAyEr3Z9Ba44bgY18aq5FXRpTFK MHajSab5V8carNU2afc5+FOwlnZFbzAlzfKxCSBd0Z3WZ7i1VQYviuooHX3M1DvepAqFKQ gtqiwD/cWiVjIvGhdWH094GIDIQUnzhsGy2oRYB5vy8L4ztUwwj8N1B5+by1crloMv2p6W 03WthxzN9qWWDeQpzEgPxIqC5lRSFD94eZjQlJzYBH1ZJQiRXVEmTxEtDWRNu+cfZ4WhgX qUphzGx6HOKwsBrPE/Pff+D1hv8/xPT0p1m8YCNR/svWzDCKcBsGTG2Qoi9qdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681991544; a=rsa-sha256; cv=none; b=ClCAS/2SxLPs7Y9oNSxptqUIlCbl7cZJaUkYzW9Qds+wd+nuNnOu/b57qLd+nxUQgAsIMg Bkz5wPBrNRK/LDbTB7AMhKNKCiz7T86ccyRA4no1tEBil8XTlfEMxgCCAwQ2+GKvU8tziu XWka+3tfkGN2PMZUAX/y9KDgCTVjZuT93N9cJVzxAXTkxdth248geo7RijH60CsEwHMmek sCxPl9T2A8eKxfrbcZ7o4dblHySMDDdxajUqsmS4JTTkHgVfBC8EZm4f1of8vznrd4wQUZ 1G+fxQkUve8TBB50GIdE3Npc6alNAErLzv/pczkI3LvK9GckoZ9pMJ5zmCjqFw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2GHC6w0kzcBB; Thu, 20 Apr 2023 11:52:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33KBqNnh016564; Thu, 20 Apr 2023 11:52:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33KBqNaw016563; Thu, 20 Apr 2023 11:52:23 GMT (envelope-from git) Date: Thu, 20 Apr 2023 11:52:23 GMT Message-Id: <202304201152.33KBqNaw016563@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 74e908b3c63b - main - LinuxKPI: fix READ_ONCE() -Wcast-equal warnings List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 74e908b3c63b28de1d590dc42502fbe959a6da2e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=74e908b3c63b28de1d590dc42502fbe959a6da2e commit 74e908b3c63b28de1d590dc42502fbe959a6da2e Author: Bjoern A. Zeeb AuthorDate: 2023-04-19 21:43:59 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-04-20 11:51:22 +0000 LinuxKPI: fix READ_ONCE() -Wcast-equal warnings Rather than using ACCESS_ONCE() in READ_ONCE() add a missing cast to const in order to satisfy -Wcast-equal by gcc. Sadly we cannot do the same to WRITE_ONCE() which still is very noisy. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D39706 --- sys/compat/linuxkpi/common/include/linux/compiler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/compiler.h b/sys/compat/linuxkpi/common/include/linux/compiler.h index 87a37228736f..801618e15f9f 100644 --- a/sys/compat/linuxkpi/common/include/linux/compiler.h +++ b/sys/compat/linuxkpi/common/include/linux/compiler.h @@ -98,7 +98,7 @@ #define READ_ONCE(x) ({ \ __typeof(x) __var = ({ \ barrier(); \ - ACCESS_ONCE(x); \ + (*(const volatile __typeof(x) *)&(x)); \ }); \ barrier(); \ __var; \