From nobody Thu Nov 12 09:51:21 2026 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 4jQFyf4zt7z70Jv1 for ; Thu, 12 Nov 2026 09:51:22 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jQFyf0LLgz3Fqk for ; Thu, 12 Nov 2026 09:51:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794477082; 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=GNhCoHivtBCne0zoa77f0TDQ5I3ob9ppfpmlIfCLq20=; b=jTLgXMM2m8Czrsh1VHJflYAHjdt9eoM1IB6A0GazoynRmS06BoPWTEnjvpcN9id5QsHOMs Zx/rHCCT230xOCUQLtDggvFRInjQVgX+xPklZidgwDsHts26nQZ+H9UmzFR6OI8sGgZ06w IVU6G08OsrguKFKEWZng9NG7oVn82diM1klozLdY3lMUFkANN51KYnOf/lsv+VGcW4NEsh lSGQ/wNcmZxErbuz9kVArlGTJ0Y1wKRXqRBCgd1XCwx6VzMQTt8cwBy/1VsYuaiL+nYs7x 7kkadUPwszYFJnh8iCsJqqYH9XG3dXH0DxBhNMO07tZXThLqAlhW/qg+saddxg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794477082; b=XVKo8TBu180bS0fHz4ERQw3qv5BFGYcq9qJkC4/o7DkqnW/6rSJXIPmSzHboSdv8Qlt8Sv Mg+CU1iJ1mzMOP/2rI3JcBRWb0+4TAyfPbXV8GOO1ho4qZAMhtLzLWBnqlZY2RTbqXzfUD 0RXyo5ZALCACxv9CMBqfdn91vuiMFAut8y744Mle+am/4yaYSVeocn+Wx2HaSQ9oeMOwdx tRXiXu4fyh6Y+N1HbM9Iv1ZyrNFLmVFv9aLK+2a1jEvv7OWsGpTVqPhwzw2ZMKq0mHqSOG 3ORGFV3+Fakv6MQVQOgNwftv1AfBi4iiZepzYPLBM/A9WzM/DTPuKrXJuZBn8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794477082; 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=GNhCoHivtBCne0zoa77f0TDQ5I3ob9ppfpmlIfCLq20=; b=GyMN8DY41MM435dTkKhYuHyYA+ms/m2QEkAz8XpTWMdnMRFYUIo62f5TYh74+GDCdc7v3H bcQNLI7vHK9GH3hUYwWgtUsmlaDgW//wRGimSHp0EOvGhiwywSeMO3aAbzi9jMOLksvUEK SwrM298dd+QppkEALbUzxg9to+eaTcGMhbLVC5sXsE/BrnNHLCoR8F3VGv7qu1fBnOTtHV IGu7c6Ij8WS2H23iLuLr+VprdcGkLTsGFksNmVtrRjjr40umrU2rpdfh6N/yxjBn383Vuo DbR3a1hVyLdLC+dyeq5sWh8Siw1415ptAvFptUAyQd2jo0C1kwYHJpvESe2bDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jQFyf01Lxzy6c for ; Thu, 12 Nov 2026 09:51:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 20c33 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 12 Nov 2026 09:51:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 3337dd483bae - main - aw_clk: Initialize best in the nmm and np find_best functions List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3337dd483bae129ff2dabc626bee121f6299646d Auto-Submitted: auto-generated Date: Thu, 12 Nov 2026 09:51:21 +0000 Message-Id: <6af58c19.20c33.de9575e@gitrepo.freebsd.org> The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=3337dd483bae129ff2dabc626bee121f6299646d commit 3337dd483bae129ff2dabc626bee121f6299646d Author: Emmanuel Vadot AuthorDate: 2026-11-10 14:29:25 +0000 Commit: Emmanuel Vadot CommitDate: 2026-11-12 09:47:28 +0000 aw_clk: Initialize best in the nmm and np find_best functions aw_clk_nmm_find_best() and aw_clk_np_find_best() compared the first candidate to best before it was ever assigned, so the result of the search depended on whatever was on the stack. Initialize it to 0 like the nm and nkmp ones do. --- sys/dev/clk/allwinner/aw_clk_nmm.c | 2 +- sys/dev/clk/allwinner/aw_clk_np.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/clk/allwinner/aw_clk_nmm.c b/sys/dev/clk/allwinner/aw_clk_nmm.c index ac55c5eea182..e8935d84acbc 100644 --- a/sys/dev/clk/allwinner/aw_clk_nmm.c +++ b/sys/dev/clk/allwinner/aw_clk_nmm.c @@ -101,7 +101,7 @@ static uint64_t aw_clk_nmm_find_best(struct aw_clk_nmm_sc *sc, uint64_t fparent, uint64_t *fout, uint32_t *factor_n, uint32_t *factor_m0, uint32_t *factor_m1) { - uint64_t cur, best; + uint64_t cur, best = 0; uint32_t n, m0, m1; uint32_t max_n, max_m0, max_m1; uint32_t min_n, min_m0, min_m1; diff --git a/sys/dev/clk/allwinner/aw_clk_np.c b/sys/dev/clk/allwinner/aw_clk_np.c index bca81eb3e937..9c55063552ed 100644 --- a/sys/dev/clk/allwinner/aw_clk_np.c +++ b/sys/dev/clk/allwinner/aw_clk_np.c @@ -100,7 +100,7 @@ static uint64_t aw_clk_np_find_best(struct aw_clk_np_sc *sc, uint64_t fparent, uint64_t *fout, uint32_t *factor_n, uint32_t *factor_p) { - uint64_t cur, best; + uint64_t cur, best = 0; uint32_t n, p, max_n, max_p, min_n, min_p; *factor_n = *factor_p = 0;