From nobody Wed Jun 12 15:51:03 2024 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 4VzqlC4cZ7z5MxZc; Wed, 12 Jun 2024 15:51:03 +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 4VzqlC3kM5z4Ywc; Wed, 12 Jun 2024 15:51:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718207463; 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=qRGhfW0rxgv9/6q7RuI2ynOBM8WSYVV9uyz2A38/uFo=; b=X19Co20vScXC48NaOj0kpt2Pf2ff7wckux4OqcFmHPzHlpE+Z5Hc1klGq+erYXegyoLKom NqbBV3mED4Q2HGJZrQ3DZWfJBoxhGeizJgkbGTSXH8jIB11rW3lIiIu8gnLtwPjdwPPaat fC6MMAGouYWXDuRQOVZGku0bTiA5Y1b07VSuSTutYvSuq+OVjFFZ11cx9eUOLbh7PQto6Y TIJSLLBcco1ZzvsQ9oc8g0f/r5sKdEMl6nwrO/0U0J0X3h5irbuLfhkf6Is+11c1qfmgYA PVsgmeYPvoHmaHeAIKjFHpyH4uPwlhZprs6gS+a+mL1PHJxYU5U/p3hzZjXLYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718207463; a=rsa-sha256; cv=none; b=WCpv2Ync4td9kT5+eNAND5XRDaa0V8GwFhx22n/Lo5lm0wqTZcHEScTK/zj3kCvohmSi4V tG8E0vsW/25A0EeQsTlAu4MmjSywNBdfGYp4Aqf67IzqjDPKXzzfXMcnWai0E/7Urkzn+9 zgIAg4xvPl6g5AE6CmHTkZiz/BvT3afZFoTnm7rwXqrkReMXU92h5hbLXkbiY7vpBKJMd8 lyDcuxXV9Orm71evVhMdcpsZ8UEt0QflRLN6LH1QZtCaZDZnxAWokRdMkCDsCsl7aLiESV qrE5QUIArIZsRZzVHjS57Il3sl9i5N7ufhEyBXrdpNQsSvo3FyT0mdCS6jPF2A== 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=1718207463; 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=qRGhfW0rxgv9/6q7RuI2ynOBM8WSYVV9uyz2A38/uFo=; b=yvPhyw43p3daqZoUnDJQf8GtJZgVRCfCxRzJPH/m6FJiXwRFC5680IaYxZm+tdu++Fs58Z 6ogAB5Dtvbrkvh1StEA2U7Idvf5FG5DrZLXpNQZY4Q80zfbHij6V2ussoO6ZSlZLeRy/k0 qmR044uVkL6NhkpdupFXVJhE5ijDyqHnnL46IMN01Tf+1Hj8SJeNYVdGwS2t8MBdLQ8GJr kx9vsbI5hUzOEhE9TWTYXOq+7zIl/8bSYrqamZrgzfPYYczSJkYLZA1MXeG5nlZ/8mKhGL v2dkS3D1D6nPBmLaPepzlWqIiviDc/rRKr1jHE+591ePsGwp8oSwoGus44qjsg== 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 4VzqlC3Kpmz101s; Wed, 12 Jun 2024 15:51:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CFp3un057470; Wed, 12 Jun 2024 15:51:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CFp3Nl057467; Wed, 12 Jun 2024 15:51:03 GMT (envelope-from git) Date: Wed, 12 Jun 2024 15:51:03 GMT Message-Id: <202406121551.45CFp3Nl057467@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 19782e5bef34 - main - ibcore: Mark write-only variables 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 19782e5bef3403a6ed65d46653f2e70f81dced37 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=19782e5bef3403a6ed65d46653f2e70f81dced37 commit 19782e5bef3403a6ed65d46653f2e70f81dced37 Author: Andrew Turner AuthorDate: 2024-06-12 13:04:45 +0000 Commit: Andrew Turner CommitDate: 2024-06-12 13:04:45 +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 --- 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)