Content-Type: multipart/mixed; boundary="===============3551183824936191322==" MIME-Version: 1.0 From: Andrew Morton To: kbuild-all@lists.01.org Subject: Re: [linux-next:master 4289/4301] drivers/nubus/proc.c:112:20: error: called object 'pde_data' is not a function or function pointer Date: Tue, 30 Nov 2021 18:52:04 -0800 Message-ID: <20211130185204.5f0f95c2c1000e10f51c8f46@linux-foundation.org> In-Reply-To: <202111302247.X1X9fCjn-lkp@intel.com> List-Id: --===============3551183824936191322== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Tue, 30 Nov 2021 22:42:12 +0800 kernel test robot wrot= e: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.g= it master > head: 34f255a1e91ab44ff8926cf8294ff9144e62e861 > commit: 096d93a8a06292342e48b13021e6c8e097bd9acd [4289/4301] proc: remove= PDE_DATA() completely > config: m68k-defconfig (https://download.01.org/0day-ci/archive/20211130/= 202111302247.X1X9fCjn-lkp(a)intel.com/config) > compiler: m68k-linux-gcc (GCC) 11.2.0 > reproduce (this is a W=3D1 build): > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbi= n/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next= .git/commit/?id=3D096d93a8a06292342e48b13021e6c8e097bd9acd > git remote add linux-next https://git.kernel.org/pub/scm/linux/ke= rnel/git/next/linux-next.git > git fetch --no-tags linux-next master > git checkout 096d93a8a06292342e48b13021e6c8e097bd9acd > # save the config file to linux build tree > mkdir build_dir > COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cro= ss O=3Dbuild_dir ARCH=3Dm68k SHELL=3D/bin/bash > = > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot > = > All errors (new ones prefixed by >>): > = > drivers/nubus/proc.c: In function 'nubus_proc_rsrc_show': > >> drivers/nubus/proc.c:112:20: error: called object 'pde_data' is not a = function or function pointer > 112 | pde_data =3D pde_data(inode); > | ^~~~~~~~ > drivers/nubus/proc.c:110:37: note: declared here > 110 | struct nubus_proc_pde_data *pde_data; > | ^~~~~~~~ Thanks. I assume this will work. --- a/drivers/nubus/proc.c~proc-remove-pde_data-completely-fix +++ a/drivers/nubus/proc.c @@ -93,30 +93,30 @@ struct nubus_proc_pde_data { static struct nubus_proc_pde_data * nubus_proc_alloc_pde_data(unsigned char *ptr, unsigned int size) { - struct nubus_proc_pde_data *pde_data; + struct nubus_proc_pded *pded; = - pde_data =3D kmalloc(sizeof(*pde_data), GFP_KERNEL); - if (!pde_data) + pded =3D kmalloc(sizeof(*pded), GFP_KERNEL); + if (!pded) return NULL; = - pde_data->res_ptr =3D ptr; - pde_data->res_size =3D size; - return pde_data; + pded->res_ptr =3D ptr; + pded->res_size =3D size; + return pded; } = static int nubus_proc_rsrc_show(struct seq_file *m, void *v) { struct inode *inode =3D m->private; - struct nubus_proc_pde_data *pde_data; + struct nubus_proc_pde_data *pded; = - pde_data =3D pde_data(inode); - if (!pde_data) + pded =3D pde_data(inode); + if (!pded) return 0; = - if (pde_data->res_size > m->size) + if (pded->res_size > m->size) return -EFBIG; = - if (pde_data->res_size) { + if (pded->res_size) { int lanes =3D (int)proc_get_parent_data(inode); struct nubus_dirent ent; = @@ -124,11 +124,11 @@ static int nubus_proc_rsrc_show(struct s return 0; = ent.mask =3D lanes; - ent.base =3D pde_data->res_ptr; + ent.base =3D pded->res_ptr; ent.data =3D 0; - nubus_seq_write_rsrc_mem(m, &ent, pde_data->res_size); + nubus_seq_write_rsrc_mem(m, &ent, pded->res_size); } else { - unsigned int data =3D (unsigned int)pde_data->res_ptr; + unsigned int data =3D (unsigned int)pded->res_ptr; = seq_putc(m, data >> 16); seq_putc(m, data >> 8); @@ -142,18 +142,18 @@ void nubus_proc_add_rsrc_mem(struct proc unsigned int size) { char name[9]; - struct nubus_proc_pde_data *pde_data; + struct nubus_proc_pde_data *pded; = if (!procdir) return; = snprintf(name, sizeof(name), "%x", ent->type); if (size) - pde_data =3D nubus_proc_alloc_pde_data(nubus_dirptr(ent), size); + pded =3D nubus_proc_alloc_pde_data(nubus_dirptr(ent), size); else - pde_data =3D NULL; + pded =3D NULL; proc_create_single_data(name, S_IFREG | 0444, procdir, - nubus_proc_rsrc_show, pde_data); + nubus_proc_rsrc_show, pded); } = void nubus_proc_add_rsrc(struct proc_dir_entry *procdir, _ --===============3551183824936191322==--