tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 66984acf4b16f28a2cc0d5d6186b4b6bbfd92e26 commit: a4be501c749ab460697eed6d1235e9645fa08b30 [3075/3075] ub:ubus: Support for UB Character Device Driver config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20251108/202511082355.OR9JXP3r-lkp@i...) 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/20251108/202511082355.OR9JXP3r-lkp@i...) 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/202511082355.OR9JXP3r-lkp@intel.com/ All warnings (new ones prefixed by >>):
drivers/ub/ubus/ioctl.c:54:5: warning: no previous prototype for function 'ub_cdev_init' [-Wmissing-prototypes] 54 | int ub_cdev_init(void) | ^ drivers/ub/ubus/ioctl.c:54:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 54 | int ub_cdev_init(void) | ^ | static drivers/ub/ubus/ioctl.c:97:6: warning: no previous prototype for function 'ub_cdev_uninit' [-Wmissing-prototypes] 97 | void ub_cdev_uninit(void) | ^ drivers/ub/ubus/ioctl.c:97:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 97 | void ub_cdev_uninit(void) | ^ | static 2 warnings generated.
vim +/ub_cdev_init +54 drivers/ub/ubus/ioctl.c 53
54 int ub_cdev_init(void) 55 { 56 struct cdev *cdev = &ubus_ctx.cdev; 57 struct device *dev; 58 struct class *cls; 59 dev_t devno; 60 int ret; 61 62 ret = alloc_chrdev_region(&devno, 0, UBUS_MAX_DEVICES, UBUS_DEVICE_NAME); 63 if (ret) 64 return ret; 65 66 cdev_init(cdev, &ubus_fops); 67 ret = cdev_add(cdev, devno, UBUS_MAX_DEVICES); 68 if (ret) 69 goto out_unregister; 70 71 cls = class_create(UBUS_CLASS_NAME); 72 if (IS_ERR(cls)) { 73 ret = PTR_ERR(cls); 74 goto out_del; 75 } 76 77 dev = device_create(cls, NULL, devno, NULL, UBUS_DEVICE_NAME); 78 if (IS_ERR(dev)) { 79 ret = PTR_ERR(dev); 80 goto out_destroy; 81 } 82 83 ubus_ctx.ub_class = cls; 84 ubus_ctx.dev = dev; 85 ubus_ctx.devno = devno; 86 return 0; 87 88 out_destroy: 89 class_destroy(cls); 90 out_del: 91 cdev_del(cdev); 92 out_unregister: 93 unregister_chrdev_region(devno, UBUS_MAX_DEVICES); 94 return ret; 95 } 96 97 void ub_cdev_uninit(void)
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki