tree:
https://git.kernel.org/pub/scm/linux/kernel/git/geoff/ps3-linux.git ps3-queue
head: 784f61fd740337e12f18566eb27e93ececfaa3d6
commit: 7ccac6e8a71db8e2c9c2fa88b5286dda2cab4975 [4/15] powerpc/ps3: Add firmware version
to proc
config: powerpc64-randconfig-s031-20210522 (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
reproduce:
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
#
https://git.kernel.org/pub/scm/linux/kernel/git/geoff/ps3-linux.git/commi...
git remote add ps3
https://git.kernel.org/pub/scm/linux/kernel/git/geoff/ps3-linux.git
git fetch --no-tags ps3 ps3-queue
git checkout 7ccac6e8a71db8e2c9c2fa88b5286dda2cab4975
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1
CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/powerpc/platforms/ps3/setup.c: In function 'ps3_setup_proc':
> arch/powerpc/platforms/ps3/setup.c:209:31: error: unused variable
'proc_ops' [-Werror=unused-variable]
209 | static const struct
proc_ops proc_ops = {
| ^~~~~~~~
At top level:
> arch/powerpc/platforms/ps3/setup.c:209:31: error:
'proc_ops' defined but not used [-Werror=unused-const-variable=]
cc1: all
warnings being treated as errors
vim +/proc_ops +209 arch/powerpc/platforms/ps3/setup.c
206
207 static int __init ps3_setup_proc(void)
208 {
209 static const struct proc_ops proc_ops = {
210 .proc_read = ps3_fw_ver_read,
211 .proc_lseek = default_llseek,
212 };
213 struct proc_dir_entry *entry;
214
215 entry = proc_mkdir("ps3", NULL);
216
217 if (!entry) {
218 pr_err("%s:%d: failed.\n", __func__, __LINE__);
219 return 1;
220 }
221
222 entry = proc_create_data("ps3/firmware-version", S_IFREG | 0444, NULL,
223 &proc_ops, NULL);
224
225 if (!entry) {
226 pr_err("%s:%d: failed.\n", __func__, __LINE__);
227 return 1;
228 }
229
230 proc_set_size(entry, strlen(ps3_firmware_version_str));
231
232 pr_debug("%s:%d: '%s' = %zd bytes\n", __func__, __LINE__,
233 ps3_firmware_version_str, strlen(ps3_firmware_version_str));
234
235 return 0;
236 }
237 core_initcall(ps3_setup_proc);
238
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org