[PATCH v12 8/8] power: reset: reboot-mode: Expose sysfs for registered reboot_modes
kernel test robot
lkp at intel.com
Tue Jul 22 10:22:57 PDT 2025
Hi Shivendra,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 97987520025658f30bb787a99ffbd9bbff9ffc9d]
url: https://github.com/intel-lab-lkp/linux/commits/Shivendra-Pratap/power-reset-reboot-mode-Add-device-tree-node-based-registration/20250722-023323
base: 97987520025658f30bb787a99ffbd9bbff9ffc9d
patch link: https://lore.kernel.org/r/20250721-arm-psci-system_reset2-vendor-reboots-v12-8-87bac3ec422e%40oss.qualcomm.com
patch subject: [PATCH v12 8/8] power: reset: reboot-mode: Expose sysfs for registered reboot_modes
config: arc-randconfig-r111-20250722 (https://download.01.org/0day-ci/archive/20250723/202507230101.w90DnJxJ-lkp@intel.com/config)
compiler: arc-linux-gcc (GCC) 8.5.0
reproduce: (https://download.01.org/0day-ci/archive/20250723/202507230101.w90DnJxJ-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 at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202507230101.w90DnJxJ-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/power/reset/reboot-mode.c:82:76: sparse: sparse: Using plain integer as NULL pointer
vim +82 drivers/power/reset/reboot-mode.c
74
75 static ssize_t reboot_modes_show(struct device *dev, struct device_attribute *attr, char *buf)
76 {
77 struct reboot_mode_driver **devres_reboot;
78 struct reboot_mode_driver *reboot;
79 struct mode_info *info;
80 ssize_t size = 0;
81
> 82 devres_reboot = devres_find(dev, release_reboot_mode_device, NULL, 0);
83 reboot = *devres_reboot;
84 mutex_lock(&reboot->rb_lock);
85 list_for_each_entry(info, &reboot->head, list) {
86 size += sprintf(buf + size, "%s,", info->mode);
87 }
88 mutex_unlock(&reboot->rb_lock);
89
90 if (size) {
91 size += sprintf(buf + size - 1, "\n");
92 return size;
93 }
94
95 return -ENODATA;
96 }
97 static DEVICE_ATTR_RO(reboot_modes);
98
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
More information about the linux-arm-kernel
mailing list