[xilinx-xlnx:xlnx_rebase_v6.1_LTS 132/1065] drivers/of/configfs.c:134:9: warning: no previous prototype for 'cfs_overlay_item_dtbo_read'
kernel test robot
lkp at intel.com
Wed Apr 12 13:10:10 PDT 2023
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v6.1_LTS
head: e5753363b5e03fc0a3055d5476c6cca93e9ea28b
commit: 698cb7a307651a82aa2786c6ae8fac13e9cddf2d [132/1065] OF: DT-Overlay configfs interface (v8)
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20230413/202304130404.m8FEI58k-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/Xilinx/linux-xlnx/commit/698cb7a307651a82aa2786c6ae8fac13e9cddf2d
git remote add xilinx-xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xilinx-xlnx xlnx_rebase_v6.1_LTS
git checkout 698cb7a307651a82aa2786c6ae8fac13e9cddf2d
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sh olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sh SHELL=/bin/bash drivers/irqchip/ drivers/media/i2c/ drivers/media/mc/ drivers/net/ethernet/xilinx/ drivers/of/ drivers/ptp/ drivers/spi/ drivers/staging/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp at intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202304130404.m8FEI58k-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/of/configfs.c:134:9: warning: no previous prototype for 'cfs_overlay_item_dtbo_read' [-Wmissing-prototypes]
134 | ssize_t cfs_overlay_item_dtbo_read(struct config_item *item,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/of/configfs.c:156:9: warning: no previous prototype for 'cfs_overlay_item_dtbo_write' [-Wmissing-prototypes]
156 | ssize_t cfs_overlay_item_dtbo_write(struct config_item *item,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/cfs_overlay_item_dtbo_read +134 drivers/of/configfs.c
133
> 134 ssize_t cfs_overlay_item_dtbo_read(struct config_item *item,
135 void *buf, size_t max_count)
136 {
137 struct cfs_overlay_item *overlay = to_cfs_overlay_item(item);
138
139 pr_debug("%s: buf=%p max_count=%zu\n", __func__, buf, max_count);
140
141 if (!overlay->dtbo)
142 return 0;
143
144 /* copy if buffer provided */
145 if (buf) {
146 /* the buffer must be large enough */
147 if (overlay->dtbo_size > max_count)
148 return -ENOSPC;
149
150 memcpy(buf, overlay->dtbo, overlay->dtbo_size);
151 }
152
153 return overlay->dtbo_size;
154 }
155
> 156 ssize_t cfs_overlay_item_dtbo_write(struct config_item *item,
157 const void *buf, size_t count)
158 {
159 struct cfs_overlay_item *overlay = to_cfs_overlay_item(item);
160 int err;
161
162 /* if it's set do not allow changes */
163 if (overlay->path[0] != '\0' || overlay->dtbo_size > 0)
164 return -EPERM;
165
166 /* copy the contents */
167 overlay->dtbo = kmemdup(buf, count, GFP_KERNEL);
168 if (!overlay->dtbo)
169 return -ENOMEM;
170
171 overlay->dtbo_size = count;
172
173 err = create_overlay(overlay, overlay->dtbo);
174 if (err < 0)
175 goto out_err;
176
177 return count;
178
179 out_err:
180 kfree(overlay->dtbo);
181 overlay->dtbo = NULL;
182 overlay->dtbo_size = 0;
183
184 return err;
185 }
186
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
More information about the linux-arm-kernel
mailing list