From nobody Mon Jul 15 12:38:36 2024 X-Original-To: dev-commits-src-all@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 4WN1vx0L04z5Qry7; Mon, 15 Jul 2024 12:38:37 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WN1vw5p0wz4J07; Mon, 15 Jul 2024 12:38:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721047116; 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=kSw48Tu+kgLSzAcjo6KypmYl9tb54m8tuNW5hpuUqr4=; b=JEYfgf0jp9dSqnfOF7w13pWKC3EfSqtJGpObrBc7bvbpVrS+3VghFYDxDp5Col3bI1zuWg VYwLSg/2aIuubiAdSA6bC0o7SVhRw8zTqximN4oeWR8ZzmB+yHKKOKiN5g4hYg/E7VMHsS gfSLz8rNiYqizIsS61tGrLLY17ttUidTzouU92GQdhu3MjXKI2mTIy4IUQVSuOsFs+VzXj E8bcfLi+miG/VsicAX8RXaq30o2/JBGqJNJBoo8m6sps5/Y8kuG9GRteNCHEm+B6sbfA07 EFj2f9eVWJ4RnajTe7dqnzGFgxFx185HDqCPZGF9/41unu85ZAId6kURqOOvDA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721047116; a=rsa-sha256; cv=none; b=Z4G3H41ohzknnrbxXY8HTmKc78BjbVQJ46JfwvHV/DIvBref26sv6cleHKHxv/C8Zd/LZI 13/m2cbVdrwfhTouI3Roc2Io+SKk9e/zDQ8aTDtdFZMorpcAafiJWG7/qbaee0pVI1xbeO 9D3UtsV7VCg6U2sReGs0VFgXQjd0chmeH3iCgyrMwYXILzo5WOs8lozhByJUhmoqO3wUHu C1GRl8ic5GMKCfsaXqcjZhj/wfVXOBcrbCZEy3ebi+2hizx4gX0b1q+iqnjw+tmcJdZCFZ NX1fAjPEKldJMgJvnFZhmqkcTkmWTpWES2l6XxVwiHv8QM8nyOgPrNrqI9NmiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721047116; 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=kSw48Tu+kgLSzAcjo6KypmYl9tb54m8tuNW5hpuUqr4=; b=aJNC9s1rqs8efHx1mwJ+YVI7cxaSgpKYBh2xB2DFhfySSntUk/DYDYTJYPcGe0T3a/x5Si HhpuQyjHNgLLdThI9+PDF7csB7YXGgJXDmhxxJwap17/laMvgSIyRuf2hBFdg/BwTzmgDR uWwsoLgR7DNPP/driaavJOGQF/8BoMrgdZHC4I2pCdySFUrbrkzvuBS3neV+0BEleQYmgg hYLWQGMRG+wglDHzAq1ZlvBOai08nTw60AlAJA/C+q38VlHPsor6XAuvX1HtkyZir/Uhay qH7HRdUd97H1FdgkhjktqHeDNXCLYuATydNrnoKSCF6mVUlzc6Lo8gI8AnGn0w== 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 4WN1vw4hJWzspK; Mon, 15 Jul 2024 12:38:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46FCcatR062189; Mon, 15 Jul 2024 12:38:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46FCcapO062186; Mon, 15 Jul 2024 12:38:36 GMT (envelope-from git) Date: Mon, 15 Jul 2024 12:38:36 GMT Message-Id: <202407151238.46FCcapO062186@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: 4de39679dc35 - stable/13 - ibcore: Mark write-only variables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4de39679dc35cc9a7b02de0ed8584db3656ca288 Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=4de39679dc35cc9a7b02de0ed8584db3656ca288 commit 4de39679dc35cc9a7b02de0ed8584db3656ca288 Author: Andrew Turner AuthorDate: 2024-06-12 13:04:45 +0000 Commit: Andrew Turner CommitDate: 2024-07-15 12:35:21 +0000 ibcore: Mark write-only variables Some LinuxKPI lock macros pass need a flags field passed in. This is written to but never read from so gcc complains. Fix this by marking the flags variables as unused to quieten the compiler. Reviewed by: brooks (earlier version), kib Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45303 (cherry picked from commit 19782e5bef3403a6ed65d46653f2e70f81dced37) --- sys/ofed/drivers/infiniband/core/ib_cache.c | 16 ++++++++-------- sys/ofed/drivers/infiniband/core/ib_cm.c | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sys/ofed/drivers/infiniband/core/ib_cache.c b/sys/ofed/drivers/infiniband/core/ib_cache.c index 0c6eef74594b..647a5fede9af 100644 --- a/sys/ofed/drivers/infiniband/core/ib_cache.c +++ b/sys/ofed/drivers/infiniband/core/ib_cache.c @@ -465,7 +465,7 @@ static int _ib_cache_gid_table_find(struct ib_device *ib_dev, struct ib_gid_table *table; u8 p; int local_index; - unsigned long flags; + unsigned long flags __writeonly; for (p = 0; p < ib_dev->phys_port_cnt; p++) { table = ports_table[p]; @@ -514,7 +514,7 @@ int ib_find_cached_gid_by_port(struct ib_device *ib_dev, unsigned long mask = GID_ATTR_FIND_MASK_GID | GID_ATTR_FIND_MASK_GID_TYPE; struct ib_gid_attr val = {.ndev = ndev, .gid_type = gid_type}; - unsigned long flags; + unsigned long flags __writeonly; if (!rdma_is_port_valid(ib_dev, port)) return -ENOENT; @@ -570,7 +570,7 @@ static int ib_cache_gid_find_by_filter(struct ib_device *ib_dev, struct ib_gid_table **ports_table = ib_dev->cache.gid_cache; struct ib_gid_table *table; unsigned int i; - unsigned long flags; + unsigned long flags __writeonly; bool found = false; if (!ports_table) @@ -879,7 +879,7 @@ int ib_get_cached_gid(struct ib_device *device, struct ib_gid_attr *gid_attr) { int res; - unsigned long flags; + unsigned long flags __writeonly; struct ib_gid_table **ports_table = device->cache.gid_cache; struct ib_gid_table *table = ports_table[port_num - rdma_start_port(device)]; @@ -929,7 +929,7 @@ int ib_get_cached_pkey(struct ib_device *device, u16 *pkey) { struct ib_pkey_cache *cache; - unsigned long flags; + unsigned long flags __writeonly; int ret = 0; if (!rdma_is_port_valid(device, port_num)) @@ -956,7 +956,7 @@ int ib_find_cached_pkey(struct ib_device *device, u16 *index) { struct ib_pkey_cache *cache; - unsigned long flags; + unsigned long flags __writeonly; int i; int ret = -ENOENT; int partial_ix = -1; @@ -997,7 +997,7 @@ int ib_find_exact_cached_pkey(struct ib_device *device, u16 *index) { struct ib_pkey_cache *cache; - unsigned long flags; + unsigned long flags __writeonly; int i; int ret = -ENOENT; @@ -1027,7 +1027,7 @@ int ib_get_cached_lmc(struct ib_device *device, u8 port_num, u8 *lmc) { - unsigned long flags; + unsigned long flags __writeonly; int ret = 0; if (!rdma_is_port_valid(device, port_num)) diff --git a/sys/ofed/drivers/infiniband/core/ib_cm.c b/sys/ofed/drivers/infiniband/core/ib_cm.c index 51b16cb84c1d..363b6abc79fe 100644 --- a/sys/ofed/drivers/infiniband/core/ib_cm.c +++ b/sys/ofed/drivers/infiniband/core/ib_cm.c @@ -4057,7 +4057,7 @@ static void cm_add_one(struct ib_device *ib_device) struct ib_port_modify port_modify = { .set_port_cap_mask = IB_PORT_CM_SUP }; - unsigned long flags; + unsigned long flags __writeonly; int ret; int count = 0; u8 i; @@ -4150,7 +4150,7 @@ static void cm_remove_one(struct ib_device *ib_device, void *client_data) struct ib_port_modify port_modify = { .clr_port_cap_mask = IB_PORT_CM_SUP }; - unsigned long flags; + unsigned long flags __writeonly; int i; if (!cm_dev)