From owner-dev-commits-src-all@freebsd.org Wed Sep 15 16:05:24 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5BAF86693AA; Wed, 15 Sep 2021 16:05: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 4H8lRm1HZ1z3GNt; Wed, 15 Sep 2021 16:05:24 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 0B43D10DC3; Wed, 15 Sep 2021 16:05:24 +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 18FG5Npf086321; Wed, 15 Sep 2021 16:05:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 18FG5NsZ086320; Wed, 15 Sep 2021 16:05:23 GMT (envelope-from git) Date: Wed, 15 Sep 2021 16:05:23 GMT Message-Id: <202109151605.18FG5NsZ086320@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 11647befcbb8 - main - Only define sanitizer wrappers for unsized bus space operations once. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 11647befcbb81f2fc89c29020b4be80a251ec321 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2021 16:05:24 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=11647befcbb81f2fc89c29020b4be80a251ec321 commit 11647befcbb81f2fc89c29020b4be80a251ec321 Author: John Baldwin AuthorDate: 2021-09-15 16:03:17 +0000 Commit: John Baldwin CommitDate: 2021-09-15 16:03:17 +0000 Only define sanitizer wrappers for unsized bus space operations once. Previously, this was defining duplicate definitions for each size. This fixes a redundant definition warning from GCC. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D31966 --- sys/sys/bus_san.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/sys/bus_san.h b/sys/sys/bus_san.h index fd3c4c803675..09feb0660525 100644 --- a/sys/sys/bus_san.h +++ b/sys/sys/bus_san.h @@ -93,7 +93,7 @@ int sp##_bus_space_poke_##width(bus_space_tag_t, \ bus_space_handle_t, bus_size_t, type); -#define BUS_SAN_MISC(sp) \ +#define _BUS_SAN_MISC(sp) \ int sp##_bus_space_map(bus_space_tag_t, bus_addr_t, bus_size_t, \ int, bus_space_handle_t *); \ void sp##_bus_space_unmap(bus_space_tag_t, bus_space_handle_t, \ @@ -108,14 +108,16 @@ void sp##_bus_space_barrier(bus_space_tag_t, bus_space_handle_t,\ bus_size_t, bus_size_t, int); +#define BUS_SAN_MISC(sp) \ + _BUS_SAN_MISC(sp) + #define _BUS_SAN_FUNCS(sp, width, type) \ BUS_SAN_READ(sp, width, type); \ BUS_SAN_WRITE(sp, width, type); \ BUS_SAN_SET(sp, width, type); \ BUS_SAN_COPY(sp, width, type) \ BUS_SAN_PEEK(sp, width, type); \ - BUS_SAN_POKE(sp, width, type); \ - BUS_SAN_MISC(sp); + BUS_SAN_POKE(sp, width, type) #define BUS_SAN_FUNCS(width, type) \ _BUS_SAN_FUNCS(SAN_INTERCEPTOR_PREFIX, width, type) @@ -124,6 +126,7 @@ BUS_SAN_FUNCS(1, uint8_t); BUS_SAN_FUNCS(2, uint16_t); BUS_SAN_FUNCS(4, uint32_t); BUS_SAN_FUNCS(8, uint64_t); +BUS_SAN_MISC(SAN_INTERCEPTOR_PREFIX); #ifndef SAN_RUNTIME