Re: [PATCH] platform/surface: platform_profile: handle fan standby state

From: kernel test robot

Date: Wed Nov 11 2026 - 16:27:23 EST


Hi Peter,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linus/master]
[also build test WARNING on v7.4-rc2 next-20261110]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Peter-Marshall/platform-surface-platform_profile-handle-fan-standby-state/20261110-210916
base: linus/master
patch link: https://lore.kernel.org/r/20261111020916.3557508-2-pm%40petermarshall.ca
patch subject: [PATCH] platform/surface: platform_profile: handle fan standby state
config: loongarch-allmodconfig (https://download.01.org/0day-ci/archive/20261112/202611120527.xw8ZORYY-lkp@xxxxxxxxx/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261112/202611120527.xw8ZORYY-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202611120527.xw8ZORYY-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> drivers/platform/surface/surface_platform_profile.c:267:6: warning: variable 'status' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
267 | if (tpd->has_fan) {
| ^~~~~~~~~~~~
drivers/platform/surface/surface_platform_profile.c:273:9: note: uninitialized use occurs here
273 | return status;
| ^~~~~~
drivers/platform/surface/surface_platform_profile.c:267:2: note: remove the 'if' if its condition is always true
267 | if (tpd->has_fan) {
| ^~~~~~~~~~~~~~~~~
drivers/platform/surface/surface_platform_profile.c:263:12: note: initialize the variable 'status' to silence this warning
263 | int status;
| ^
| = 0
1 warning generated.


vim +267 drivers/platform/surface/surface_platform_profile.c

259
260 static int surface_platform_profile_pm_prepare(struct device *dev)
261 {
262 struct ssam_platform_profile_device *tpd;
263 int status;
264
265 tpd = dev_get_drvdata(dev);
266
> 267 if (tpd->has_fan) {
268 status = ssam_fan_state_set(tpd->sdev, SSAM_FAN_STATE_STANDBY);
269 if (status)
270 dev_err(&tpd->sdev->dev, "pm: fan standby notification failed");
271 }
272
273 return status;
274 }
275

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki