Skip to contentSkip to conversation

drivers/nubus/proc.c:112:20: error: called object 'pde_data' is not a function or function pointer

PATCH kernel test robot 2 participants 2 messages Nov 30, 2021 – Dec 1, 2021

Subsystems (2)
lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 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=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/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=096d93a8a06292342e48b13021e6c8e097bd9acd
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/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=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=m68k SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate

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 = pde_data(inode);
         |                    ^~~~~~~~
   drivers/nubus/proc.c:110:37: note: declared here
     110 |         struct nubus_proc_pde_data *pde_data;
         |                                     ^~~~~~~~

vim +/pde_data +112 drivers/nubus/proc.c

106
107 static int nubus_proc_rsrc_show(struct seq_file *m, void *v)
108 {
109 struct inode *inode = m->private;
110 struct nubus_proc_pde_data *pde_data;
111

 > 112		pde_data = pde_data(inode);

113 if (!pde_data)
114 return 0;
115
116 if (pde_data->res_size > m->size)
117 return -EFBIG;
118
119 if (pde_data->res_size) {
120 int lanes = (int)proc_get_parent_data(inode);
121 struct nubus_dirent ent;
122
123 if (!lanes)
124 return 0;
125
126 ent.mask = lanes;
127 ent.base = pde_data->res_ptr;
128 ent.data = 0;
129 nubus_seq_write_rsrc_mem(m, &ent, pde_data->res_size);
130 } else {
131 unsigned int data = (unsigned int)pde_data->res_ptr;
132
133 seq_putc(m, data >> 16);
134 seq_putc(m, data >> 8);
135 seq_putc(m, data >> 0);
136 }
137 return 0;
138 }
139

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

maintainer
#1 lore raw
Quoted 21 lines · On Tue, 30 Nov 2021 22:42:12 +0800 kernel test robot <[email protected]> wrote:
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 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=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/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=096d93a8a06292342e48b13021e6c8e097bd9acd
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/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=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=m68k SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate

All errors (new ones prefixed by >>):

Quoted 7 lines

drivers/nubus/proc.c: In function 'nubus_proc_rsrc_show':

Quoted 1 line
Quoted 1 line

drivers/nubus/proc.c:112:20: error: called object 'pde_data' is not a function or function pointer

     112 |         pde_data = 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.

drivers/nubus/proc.c renamed from drivers/nubus/proc.c~proc-remove-pde_data-completely-fix +18 -18
@@ -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 = kmalloc(sizeof(*pde_data), GFP_KERNEL);
-	if (!pde_data)
+	pded = kmalloc(sizeof(*pded), GFP_KERNEL);
+	if (!pded)
 		return NULL;
 
-	pde_data->res_ptr = ptr;
-	pde_data->res_size = size;
-	return pde_data;
+	pded->res_ptr = ptr;
+	pded->res_size = size;
+	return pded;
 }
 
 static int nubus_proc_rsrc_show(struct seq_file *m, void *v)
 {
 	struct inode *inode = m->private;
-	struct nubus_proc_pde_data *pde_data;
+	struct nubus_proc_pde_data *pded;
 
-	pde_data = pde_data(inode);
-	if (!pde_data)
+	pded = 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 = (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 = lanes;
-		ent.base = pde_data->res_ptr;
+		ent.base = pded->res_ptr;
 		ent.data = 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 = (unsigned int)pde_data->res_ptr;
+		unsigned int data = (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 = nubus_proc_alloc_pde_data(nubus_dirptr(ent), size);
+		pded = nubus_proc_alloc_pde_data(nubus_dirptr(ent), size);
 	else
-		pde_data = NULL;
+		pded = 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,

_