Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp25259165rwd; Sun, 2 Jul 2023 13:41:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6dSoMxdCMnW5uZCSh0ar/ffSUV5SuQZvQw1YA3ex2KWdfdu9lQ0R+xTqoGnKMgTv16pwCH X-Received: by 2002:a05:6a20:918d:b0:10f:be0:4dce with SMTP id v13-20020a056a20918d00b0010f0be04dcemr11797629pzd.8.1688330509700; Sun, 02 Jul 2023 13:41:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688330509; cv=none; d=google.com; s=arc-20160816; b=Ob5tPkACtxuJsqL6G+T5Z01DrX8MTGb/v3j/A/cwK9CGciSznZjAD41Ye3v2oEglWS aGnV7+srvRsQbpjULHhclnegtAbwLW/ZsXGrdg8xOFp3EIU+6iwX+U+eqtcUeVCJ7D/s 1SITmP2FYFpZJAA4PikEpxG5KoF+91K6//IkTa0xbPtOqxPFRUueqlgpiMKEh8pzsYzI aefOZ0mMmLUd4BJbgtHIMaZ16lBbP6Oo4kVnP7MZK83HxkrTkF6b/KOVM7XCPQw9BDDK b9LovW1rjmJKgKgWDqMv27Lmv5cjJTCs1VF6RLYteiMo8enVMJ3mmnIX9anfWoZ1Cntd dNkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=J0n5xKyO/PNwSZt1ODlbGo2C0wVvuJDaJc5Qef7p1i4=; fh=f5hfYlvBdT+9kZ4P2rlCoFxKX9dCz5FFMcHEY229ySo=; b=GxjiLb/RCiB508aOz5XVUKoAqtScpE8QrCsGkqI5qrbaZFqMoQ8rroLZNpAp5OvpUC 3O4kfLbeTWR4GMvx3gSqoeZBihn5w6lwd3Z6go8msUyMLrPBiTq3mLLUtxUSH5QtzIg/ PVO+qy9Qw41Wd+FGbgKpI5m4DjzEGTPEByBV/ZHTvQFe+Bs/jY+h3NnyB/pxN1SHc77K W4iC3b6xdOLAMwPJbUwfnbBI1yC2WBqy8oj5BBth9Qg0qBM7wXiuXLSYGvQFTW0YqK0Z PBDqBb86t77quW/niqebVTS+xQMZ+789PURotGO1oAhSw29FTIVX97ZJJ8zECJX2kTBO Wypg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=KxWoj2ia; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i17-20020a056a00005100b0068265f40634si4716776pfk.400.2023.07.02.13.41.37; Sun, 02 Jul 2023 13:41:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=KxWoj2ia; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233248AbjGBUJU (ORCPT + 99 others); Sun, 2 Jul 2023 16:09:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231996AbjGBUI6 (ORCPT ); Sun, 2 Jul 2023 16:08:58 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9D601FCD; Sun, 2 Jul 2023 13:07:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688328439; x=1719864439; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=KomjQBb5bvym6eCrKFp6yiJMpgWdmolf6Tuzqi2QmWI=; b=KxWoj2iaxu4pjfVV+ZJ2w0dVli/8keY7rglHlOCbNFARikE6i/+s+MB3 bpu4HUXHehF9wJj78zNAPq4vDPg03TeEt7hfNrjfU0aBPJm29fZnsArIp 9ORFB3NWpbo04qYsx+PuyORMS4tc9Njl5UJ62APKkaECTr6trneTreaEE rYJb6nG78LF+gf5OkLTJ8H90zL99g3mH9eiZOXSIW7xQkztSd7eevhdI6 P2Xkd1Uc5S5RWi31M/wwvo0DolFVkTfy8OZFu1beZ8coqmF8cBaHkYd0J x8N8ifUYHXR60wWQNVkX4DRRqKRWG+XKvlRWrXo7+IHSOK08S9kvPr0OI A==; X-IronPort-AV: E=McAfee;i="6600,9927,10759"; a="449115564" X-IronPort-AV: E=Sophos;i="6.01,176,1684825200"; d="scan'208";a="449115564" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jul 2023 13:06:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10759"; a="842447071" X-IronPort-AV: E=Sophos;i="6.01,176,1684825200"; d="scan'208";a="842447071" Received: from lkp-server01.sh.intel.com (HELO 783282924a45) ([10.239.97.150]) by orsmga004.jf.intel.com with ESMTP; 02 Jul 2023 13:06:47 -0700 Received: from kbuild by 783282924a45 with local (Exim 4.96) (envelope-from ) id 1qG3LK-000GrJ-2i; Sun, 02 Jul 2023 20:06:46 +0000 Date: Mon, 3 Jul 2023 04:06:28 +0800 From: kernel test robot To: Frank Oltmanns , Maxime Ripard , Michael Turquette , Stephen Boyd , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Andre Przywara , Roman Beranek Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Frank Oltmanns Subject: Re: [PATCH v3 5/8] clk: sunxi-ng: nkm: Support finding closest rate Message-ID: <202307030302.s1bheEun-lkp@intel.com> References: <20230702-pll-mipi_set_rate_parent-v3-5-46dcb8aa9cbc@oltmanns.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230702-pll-mipi_set_rate_parent-v3-5-46dcb8aa9cbc@oltmanns.dev> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Frank, kernel test robot noticed the following build warnings: [auto build test WARNING on 6995e2de6891c724bfeb2db33d7b87775f913ad1] url: https://github.com/intel-lab-lkp/linux/commits/Frank-Oltmanns/clk-sunxi-ng-nkm-consider-alternative-parent-rates-when-determining-rate/20230703-015726 base: 6995e2de6891c724bfeb2db33d7b87775f913ad1 patch link: https://lore.kernel.org/r/20230702-pll-mipi_set_rate_parent-v3-5-46dcb8aa9cbc%40oltmanns.dev patch subject: [PATCH v3 5/8] clk: sunxi-ng: nkm: Support finding closest rate config: riscv-rv32_defconfig (https://download.01.org/0day-ci/archive/20230703/202307030302.s1bheEun-lkp@intel.com/config) compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a) reproduce: (https://download.01.org/0day-ci/archive/20230703/202307030302.s1bheEun-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202307030302.s1bheEun-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/clk/sunxi-ng/ccu_nkm.c:46:24: warning: variable 'tmp_diff' is uninitialized when used here [-Wuninitialized] 46 | tmp_diff = rate - tmp_diff; | ^~~~~~~~ drivers/clk/sunxi-ng/ccu_nkm.c:33:27: note: initialize the variable 'tmp_diff' to silence this warning 33 | unsigned long tmp_diff; | ^ | = 0 drivers/clk/sunxi-ng/ccu_nkm.c:93:24: warning: variable 'tmp_diff' is uninitialized when used here [-Wuninitialized] 93 | tmp_diff = rate - tmp_diff; | ^~~~~~~~ drivers/clk/sunxi-ng/ccu_nkm.c:82:27: note: initialize the variable 'tmp_diff' to silence this warning 82 | unsigned long tmp_diff; | ^ | = 0 2 warnings generated. vim +/tmp_diff +46 drivers/clk/sunxi-ng/ccu_nkm.c 19 20 static unsigned long ccu_nkm_find_best_with_parent_adj(unsigned long *parent, unsigned long rate, 21 struct _ccu_nkm *nkm, struct clk_hw *phw, 22 unsigned long features) 23 { 24 unsigned long best_rate = 0, best_parent_rate = 0, tmp_parent = *parent; 25 unsigned long best_diff = ULONG_MAX; 26 unsigned long best_n = 0, best_k = 0, best_m = 0; 27 unsigned long _n, _k, _m; 28 29 for (_k = nkm->min_k; _k <= nkm->max_k; _k++) { 30 for (_n = nkm->min_n; _n <= nkm->max_n; _n++) { 31 for (_m = nkm->min_m; _m <= nkm->max_m; _m++) { 32 unsigned long tmp_rate; 33 unsigned long tmp_diff; 34 35 tmp_parent = clk_hw_round_rate(phw, rate * _m / (_n * _k)); 36 37 tmp_rate = tmp_parent * _n * _k / _m; 38 39 if (features & CCU_FEATURE_CLOSEST_RATE) { 40 tmp_diff = rate > tmp_rate ? 41 rate - tmp_rate : 42 tmp_rate - rate; 43 } else { 44 if (tmp_rate > rate) 45 continue; > 46 tmp_diff = rate - tmp_diff; 47 } 48 49 if (tmp_diff < best_diff) { 50 best_rate = tmp_rate; 51 best_parent_rate = tmp_parent; 52 best_diff = tmp_diff; 53 best_n = _n; 54 best_k = _k; 55 best_m = _m; 56 } 57 } 58 } 59 } 60 61 nkm->n = best_n; 62 nkm->k = best_k; 63 nkm->m = best_m; 64 65 *parent = best_parent_rate; 66 67 return best_rate; 68 } 69 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki