[openeuler:OLK-6.6 3075/3075] drivers/ub/ubus/port.c:31:5: warning: no previous prototype for function 'ub_port_read_byte'
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 5394cae209c4a4990d81be436ba17ae56fb09d16 commit: 210be966e79360fac509e7d66f9adb1712146c14 [3075/3075] ub:ubus: Support for UB port sysfs attribute files config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20251102/202511021607.J0DIAU9X-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/20251102/202511021607.J0DIAU9X-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/202511021607.J0DIAU9X-lkp@intel.com/ All warnings (new ones prefixed by >>):
drivers/ub/ubus/port.c:31:5: warning: no previous prototype for function 'ub_port_read_byte' [-Wmissing-prototypes] 31 | int ub_port_read_byte(struct ub_port *port, u32 pos, u8 *val) | ^ drivers/ub/ubus/port.c:31:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 31 | int ub_port_read_byte(struct ub_port *port, u32 pos, u8 *val) | ^ | static drivers/ub/ubus/port.c:38:5: warning: no previous prototype for function 'ub_port_read_word' [-Wmissing-prototypes] 38 | int ub_port_read_word(struct ub_port *port, u32 pos, u16 *val) | ^ drivers/ub/ubus/port.c:38:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 38 | int ub_port_read_word(struct ub_port *port, u32 pos, u16 *val) | ^ | static drivers/ub/ubus/port.c:45:5: warning: no previous prototype for function 'ub_port_read_dword' [-Wmissing-prototypes] 45 | int ub_port_read_dword(struct ub_port *port, u32 pos, u32 *val) | ^ drivers/ub/ubus/port.c:45:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 45 | int ub_port_read_dword(struct ub_port *port, u32 pos, u32 *val) | ^ | static drivers/ub/ubus/port.c:52:5: warning: no previous prototype for function 'ub_port_write_byte' [-Wmissing-prototypes] 52 | int ub_port_write_byte(struct ub_port *port, u32 pos, u8 val) | ^ drivers/ub/ubus/port.c:52:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 52 | int ub_port_write_byte(struct ub_port *port, u32 pos, u8 val) | ^ | static drivers/ub/ubus/port.c:59:5: warning: no previous prototype for function 'ub_port_write_word' [-Wmissing-prototypes] 59 | int ub_port_write_word(struct ub_port *port, u32 pos, u16 val) | ^ drivers/ub/ubus/port.c:59:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 59 | int ub_port_write_word(struct ub_port *port, u32 pos, u16 val) | ^ | static drivers/ub/ubus/port.c:66:5: warning: no previous prototype for function 'ub_port_write_dword' [-Wmissing-prototypes] 66 | int ub_port_write_dword(struct ub_port *port, u32 pos, u32 val) | ^ drivers/ub/ubus/port.c:66:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 66 | int ub_port_write_dword(struct ub_port *port, u32 pos, u32 val) | ^ | static 6 warnings generated.
vim +/ub_port_read_byte +31 drivers/ub/ubus/port.c 21 22 #define UB_PORT_ATTR_RO(field) \ 23 static struct ub_port_attribute ub_port_attr_##field = __ATTR_RO(field) 24 25 #define UB_PORT_ATTR_RW(field) \ 26 static struct ub_port_attribute ub_port_attr_##field = __ATTR_RW(field) 27 28 #define UB_PORT_ATTR_WO(field) \ 29 static struct ub_port_attribute ub_port_attr_##field = __ATTR_WO(field) 30
31 int ub_port_read_byte(struct ub_port *port, u32 pos, u8 *val) 32 { 33 u64 base = UB_PORT_SLICE_START + port->index * UB_PORT_SLICE_SIZE; 34 35 return ub_cfg_read_byte(port->uent, base + pos, val); 36 } 37 38 int ub_port_read_word(struct ub_port *port, u32 pos, u16 *val) 39 { 40 u64 base = UB_PORT_SLICE_START + port->index * UB_PORT_SLICE_SIZE; 41 42 return ub_cfg_read_word(port->uent, base + pos, val); 43 } 44 45 int ub_port_read_dword(struct ub_port *port, u32 pos, u32 *val) 46 { 47 u64 base = UB_PORT_SLICE_START + port->index * UB_PORT_SLICE_SIZE; 48 49 return ub_cfg_read_dword(port->uent, base + pos, val); 50 } 51 52 int ub_port_write_byte(struct ub_port *port, u32 pos, u8 val) 53 { 54 u64 base = UB_PORT_SLICE_START + port->index * UB_PORT_SLICE_SIZE; 55 56 return ub_cfg_write_byte(port->uent, base + pos, val); 57 } 58 59 int ub_port_write_word(struct ub_port *port, u32 pos, u16 val) 60 { 61 u64 base = UB_PORT_SLICE_START + port->index * UB_PORT_SLICE_SIZE; 62 63 return ub_cfg_write_word(port->uent, base + pos, val); 64 } 65
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot