* [linusw-pinctrl:devel 15/20] drivers/pinctrl/pinctrl-k230.c:159:11: warning: variable 'mode' set but not used
@ 2024-10-02 3:32 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-10-02 3:32 UTC (permalink / raw)
To: Ze Huang; +Cc: oe-kbuild-all, linux-gpio, Linus Walleij
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-10-02 3:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-02 3:32 [linusw-pinctrl:devel 15/20] drivers/pinctrl/pinctrl-k230.c:159:11: warning: variable 'mode' set but not used kernel test robot
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).