From: kernel test robot <lkp@intel.com>
To: Ze Huang <18771902331@163.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-gpio@vger.kernel.org,
Linus Walleij <linus.walleij@linaro.org>
Subject: [linusw-pinctrl:devel 15/20] drivers/pinctrl/pinctrl-k230.c:159:11: warning: variable 'mode' set but not used
Date: Wed, 2 Oct 2024 11:32:23 +0800 [thread overview]
Message-ID: <202410021136.ie3cFM2w-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel
head: d1c7bf9cb31a8e3868c5eaf3ec05b79aba4d2e33
commit: 545887eab6f6776a7477fe7e83860eab57138b03 [15/20] pinctrl: canaan: Add support for k230 SoC
config: x86_64-allmodconfig (https://download.01.org/0day-ci/archive/20241002/202410021136.ie3cFM2w-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241002/202410021136.ie3cFM2w-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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410021136.ie3cFM2w-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/pinctrl/pinctrl-k230.c:159:11: warning: variable 'mode' set but not used [-Wunused-but-set-variable]
159 | u32 val, mode, bias, drive, input, output, slew, schmitt, power;
| ^
>> drivers/pinctrl/pinctrl-k230.c:159:37: warning: variable 'output' set but not used [-Wunused-but-set-variable]
159 | u32 val, mode, bias, drive, input, output, slew, schmitt, power;
| ^
2 warnings generated.
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for MODVERSIONS
Depends on [n]: MODULES [=y] && !COMPILE_TEST [=y]
Selected by [y]:
- RANDSTRUCT_FULL [=y] && (CC_HAS_RANDSTRUCT [=y] || GCC_PLUGINS [=n]) && MODULES [=y]
vim +/mode +159 drivers/pinctrl/pinctrl-k230.c
154
155 static void k230_pinctrl_pin_dbg_show(struct pinctrl_dev *pctldev,
156 struct seq_file *s, unsigned int offset)
157 {
158 struct k230_pinctrl *info = pinctrl_dev_get_drvdata(pctldev);
> 159 u32 val, mode, bias, drive, input, output, slew, schmitt, power;
160 struct k230_pin_group *grp = k230_pins[offset].drv_data;
161 static const char * const biasing[] = {
162 "pull none", "pull down", "pull up", "" };
163 static const char * const enable[] = {
164 "disable", "enable" };
165 static const char * const power_source[] = {
166 "3V3", "1V8" };
167
168 regmap_read(info->regmap_base, offset * 4, &val);
169
170 mode = (val & K230_PC_SEL) >> K230_SHIFT_SEL;
171 drive = (val & K230_PC_DS) >> K230_SHIFT_DS;
172 bias = (val & K230_PC_BIAS) >> K230_SHIFT_BIAS;
173 input = (val & K230_PC_IE) >> K230_SHIFT_IE;
174 output = (val & K230_PC_OE) >> K230_SHIFT_OE;
175 slew = (val & K230_PC_SL) >> K230_SHIFT_SL;
176 schmitt = (val & K230_PC_ST) >> K230_SHIFT_ST;
177 power = (val & K230_PC_MSC) >> K230_SHIFT_MSC;
178
179 seq_printf(s, "%s - strength %d - %s - %s - slewrate %s - schmitt %s - %s",
180 grp ? grp->name : "unknown",
181 drive,
182 biasing[bias],
183 input ? "input" : "output",
184 enable[slew],
185 enable[schmitt],
186 power_source[power]);
187 }
188
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-10-02 3:32 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=202410021136.ie3cFM2w-lkp@intel.com \
--to=lkp@intel.com \
--cc=18771902331@163.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).