From nobody Wed Jul 20 16:51:56 2022 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 4Lp1vK1LQ0z4XQKR; Wed, 20 Jul 2022 16:51:57 +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 4Lp1vK0wNRz439v; Wed, 20 Jul 2022 16:51:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658335917; 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=S20PLpJytOqWRGcvCsQNZ88OVuCjrNgd/JorYK5JUrc=; b=PVGsgMj8RX1tBnIXoShTmRG7FfPa00bq/hIWqF/0xT3i2m/k4f3b7KouQepurw1bYSsT0k k+KSfPCbc6Vb1jAqrtRgNBo9u+n36WgopUH7db0Q1/sMEmepCvhqp6MOAzkRiau4dItYGH sz0LAz+k2RecMks+ZuGqCyoxInWWfw/YBUowNZrkrZOeuKq/PJkup4jZrU5yURwyJq4gRB jSMK/GUMH79M2IdgZwMdIG2f51q3sGsKNDP7eCQehxfH5yf579WgvpTtY9eAcGkfu0s/mJ ajBMOLRkkZx+pDvqJpdcZ2L1mjYWHTnP8O+Y2iDQ1HnrKUAF3cc6R+S7EEOX4g== 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 4Lp1vK00D9z157R; Wed, 20 Jul 2022 16:51:56 +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 26KGpuAq005640; Wed, 20 Jul 2022 16:51:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26KGpu7M005639; Wed, 20 Jul 2022 16:51:56 GMT (envelope-from git) Date: Wed, 20 Jul 2022 16:51:56 GMT Message-Id: <202207201651.26KGpu7M005639@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: fde05f986418 - stable/13 - Fix clang 15 warning in cxgbe 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: fde05f986418ad174c8dd7cb8cadeb01ccc0c19e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658335917; 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=S20PLpJytOqWRGcvCsQNZ88OVuCjrNgd/JorYK5JUrc=; b=G9fnnYzrKI3iLVX6tni3Z43oE74nFHcl/G2P2s8vl5OCMWqdPGgPYWueVTzQYdy71OQ9vr qWTUcY15naP38KpY+bV2ofkvLYisA38Lbq29OqcNA8fI+r+FUUVi6FM7thsF4VDl40ka67 Gm6pfLgdYr1MXtJVyZzbgZv5gYTn1pwBLmUCsVMfG+e/Wf9Vo4mjrtOIHUlCUgG02ylVFD pz3zdcChSPWrHavOLa0YHoOZV8xrhLEBIJ7+/H7GHBKszufG1b4p73rGdLPGWuQIzYrfde K6IVQdKz3ePAfGbdhnocEk9mJwh5ZxQReq/H+QBEMKl11wwmjf3X7HzFXLbQPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658335917; a=rsa-sha256; cv=none; b=asvPphCh7Uw5BSeB9kVkDyIa5qe+5sfTuNZkEHJ5wNLD1YouzgfKDZ2TZD31M+aYLX6jl+ Q9ULJpkMLjTyg69r4KbcgvwK/gFbv8qxG7T1CuTQBKCU+y4JN9LsldQgu/IwZmoqf466jB Z+W10vEy2GDwi3HqcLTF7fwILng17zTKRHZqL2ZEmpoXOD3VrZyGKX8bJB6Ixrgpi9BNuQ x1wktrQVwxnUUCuU3Vus4DJstBK0XVq1ky6CeXtKe+MV6qqYfWkwk1NAflosfBOM2mDWEj hglyans1REgfl0OwGcSTRSxGakURRJmvib2o3WdKKssXEARY8pI8zUt6jkVz2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=fde05f986418ad174c8dd7cb8cadeb01ccc0c19e commit fde05f986418ad174c8dd7cb8cadeb01ccc0c19e Author: Dimitry Andric AuthorDate: 2022-07-16 19:19:51 +0000 Commit: Dimitry Andric CommitDate: 2022-07-20 16:51:15 +0000 Fix clang 15 warning in cxgbe Clang 15 warns: sys/dev/cxgbe/cudbg/cudbg_lib.c:2949:6: error: variable 'i' set but not used [-Werror,-Wunused-but-set-variable] int i = 0; ^ Apparently 'i' was meant as the current retry counter, but '1' was used in the while loop comparison instead, making the loop potentially infinite, if 'busy' never gets reset. MFC after: 3 days Reviewed by: np Differential Revision: https://reviews.freebsd.org/D35834 (cherry picked from commit fb0493d55998eeb9f062b15b40924ff722f3eba5) --- sys/dev/cxgbe/cudbg/cudbg_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/cxgbe/cudbg/cudbg_lib.c b/sys/dev/cxgbe/cudbg/cudbg_lib.c index dcbcb24807b9..feded8e75863 100644 --- a/sys/dev/cxgbe/cudbg/cudbg_lib.c +++ b/sys/dev/cxgbe/cudbg/cudbg_lib.c @@ -2950,7 +2950,7 @@ static int check_busy_bit(struct adapter *padap) int retry = 10; int status = 0; - while (busy & (1 < retry)) { + while (busy && i < retry) { val = t4_read_reg(padap, A_CIM_HOST_ACC_CTRL); busy = (0 != (val & CUDBG_CIM_BUSY_BIT)); i++;