Received: by 2002:a05:7412:b795:b0:e2:908c:2ebd with SMTP id iv21csp243804rdb; Thu, 2 Nov 2023 02:19:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH2RMLORjoj2229w2X0NTqwhhfrrWtSqHDw5OgpXP7AiOPdb4e2ycqP43rbNVKkPivLRRik X-Received: by 2002:a05:6358:8a9:b0:168:e841:5450 with SMTP id m41-20020a05635808a900b00168e8415450mr24196801rwj.0.1698916741556; Thu, 02 Nov 2023 02:19:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698916741; cv=none; d=google.com; s=arc-20160816; b=ZYn0gyB4M4MX+ZafsaOzPtfGHX8cJxOSi4DvigXhbhWV4emvs89xH6gcjD4mx2ZVqa Kdh+zgmShP4d/u5KF4xji/5Bte2gtjiziS6X3ghwR7O6ixLxJHfexH1dRK5Urs2RJ7bK C9Ujk+y1cHBDRXaaEZXbiXatpm2676ABmUF4zfv1ALxz2esYQtIsX2gWQXy9YPwWXIta bWdTTPCpX1oUKhKNg9mvcy2oML88+qEyxMfsJylpbgk70/GR02guk9MuKVZzQa3yTPeY 3U4UFpAv1Yf+jNG8FglwGcQZotl5VFZ5hg+Ld6BMp7OErjm2uEvacqpSjNTCkENMnJiW mffQ== 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=bf/xcygh1t/gne+5yih6oCI1RfcPpKp+/YUXPn7h1rs=; fh=XXufXWb5EedLJt0pTNuMZWnp6Y/YfCP9efYGe6bfPR0=; b=R6/n5PJ9bcF0a/N4+3DLYe7ge8fwrBQlk1PdwMWt5WMK++EpVbekwhP1Z+AFJVunOt 4XcGqEaCmfg4aD2Uv7WplzRrhMeGbMf98polYuA2ilr+6RqLeKip1PJm6zSfCO08eYDs MBSNukQEeARzgmAtYT3Y5KjnoFVKoi9i6IDfUMRHi1v/hfz+gpR+PADbz8oVNYbGSMwM 5s/fAPn3/67SsMsTbFUHEh7Uy3HHUODuR9c1DjQBQValfJx6K2z81TZlZEj+kdiq6PV8 M0xcorGi7uwtPj/+R2STtiTZP7nj3Nbk4ROwZjbjHuRtfqxqQvY8ACCpWyXAQ8ANx5v6 Wa3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ACPxe9ha; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id bv127-20020a632e85000000b005bd092afd36si1435357pgb.134.2023.11.02.02.19.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 02:19:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ACPxe9ha; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 9D58F810F6F8; Thu, 2 Nov 2023 02:18:56 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345476AbjKBJSg (ORCPT + 99 others); Thu, 2 Nov 2023 05:18:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230097AbjKBJSf (ORCPT ); Thu, 2 Nov 2023 05:18:35 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B056D139; Thu, 2 Nov 2023 02:18:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698916709; x=1730452709; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=WfXqmrEzL647g4xsumirECpBC8Tog1OcRNDIdE0JiIY=; b=ACPxe9hau5lNujwaKukcaiiyC/2bSuK3jrF7m0J9//U/OtMk53Ws3qrB ZUx605HbHBcLn1AeCDgyn6lgopmyOT7cQW/sThxCSNMK2nBZz9VOr3PCA 7AGx64pbxnFctBc+XOdJppFozJ1xSGxZbU51ZQwUb9WrGa86idozDPhyQ 03Lav+v9icphNOmXaSm5uCRjguwFdFwtflszIwuaxcbeFC8iW1BgmdPQg +RB8w9RPg05EM5AfS4z2hisHAcJHRnxSacaMn0M9uQl8vnz2Qx1wkfDyd rqC7frlo42ZyVdaHs9hKtXoS//14lzdOuPSmMo0/qKoG4mVQQud7raN26 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10881"; a="388489394" X-IronPort-AV: E=Sophos;i="6.03,271,1694761200"; d="scan'208";a="388489394" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2023 02:18:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10881"; a="796179820" X-IronPort-AV: E=Sophos;i="6.03,271,1694761200"; d="scan'208";a="796179820" Received: from lkp-server01.sh.intel.com (HELO 17d9e85e5079) ([10.239.97.150]) by orsmga001.jf.intel.com with ESMTP; 02 Nov 2023 02:18:25 -0700 Received: from kbuild by 17d9e85e5079 with local (Exim 4.96) (envelope-from ) id 1qyTqJ-0001JP-1B; Thu, 02 Nov 2023 09:18:23 +0000 Date: Thu, 2 Nov 2023 17:18:12 +0800 From: kernel test robot To: "xinglong.yang" , xinglong.yang@cixtech.com, rafael@kernel.org, daniel.lezcano@linaro.org, amitk@kernel.org, rui.zhang@intel.com Cc: oe-kbuild-all@lists.linux.dev, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] driver: thermal: simplify the traverse of sensor in thermal_zone. Message-ID: <202311021624.jfMQm3Ox-lkp@intel.com> References: <20231102055120.1192015-1-xinglong.yang@cixtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231102055120.1192015-1-xinglong.yang@cixtech.com> X-Spam-Status: No, score=-1.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 02 Nov 2023 02:18:56 -0700 (PDT) Hi xinglong.yang, kernel test robot noticed the following build warnings: [auto build test WARNING on rafael-pm/thermal] [also build test WARNING on linus/master v6.6 next-20231102] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/xinglong-yang/driver-thermal-simplify-the-traverse-of-sensor-in-thermal_zone/20231102-135739 base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git thermal patch link: https://lore.kernel.org/r/20231102055120.1192015-1-xinglong.yang%40cixtech.com patch subject: [PATCH] driver: thermal: simplify the traverse of sensor in thermal_zone. config: loongarch-randconfig-001-20231102 (https://download.01.org/0day-ci/archive/20231102/202311021624.jfMQm3Ox-lkp@intel.com/config) compiler: loongarch64-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231102/202311021624.jfMQm3Ox-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/202311021624.jfMQm3Ox-lkp@intel.com/ All warnings (new ones prefixed by >>): drivers/thermal/thermal_of.c: In function 'of_thermal_zone_find': >> drivers/thermal/thermal_of.c:187:28: warning: unused variable 'i' [-Wunused-variable] 187 | int count, i; | ^ vim +/i +187 drivers/thermal/thermal_of.c d0c75fa2c17f08 Daniel Lezcano 2022-07-22 169 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 170 static struct device_node *of_thermal_zone_find(struct device_node *sensor, int id) 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 171 { 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 172 struct device_node *np, *tz; 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 173 struct of_phandle_args sensor_specs; 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 174 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 175 np = of_find_node_by_name(NULL, "thermal-zones"); 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 176 if (!np) { 9d6792df07367a Daniel Lezcano 2022-08-09 177 pr_debug("No thermal zones description\n"); 9d6792df07367a Daniel Lezcano 2022-08-09 178 return ERR_PTR(-ENODEV); 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 179 } 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 180 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 181 /* 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 182 * Search for each thermal zone, a defined sensor 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 183 * corresponding to the one passed as parameter 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 184 */ 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 185 for_each_available_child_of_node(np, tz) { 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 186 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 @187 int count, i; d8c9a37137332e xinglong.yang 2023-11-02 188 int ret; 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 189 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 190 count = of_count_phandle_with_args(tz, "thermal-sensors", 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 191 "#thermal-sensor-cells"); 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 192 if (count <= 0) { 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 193 pr_err("%pOFn: missing thermal sensor\n", tz); 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 194 tz = ERR_PTR(-EINVAL); 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 195 goto out; d8c9a37137332e xinglong.yang 2023-11-02 196 } else if (count > 1) { d8c9a37137332e xinglong.yang 2023-11-02 197 pr_err("%pOFn: number of thermal sensor greater than one\n", tz); d8c9a37137332e xinglong.yang 2023-11-02 198 tz = ERR_PTR(-EINVAL); d8c9a37137332e xinglong.yang 2023-11-02 199 goto out; 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 200 } 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 201 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 202 ret = of_parse_phandle_with_args(tz, "thermal-sensors", 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 203 "#thermal-sensor-cells", d8c9a37137332e xinglong.yang 2023-11-02 204 0, &sensor_specs); 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 205 if (ret < 0) { 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 206 pr_err("%pOFn: Failed to read thermal-sensors cells: %d\n", tz, ret); 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 207 tz = ERR_PTR(ret); 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 208 goto out; 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 209 } 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 210 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 211 if ((sensor == sensor_specs.np) && id == (sensor_specs.args_count ? 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 212 sensor_specs.args[0] : 0)) { 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 213 pr_debug("sensor %pOFn id=%d belongs to %pOFn\n", sensor, id, tz); 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 214 goto out; 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 215 } 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 216 } 9d6792df07367a Daniel Lezcano 2022-08-09 217 tz = ERR_PTR(-ENODEV); 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 218 out: 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 219 of_node_put(np); 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 220 return tz; 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 221 } 3fd6d6e2b4e80f Daniel Lezcano 2022-08-05 222 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki