Re: [PATCH v2] platform/x86: dell-uart-backlight: fall back to PCH PWM on UART timeout

From: kernel test robot

Date: Fri Oct 09 2026 - 19:47:47 EST


Hi,

kernel test robot noticed the following build errors:

[auto build test ERROR on linus/master]
[also build test ERROR on v7.3-rc6 next-20261008]
[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/chitranshmandhaniya-gmail-com/platform-x86-dell-uart-backlight-fall-back-to-PCH-PWM-on-UART-timeout/20261009-125401
base: linus/master
patch link: https://lore.kernel.org/r/20261009072401.52509-1-chitranshmandhaniya%40gmail.com
patch subject: [PATCH v2] platform/x86: dell-uart-backlight: fall back to PCH PWM on UART timeout
config: i386-buildonly-randconfig-1000-20261010 (https://download.01.org/0day-ci/archive/20261010/202610100706.x2lcbo7S-lkp@xxxxxxxxx/config)
compiler: gcc-13 (Debian 13.3.0-16) 13.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261010/202610100706.x2lcbo7S-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/202610100706.x2lcbo7S-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

drivers/platform/x86/dell/dell-uart-backlight.c: In function 'dell_pwm_fallback_register':
>> drivers/platform/x86/dell/dell-uart-backlight.c:318:16: error: cleanup argument not a function
318 | struct pci_dev *gpu __free(pci_dev_put) = NULL;
| ^~~~~~~


vim +318 drivers/platform/x86/dell/dell-uart-backlight.c

315
316 static int dell_pwm_fallback_register(struct device *dev)
317 {
> 318 struct pci_dev *gpu __free(pci_dev_put) = NULL;
319 struct backlight_properties props = {};
320 struct dell_pwm_backlight *pwm;
321 struct backlight_device *bl;
322 resource_size_t bar0;
323 u32 freq, duty, ctl;
324
325 gpu = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, NULL);
326 if (!gpu || gpu->vendor != PCI_VENDOR_ID_INTEL) {
327 dev_warn(dev, "No Intel GPU found, cannot fall back to PCH PWM\n");
328 return -ENODEV;
329 }
330
331 bar0 = pci_resource_start(gpu, 0);
332 if (!bar0) {
333 dev_warn(dev, "Intel GPU BAR0 not assigned\n");
334 return -ENODEV;
335 }
336
337 pwm = devm_kzalloc(dev, sizeof(*pwm), GFP_KERNEL);
338 if (!pwm)
339 return -ENOMEM;
340
341 pwm->mmio = devm_ioremap(dev, bar0 + PCH_BLC_PWM_CTL, SZ_16);
342 if (!pwm->mmio) {
343 dev_warn(dev, "Failed to ioremap PCH PWM registers\n");
344 return -ENOMEM;
345 }
346
347 ctl = readl(pwm->mmio);
348 freq = readl(pwm->mmio + (PCH_BLC_PWM_FREQ - PCH_BLC_PWM_CTL));
349 duty = readl(pwm->mmio + (PCH_BLC_PWM_DUTY - PCH_BLC_PWM_CTL));
350
351 if (!(ctl & PCH_BLC_PWM_ENABLE) || freq == 0) {
352 dev_warn(dev, "PCH PWM not enabled by BIOS (ctl=0x%08x freq=%u)\n", ctl, freq);
353 return -ENODEV;
354 }
355
356 pwm->max_brightness = freq;
357
358 dev_info(dev, "Falling back to PCH PWM backlight (max=%u current=%u)\n", freq, duty);
359
360 props.type = BACKLIGHT_PLATFORM;
361 props.brightness = duty;
362 props.max_brightness = freq;
363
364 bl = devm_backlight_device_register(dev, "dell_uart_backlight", dev, pwm,
365 &dell_pwm_backlight_ops, &props);
366 return PTR_ERR_OR_ZERO(bl);
367 }
368

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