Re: [PATCH 03/13] platform/apple-gmux: Fix MMIO interface

From: kernel test robot

Date: Sun Oct 25 2026 - 18:12:11 EST


Hi Atharva,

kernel test robot noticed the following build warnings:

[auto build test WARNING on v7.3]
[also build test WARNING on next-20261023]
[cannot apply to drm-misc/drm-misc-next pci/next pci/for-linus linus/master]
[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/Atharva-Tiwari/platform-apple-gmux-Fix-power-for-MMIO-systems/20261024-235937
base: v7.3
patch link: https://lore.kernel.org/r/20261025040046.1602-4-atharvatiwarilinuxdev%40gmail.com
patch subject: [PATCH 03/13] platform/apple-gmux: Fix MMIO interface
config: x86_64-randconfig-1017-20261025 (https://download.01.org/0day-ci/archive/20261026/202610260503.TQjc0Dfl-lkp@xxxxxxxxx/config)
compiler: clang version 22.1.8 (https://github.com/llvm/llvm-project ca7933e47d3a3451d81e72ac174dcb5aa28b59d1)
rustc: rustc 1.96.0 (ac68faa20 2026-05-25)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261026/202610260503.TQjc0Dfl-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/202610260503.TQjc0Dfl-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> drivers/platform/x86/apple-gmux.c:253:6: warning: variable 'val' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
253 | if (gmux_mmio_wait(gmux_data)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/platform/x86/apple-gmux.c:263:9: note: uninitialized use occurs here
263 | return val;
| ^~~
drivers/platform/x86/apple-gmux.c:253:2: note: remove the 'if' if its condition is always true
253 | if (gmux_mmio_wait(gmux_data)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/platform/x86/apple-gmux.c:250:8: note: initialize the variable 'val' to silence this warning
250 | u8 val;
| ^
| = '\0'
drivers/platform/x86/apple-gmux.c:290:6: warning: variable 'val' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
290 | if (gmux_mmio_wait(gmux_data)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/platform/x86/apple-gmux.c:301:9: note: uninitialized use occurs here
301 | return val;
| ^~~
drivers/platform/x86/apple-gmux.c:290:2: note: remove the 'if' if its condition is always true
290 | if (gmux_mmio_wait(gmux_data)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/platform/x86/apple-gmux.c:286:9: note: initialize the variable 'val' to silence this warning
286 | u32 val;
| ^
| = 0
2 warnings generated.


vim +253 drivers/platform/x86/apple-gmux.c

247
248 static u8 gmux_mmio_read8(struct apple_gmux_data *gmux_data, int port)
249 {
250 u8 val;
251
252 mutex_lock(&gmux_data->index_lock);
> 253 if (gmux_mmio_wait(gmux_data)) {
254 iowrite8((port & 0xff), gmux_data->iomem_base + GMUX_MMIO_PORT_SELECT);
255 iowrite8(GMUX_MMIO_READ | sizeof(val),
256 gmux_data->iomem_base + GMUX_MMIO_COMMAND_SEND);
257 if (!gmux_mmio_wait(gmux_data))
258 return 0;
259 val = ioread8(gmux_data->iomem_base);
260 }
261 mutex_unlock(&gmux_data->index_lock);
262
263 return val;
264 }
265

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