From nobody Mon Jul 15 12:38:33 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 4WN1vt2PMCz5Qrf7; Mon, 15 Jul 2024 12:38:34 +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 4WN1vt0j3Fz4J8x; Mon, 15 Jul 2024 12:38:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721047114; 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=O//O6kGNo3mvuIu+L4a210tvfPvVvkEumtTVoi57Qg4=; b=Goa1i5WKde7bkMyd/BIVRvFaAAoDoOCAe9ndyCwydl/ZP0gwKp6POfpnEyN+PhVHYxggYn 0pFlgjPdml+BZvkH4Iwe5LILu0jUPJT39i7vF5YdFjX32zoM+g1U6m8HR9guF8W4JGBBHC cji3LQuuL5tgYcIFwHnH5F3ZsZTZZfDnvziBIbxOZbIEeKE7kzPblaeTL6Q7DQPOcXFiYh LYOxCuwN7yeRevA3ZyaY2a7hdl0WXtKN5F/bijNFIyLG03rjTlQB7hsjU2QhRBY7kqSEKD sMiULxBHyQ8hm0UQA/61u5tSYQSUEi0qk3e4Jqxxdp4R/HYOd9rg83qp9wxDRA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721047114; a=rsa-sha256; cv=none; b=NIrO/zoe1eDcWha9q74Ss8MLQb2cdI1QGrE/XnIR3nl+ACHAkJDrs46cQ6bT5/85K0qNJ0 xPOsIPYDi3Ai3zIg5P9Cr58dmA28cHqtxXbikDsUf7lsyzaJf/L0WbGcIitPJiEIkBAwr6 cHipaG//tt+XDvRH60z/wqwV+ETcDrnY8vQfxd2AqbcANtziSN2YoDl3RV7DkEwCbrHetW 43vk3X7Go0pfUo7dobRCl3o8W4k0fPdTN3V2pOOmf9gRZbc25FF4qJJFIzqxKw/ZqqFJvG E/Kha9ADvkgBXhZ/kiWIvxI33iA+nOhoQ3mkttqcLMF9DSnJH7wqtGX46uGntQ== 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=1721047114; 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=O//O6kGNo3mvuIu+L4a210tvfPvVvkEumtTVoi57Qg4=; b=skjxLNWBDzSEbuyrpoujRd8NPgifEuzFioaN7qFJ1TUGOsK+lTQh5qVEmRRrXDuOLNkmTW 3i65MZYW6/Su96iwAAj6OQHKwl0QSEXjxtGKGUBqHj5JcqEslm+lB2FP6WUPeNnYEEiINg 7uP5CGPxCJm4BlBT7xm4WNzQKiCs9tKR89nqXHcOLRthqlY78WCm4T9QyBXKoEcVAF7a32 s9Z18aOT9DhD4DgMun/ZLLlp106+e1YGwJpXNAxdIm1uPUdI4aSAZFVAdN7ekesrg8u+2A Wf0zHj3xs0XEMYP+ULjwv4jCL0pwal+v2YYzDb8WO2C6D4mBWsfog/y0P8R38w== 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 4WN1vt0KLpzsJR; Mon, 15 Jul 2024 12:38:34 +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 46FCcX5j061959; Mon, 15 Jul 2024 12:38:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46FCcXmr061956; Mon, 15 Jul 2024 12:38:33 GMT (envelope-from git) Date: Mon, 15 Jul 2024 12:38:33 GMT Message-Id: <202407151238.46FCcXmr061956@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: 77d05874de8e - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: 77d05874de8eaa05725b414b7217becdb85ed037 Auto-Submitted: auto-generated The branch stable/14 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=77d05874de8eaa05725b414b7217becdb85ed037 commit 77d05874de8eaa05725b414b7217becdb85ed037 Author: Andrew Turner AuthorDate: 2024-06-12 13:04:45 +0000 Commit: Andrew Turner CommitDate: 2024-07-15 12:28:53 +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 b170f2b637f9..d2cc680796ef 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 3ee17a847720..7ace287b1c88 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)