[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202205120230.SQL9AwU0-lkp@intel.com>
Date: Thu, 12 May 2022 02:19:50 +0800
From: kernel test robot <lkp@...el.com>
To: Krzysztof Kozlowski <krzk@...nel.org>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [krzk-github:n/qcom-ufs-opp-v3 16/31]
drivers/scsi/ufs/ufshcd-pltfrm.c:117:14: warning: variable 'clocks_done' set
but not used
tree: https://github.com/krzk/linux n/qcom-ufs-opp-v3
head: a37fb33a00889e90edd1c74de967b3315980a65d
commit: 1fe1bd364f49815ffd716b8a0f58e62a338305ff [16/31] wip
config: mips-allyesconfig (https://download.01.org/0day-ci/archive/20220512/202205120230.SQL9AwU0-lkp@intel.com/config)
compiler: mips-linux-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/krzk/linux/commit/1fe1bd364f49815ffd716b8a0f58e62a338305ff
git remote add krzk-github https://github.com/krzk/linux
git fetch --no-tags krzk-github n/qcom-ufs-opp-v3
git checkout 1fe1bd364f49815ffd716b8a0f58e62a338305ff
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash drivers/scsi/ufs/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
drivers/scsi/ufs/ufshcd-pltfrm.c: In function 'ufshcd_parse_operating_points':
drivers/scsi/ufs/ufshcd-pltfrm.c:175:12: error: 'struct ufs_hba' has no member named 'use_pm_opp'
175 | hba->use_pm_opp = true;
| ^~
drivers/scsi/ufs/ufshcd-pltfrm.c:118:18: warning: unused variable 'i' [-Wunused-variable]
118 | int cnt, i, ret;
| ^
>> drivers/scsi/ufs/ufshcd-pltfrm.c:117:14: warning: variable 'clocks_done' set but not used [-Wunused-but-set-variable]
117 | bool clocks_done;
| ^~~~~~~~~~~
drivers/scsi/ufs/ufshcd-pltfrm.c:115:30: warning: unused variable 'clki' [-Wunused-variable]
115 | struct ufs_clk_info *clki;
| ^~~~
At top level:
drivers/scsi/ufs/ufshcd-pltfrm.c:111:12: warning: 'ufshcd_parse_operating_points' defined but not used [-Wunused-function]
111 | static int ufshcd_parse_operating_points(struct ufs_hba *hba)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/clocks_done +117 drivers/scsi/ufs/ufshcd-pltfrm.c
110
111 static int ufshcd_parse_operating_points(struct ufs_hba *hba)
112 {
113 struct device *dev = hba->dev;
114 struct device_node *np = dev->of_node;
115 struct ufs_clk_info *clki;
116 const char *names[16];
> 117 bool clocks_done;
118 int cnt, i, ret;
119
120 if (!of_find_property(dev->of_node, "operating-points-v2", NULL))
121 return 0;
122
123 cnt = of_property_count_strings(np, "clock-names");
124 if (cnt <= 0) {
125 dev_warn(dev, "%s: Missing clock-names\n",
126 __func__);
127 return -EINVAL;
128 }
129
130 if (cnt > ARRAY_SIZE(names)) {
131 dev_info(dev, "%s: Too many clock-names\n", __func__);
132 return -EINVAL;
133 }
134
135 /* clocks parsed by ufshcd_parse_clock_info() */
136 clocks_done = !!of_find_property(np, "freq-table-hz", NULL);
137
138 /*
139 for (i = 0; i < cnt; i++) {
140 ret = of_property_read_string_index(np, "clock-names", i,
141 &names[i]);
142 if (ret)
143 return ret;
144
145 if (clocks_done)
146 continue;
147
148 clki = devm_kzalloc(dev, sizeof(*clki), GFP_KERNEL);
149 if (!clki)
150 return -ENOMEM;
151
152 clki->name = devm_kstrdup(dev, names[i], GFP_KERNEL);
153 if (!clki->name)
154 return -ENOMEM;
155
156 if (!strcmp(names[i], "ref_clk"))
157 clki->keep_link_active = true;
158
159 list_add_tail(&clki->list, &hba->clk_list_head);
160 }
161
162 ret = devm_pm_opp_set_clknames(dev, names, i);
163 if (ret)
164 return ret;
165 */
166
167 ret = devm_pm_opp_register_set_opp_helper(dev, ufshcd_set_opp);
168 if (ret)
169 return ret;
170
171 ret = devm_pm_opp_of_add_table(dev);
172 if (ret)
173 return ret;
174
> 175 hba->use_pm_opp = true;
176
177 return 0;
178 }
179
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists