From nobody Wed Jun 26 08:21:03 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 4W8F5W5qzvz5PKLc; Wed, 26 Jun 2024 08:21: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 4W8F5W4qdHz4DW3; Wed, 26 Jun 2024 08:21:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719390063; 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=EN9G+ZvNfArt+TinI8pBNytRAtyKzZE2MHA28S/Jp/A=; b=Zb1AWu+NHyJx5yo7REcjAs9braLOzokgWcvIrzGy8bi8xVOLIVppNIIeMD9IeBg2vKULA/ lPHhKGmV1BvvlmScqx3W44sb9Enrkgbo1dZ6td4O8j61eGttiyoQuiaPIvXVaRHl+f2SA1 KxtNh15HAqQ1Ba9Shcoygs7i2McPLGz6rIn3wpj9yd7va5NJA2EqVaTO+bCfmaqr29vMdB 2TDFBnkueCGeyBcLUDMfkfGm+zbclAdLlxcKRXHOes+JsYxmN6vz267pvseZxnt/qPmXbE 3qn8Jqz5eAAJJ1IEi4hB1ozcAcIsnkER+82xioPZZgb9G7xJo3i8ZPEfe06xWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719390063; a=rsa-sha256; cv=none; b=JOGs2ywYQQzB8qu8XbaJBRBkkXS2a1NTeMKgjTSKaYeiQOnl5P/ogMMYKMpqSpOSl9H7iF H6AVng9oE7fei2533wbKNBLwwycFYtXsNLpgPmZM4Rcowqgt+GW4e7iBLl/7+Ndk8nc+VJ VnQHQeiRDOsH5r07VD3sLI4rUTBqlV8ztf8E7G27x4/lw3SdgrbkoKAEmeG1PQpYnMIq3B TojhfZrUfHWC/LLtJWeOoEkVNPFGiVNPpy6oAvoHOx5YY4AjmD0/znGIydmgza2Ti3Dce0 n9v1WVHsyGF0ulAZDrvfEY92EeQa0ltSOlD4d1/9jtywGbwmcuwQu/OFSGQQYQ== 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=1719390063; 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=EN9G+ZvNfArt+TinI8pBNytRAtyKzZE2MHA28S/Jp/A=; b=yDSHmMnb1/34ZD5J03lwFe0L+Pj7DAfPkv1YTEcDvbKaUIKoENtlykGbcgpHJlP/0icpXZ eH+y+7sIGERuCRlNolziHAq5Sss0FJdSlrl+bb18UZ/8jSw5SnzLKOdzofgKW66bQ73Kk0 EkS3gGgA9pTx1XVrjhQQ01RHQvl04HhmS522sQ1yP6EXgPBXvhRZrHi6JBFWbbT7o7voMy 7Z/SsbNo7aOqpPewD4ObbQtS+LC8Q1G3U+PwijBWi4dbJ2adDVO7uXJ4DM7TFEdQwVD0Lv PRLwWyHyFqd0LoqeUuGqyZJtu2A+vrW7BNL4F5HzhpbODwEm25qfhDIt90JAPw== 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 4W8F5W4R1DzdVC; Wed, 26 Jun 2024 08:21: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 45Q8L3ix021109; Wed, 26 Jun 2024 08:21:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45Q8L3W3021106; Wed, 26 Jun 2024 08:21:03 GMT (envelope-from git) Date: Wed, 26 Jun 2024 08:21:03 GMT Message-Id: <202406260821.45Q8L3W3021106@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 7d37fcbf52b1 - main - cxgbe: replace a loop with rounddown_pow_of_two 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: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7d37fcbf52b14785623bdbceb97bba8044fb739e Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=7d37fcbf52b14785623bdbceb97bba8044fb739e commit 7d37fcbf52b14785623bdbceb97bba8044fb739e Author: Doug Moore AuthorDate: 2024-06-26 08:19:16 +0000 Commit: Doug Moore CommitDate: 2024-06-26 08:19:16 +0000 cxgbe: replace a loop with rounddown_pow_of_two Replace a loop with a function call. Reviewed by: np, alc Differential Revision: https://reviews.freebsd.org/D45716 --- sys/dev/cxgbe/t4_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 96407e7ebaba..08cad0324c28 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -4349,9 +4349,7 @@ calculate_iaq(struct adapter *sc, struct intrs_and_queues *iaq, int itype, */ do { if (iaq->nrxq > 1) { - do { - iaq->nrxq--; - } while (!powerof2(iaq->nrxq)); + iaq->nrxq = rounddown_pow_of_two(iaq->nrxq - 1); if (iaq->nnmrxq > iaq->nrxq) iaq->nnmrxq = iaq->nrxq; }