All of lore.kernel.org
 help / color / mirror / Atom feed
* [sre-misc:thinkpad-t14s-x1e 102/106] drivers/hwmon/lenovo-thinkpad-t14s-fan-ctrl.c:114:39: warning: variable 'id' set but not used
@ 2026-04-10 19:42 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-04-10 19:42 UTC (permalink / raw)
  To: Sebastian Reichel; +Cc: oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-misc.git thinkpad-t14s-x1e
head:   c368130866898c0f67e75fb8e36b0708e623553b
commit: 63135d5eb5be2cfe4bab0b645506ea30a7e198e8 [102/106] hwmon: (t14s-fan-ctrl) add thermistor support
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20260411/202604110343.JFNEeIMb-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260411/202604110343.JFNEeIMb-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/202604110343.JFNEeIMb-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/hwmon/lenovo-thinkpad-t14s-fan-ctrl.c: In function 't14s_fan_do_read_thermistor':
>> drivers/hwmon/lenovo-thinkpad-t14s-fan-ctrl.c:114:39: warning: variable 'id' set but not used [-Wunused-but-set-variable]
     114 |         enum t14s_fan_ctrl_thermistor id;
         |                                       ^~

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for PHY_QCOM_MIPI_CSI2
   Depends on [n]: (ARCH_QCOM || COMPILE_TEST [=y]) && OF [=y] && COMMON_CLK [=n]
   Selected by [m]:
   - VIDEO_QCOM_CAMSS [=m] && MEDIA_SUPPORT [=m] && MEDIA_PLATFORM_SUPPORT [=y] && MEDIA_PLATFORM_DRIVERS [=y] && V4L_PLATFORM_DRIVERS [=y] && VIDEO_DEV [=m] && (ARCH_QCOM && IOMMU_DMA [=n] || COMPILE_TEST [=y])


vim +/id +114 drivers/hwmon/lenovo-thinkpad-t14s-fan-ctrl.c

   110	
   111	static int
   112	t14s_fan_do_read_thermistor(struct t14s_fan_ctrl *t14s_fan_ctrl, u32 attr, int channel, long *val)
   113	{
 > 114		enum t14s_fan_ctrl_thermistor id;
   115		int ret;
   116	
   117		switch (channel) {
   118		case 1:
   119			id = THERMISTOR1;
   120			break;
   121		case 2:
   122			id = THERMISTOR2;
   123			break;
   124		case 3:
   125			id = THERMISTOR3;
   126			break;
   127		case 4:
   128			id = THERMISTOR4;
   129			break;
   130		case 5:
   131			id = THERMISTOR5;
   132			break;
   133		case 6:
   134			id = THERMISTOR6;
   135			break;
   136		case 7:
   137			id = THERMISTOR7;
   138			break;
   139		default:
   140			return -EINVAL;
   141		}
   142	
   143		switch (attr) {
   144		case hwmon_temp_input:
   145			ret = t14s_fan_ctrl_thermistor(t14s_fan_ctrl, channel + THERMISTOR1 - 1);
   146			if (ret < 0)
   147				return ret;
   148			*val = ret;
   149			return 0;
   150		default:
   151			return -EOPNOTSUPP;
   152		}
   153	}
   154	

-- 
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:[~2026-04-10 19:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-10 19:42 [sre-misc:thinkpad-t14s-x1e 102/106] drivers/hwmon/lenovo-thinkpad-t14s-fan-ctrl.c:114:39: warning: variable 'id' set but not used kernel test robot

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.