From: kernel test robot <lkp@intel.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.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
Date: Thu, 12 May 2022 02:19:50 +0800 [thread overview]
Message-ID: <202205120230.SQL9AwU0-lkp@intel.com> (raw)
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@intel.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
reply other threads:[~2022-05-11 18:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202205120230.SQL9AwU0-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.