From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id BEC2BC4345F for ; Tue, 23 Apr 2024 10:12:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 48B616B00F0; Tue, 23 Apr 2024 06:12:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 43C046B00F1; Tue, 23 Apr 2024 06:12:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 32A746B00F2; Tue, 23 Apr 2024 06:12:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 15E4B6B00F0 for ; Tue, 23 Apr 2024 06:12:54 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 8C1091C0CC7 for ; Tue, 23 Apr 2024 10:12:53 +0000 (UTC) X-FDA: 82040383026.21.58E078E Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) by imf15.hostedemail.com (Postfix) with ESMTP id 08642A0012 for ; Tue, 23 Apr 2024 10:12:50 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=ilPLCY5c; spf=pass (imf15.hostedemail.com: domain of lkp@intel.com designates 192.198.163.15 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1713867171; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=gZl0GErbg1MEg32nQ7lsJPi+VIYTwGft65ZdtdHUMFg=; b=N6GtjORE4j4mX/o/dde5R3ZEzhKi1IoM3LEKrcXEia37GUKyDaY1+lfDGueKj1bMjvuzVB ISkZOiiLIMXJtLxdTMql8kk92P8HGHJv1V+Cbp4gOBYEj6+39uYAY2nTZ6i21FxOvaGKH/ Heh7zoYO82XgveN8TE4K+0WunqkJYIc= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1713867171; a=rsa-sha256; cv=none; b=fcUTOb9xo35mndYigNKGEhLGAMWriC9VXGEHMfAxnuYh2S/9mjOwPgHzp5HE7Y58kLeB2O ddwLJdkzw/iWPhyYqk/60MdKCQ8OYQstbqhDKYNUY7tbX/6FSA4Tf+wrEJV4Eui5EPOGYC NXrnZeomJPxjV0SefHS73r6ApV3fNrk= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=ilPLCY5c; spf=pass (imf15.hostedemail.com: domain of lkp@intel.com designates 192.198.163.15 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1713867171; x=1745403171; h=date:from:to:cc:subject:message-id:mime-version; bh=vZKKjmWLRhxb5IhsUVl21dx0btd++91EdMjGvQHTZcc=; b=ilPLCY5cC//GWeyj0XAoMGW7Ms2LV1/PVOCfBB6PpWWkYLMmA7nAuCXl MWUmEZDcbWOjJeSiTQy0aU4NdCh6vWJztU+JK3A8lOkwWFeA2CcyyDb88 7i2MN8geK2HF7nBTLIv8wIuaIra3+GsDz8KmYq/iAgLvegd/8FTOYJ+Qz 8oeQxwTbR7o4t4ME88D5/cymJOV0NkjiCSE7Q8GBrOgVLCeDI6BekDhQ5 46BEBJfQbxnx1k3mave/ooN5Kp34HpoVCBv7sUHxbw/Ma8imyouKjcrPg ZoIn6+Fu89m5/cxP33uLt/iG6fI9QwZvwOiv5nnYNFIJut6po+Z+lTzmi A==; X-CSE-ConnectionGUID: louvfuN8RnaaaWMHTmyNZw== X-CSE-MsgGUID: wwGlU5LkSUuL0wxRYcfMvw== X-IronPort-AV: E=McAfee;i="6600,9927,11052"; a="9613420" X-IronPort-AV: E=Sophos;i="6.07,222,1708416000"; d="scan'208";a="9613420" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Apr 2024 03:12:28 -0700 X-CSE-ConnectionGUID: TH4a4z0nT1utmuVyX7SEjg== X-CSE-MsgGUID: EoVKGZ8uTbaTHOsEW3lMXg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,222,1708416000"; d="scan'208";a="24370028" Received: from lkp-server01.sh.intel.com (HELO e434dd42e5a1) ([10.239.97.150]) by fmviesa007.fm.intel.com with ESMTP; 23 Apr 2024 03:12:27 -0700 Received: from kbuild by e434dd42e5a1 with local (Exim 4.96) (envelope-from ) id 1rzD8T-00006C-03; Tue, 23 Apr 2024 10:12:25 +0000 Date: Tue, 23 Apr 2024 18:12:00 +0800 From: kernel test robot To: Tanmay Shah Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, Linux Memory Management List , Mathieu Poirier Subject: [linux-next:master 6931/7876] drivers/remoteproc/xlnx_r5_remoteproc.c:914:11: warning: variable 'ret' is used uninitialized whenever 'if' condition is false Message-ID: <202404231839.oHiY9Lw8-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 08642A0012 X-Rspam-User: X-Stat-Signature: k95btbfmxxpigaguq491qkuuq73icnmw X-HE-Tag: 1713867170-536399 X-HE-Meta: U2FsdGVkX1/SDyu5QamNOwBZ7PCw5o2kWcifn02zvPnEcrg3p8HDgdRB/12c7rvbnY0v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adAA80NTOLOhs2o5oH9Mg0KLUCyW1rPa0DZuIJksHtBh8AxuTSFuJlCmmYTC7M2N0GcbZbo23YkTMsvcUu4XVmqiyalrf6uTorYwjUKZXmG3OyH2/R+C0R7Gq6cZjeMWQBj49VL6tmIZyU6kuNtnfYCjpN4ZMIURspmWS3FfTj7+6KHO+Sj2ClvYzUX9o X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: a59668a9397e7245b26e9be85d23f242ff757ae8 commit: a6b974b40f942b3e51124de588383009f6a42d2d [6931/7876] drivers: remoteproc: xlnx: Add Versal and Versal-NET support config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20240423/202404231839.oHiY9Lw8-lkp@intel.com/config) compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 5ef5eb66fb428aaf61fb51b709f065c069c11242) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240423/202404231839.oHiY9Lw8-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/202404231839.oHiY9Lw8-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from drivers/remoteproc/xlnx_r5_remoteproc.c:8: In file included from include/linux/dma-mapping.h:11: In file included from include/linux/scatterlist.h:8: In file included from include/linux/mm.h:2208: include/linux/vmstat.h:508:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 508 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 509 | item]; | ~~~~ include/linux/vmstat.h:515:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 515 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 516 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ include/linux/vmstat.h:527:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 527 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 528 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:536:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 536 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 537 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ >> drivers/remoteproc/xlnx_r5_remoteproc.c:914:11: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] 914 | else if (device_is_compatible(dev, "xlnx,zynqmp-r5fss")) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/remoteproc/xlnx_r5_remoteproc.c:917:6: note: uninitialized use occurs here 917 | if (ret) { | ^~~ drivers/remoteproc/xlnx_r5_remoteproc.c:914:7: note: remove the 'if' if its condition is always true 914 | else if (device_is_compatible(dev, "xlnx,zynqmp-r5fss")) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 915 | ret = zynqmp_r5_get_tcm_node(cluster); drivers/remoteproc/xlnx_r5_remoteproc.c:907:9: note: initialize the variable 'ret' to silence this warning 907 | int ret, i; | ^ | = 0 6 warnings generated. vim +914 drivers/remoteproc/xlnx_r5_remoteproc.c 890 891 /* 892 * zynqmp_r5_core_init() 893 * Create and initialize zynqmp_r5_core type object 894 * 895 * @cluster: pointer to zynqmp_r5_cluster type object 896 * @fw_reg_val: value expected by firmware to configure RPU cluster mode 897 * @tcm_mode: value expected by fw to configure TCM mode (lockstep or split) 898 * 899 * Return: 0 for success and error code for failure. 900 */ 901 static int zynqmp_r5_core_init(struct zynqmp_r5_cluster *cluster, 902 enum rpu_oper_mode fw_reg_val, 903 enum rpu_tcm_comb tcm_mode) 904 { 905 struct device *dev = cluster->dev; 906 struct zynqmp_r5_core *r5_core; 907 int ret, i; 908 909 r5_core = cluster->r5_cores[0]; 910 911 /* Maintain backward compatibility for zynqmp by using hardcode TCM address. */ 912 if (of_find_property(r5_core->np, "reg", NULL)) 913 ret = zynqmp_r5_get_tcm_node_from_dt(cluster); > 914 else if (device_is_compatible(dev, "xlnx,zynqmp-r5fss")) 915 ret = zynqmp_r5_get_tcm_node(cluster); 916 917 if (ret) { 918 dev_err(dev, "can't get tcm, err %d\n", ret); 919 return ret; 920 } 921 922 for (i = 0; i < cluster->core_count; i++) { 923 r5_core = cluster->r5_cores[i]; 924 925 /* Initialize r5 cores with power-domains parsed from dts */ 926 ret = of_property_read_u32_index(r5_core->np, "power-domains", 927 1, &r5_core->pm_domain_id); 928 if (ret) { 929 dev_err(dev, "failed to get power-domains property\n"); 930 return ret; 931 } 932 933 ret = zynqmp_pm_set_rpu_mode(r5_core->pm_domain_id, fw_reg_val); 934 if (ret < 0) { 935 dev_err(r5_core->dev, "failed to set RPU mode\n"); 936 return ret; 937 } 938 939 if (of_find_property(dev_of_node(dev), "xlnx,tcm-mode", NULL) || 940 device_is_compatible(dev, "xlnx,zynqmp-r5fss")) { 941 ret = zynqmp_pm_set_tcm_config(r5_core->pm_domain_id, 942 tcm_mode); 943 if (ret < 0) { 944 dev_err(r5_core->dev, "failed to configure TCM\n"); 945 return ret; 946 } 947 } 948 } 949 950 return 0; 951 } 952 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki