Skip to contentSkip to conversation

mm/alloc_tag.c:356:58: error: implicit declaration of function 'compat_ptr'

PATCH kernel test robot 3 participants 6 messages Jul 9 – Jul 13 Memory management

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-new
head:   59e34180e138a293260301c139cf7ee800978533
commit: 27ace96bf8195484c9e9e1a08eb5af5a4e81f9f0 [344/369] alloc_tag: add ioctl to /proc/allocinfo
config: sparc64-randconfig-001-20260709 (https://download.01.org/0day-ci/archive/20260709/[email protected]/config)
compiler: sparc64-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260709/[email protected]/reproduce)

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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

mm/alloc_tag.c: In function 'allocinfo_compat_ioctl':

>> mm/alloc_tag.c:356:58: error: implicit declaration of function 'compat_ptr' [-Wimplicit-function-declaration]
     356 |         return allocinfo_ioctl(file, cmd, (unsigned long)compat_ptr(arg));
         |                                                          ^~~~~~~~~~

vim +/compat_ptr +356 mm/alloc_tag.c

351
352 #ifdef CONFIG_COMPAT
353 static long allocinfo_compat_ioctl(struct file *file, unsigned int cmd,
354 unsigned long arg)
355 {

 > 356		return allocinfo_ioctl(file, cmd, (unsigned long)compat_ptr(arg));

357 }
358 #endif
359

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

#1 lore raw
Quoted 15 lines · kernel test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-new
head:   59e34180e138a293260301c139cf7ee800978533
commit: 27ace96bf8195484c9e9e1a08eb5af5a4e81f9f0 [344/369] alloc_tag: add ioctl to /proc/allocinfo
config: sparc64-randconfig-001-20260709 (https://download.01.org/0day-ci/archive/20260709/[email protected]/config)
compiler: sparc64-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260709/[email protected]/reproduce)

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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

Quoted 7 lines

mm/alloc_tag.c: In function 'allocinfo_compat_ioctl':

Quoted 1 line
Quoted 1 line

mm/alloc_tag.c:356:58: error: implicit declaration of function 'compat_ptr' [-Wimplicit-function-declaration]

     356 |         return allocinfo_ioctl(file, cmd, (unsigned long)compat_ptr(arg));
         |                                                          ^~~~~~~~~~

vim +/compat_ptr +356 mm/alloc_tag.c

Missing #include <linux/compat.h>
After adding it the error goes away.

Quoted 14 lines

351
352 #ifdef CONFIG_COMPAT
353 static long allocinfo_compat_ioctl(struct file *file, unsigned int cmd,
354 unsigned long arg)
355 {

Quoted 1 line

356 return allocinfo_ioctl(file, cmd, (unsigned long)compat_ptr(arg));

357 }
358 #endif
359

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

#2 lore raw

Hi everyone,

I can send a fixup patch for this error if needed. Could someone guide me on whether I should amend the original patch-set and send a v9 patchset or if there's another way to handle this without sending a v9 patchset?

Thanks,
Abhishek.

Quoted 42 lines · Suren Baghdasaryan
Quoted 15 lines · kernel test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-new
head:   59e34180e138a293260301c139cf7ee800978533
commit: 27ace96bf8195484c9e9e1a08eb5af5a4e81f9f0 [344/369] alloc_tag: add ioctl to /proc/allocinfo
config: sparc64-randconfig-001-20260709 (https://download.01.org/0day-ci/archive/20260709/[email protected]/config)
compiler: sparc64-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260709/[email protected]/reproduce)

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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

Quoted 7 lines

mm/alloc_tag.c: In function 'allocinfo_compat_ioctl':

Quoted 1 line
Quoted 1 line

mm/alloc_tag.c:356:58: error: implicit declaration of function 'compat_ptr' [-Wimplicit-function-declaration]

     356 |         return allocinfo_ioctl(file, cmd, (unsigned long)compat_ptr(arg));
         |                                                          ^~~~~~~~~~

vim +/compat_ptr +356 mm/alloc_tag.c

Missing #include <linux/compat.h>
After adding it the error goes away.

Quoted 14 lines

351
352 #ifdef CONFIG_COMPAT
353 static long allocinfo_compat_ioctl(struct file *file, unsigned int cmd,
354 unsigned long arg)
355 {

Quoted 1 line

356 return allocinfo_ioctl(file, cmd, (unsigned long)compat_ptr(arg));

357 }
358 #endif
359

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

#3 lore raw
Quoted 7 lines · Abhishek Bapat

Hi everyone,

I can send a fixup patch for this error if needed. Could someone guide me on whether I should amend the original patch-set and send a v9 patchset or if there's another way to handle this without sending a v9 patchset?

I think Andrew already fixed it up (I saw an email flying by but I'll double-check).

Quoted 47 lines

Thanks,
Abhishek.

Quoted 42 lines · Suren Baghdasaryan
Quoted 15 lines · kernel test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-new
head:   59e34180e138a293260301c139cf7ee800978533
commit: 27ace96bf8195484c9e9e1a08eb5af5a4e81f9f0 [344/369] alloc_tag: add ioctl to /proc/allocinfo
config: sparc64-randconfig-001-20260709 (https://download.01.org/0day-ci/archive/20260709/[email protected]/config)
compiler: sparc64-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260709/[email protected]/reproduce)

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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

Quoted 7 lines

mm/alloc_tag.c: In function 'allocinfo_compat_ioctl':

Quoted 1 line
Quoted 1 line

mm/alloc_tag.c:356:58: error: implicit declaration of function 'compat_ptr' [-Wimplicit-function-declaration]

     356 |         return allocinfo_ioctl(file, cmd, (unsigned long)compat_ptr(arg));
         |                                                          ^~~~~~~~~~

vim +/compat_ptr +356 mm/alloc_tag.c

Missing #include <linux/compat.h>
After adding it the error goes away.

Quoted 14 lines

351
352 #ifdef CONFIG_COMPAT
353 static long allocinfo_compat_ioctl(struct file *file, unsigned int cmd,
354 unsigned long arg)
355 {

Quoted 1 line

356 return allocinfo_ioctl(file, cmd, (unsigned long)compat_ptr(arg));

357 }
358 #endif
359

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

#4 lore raw
Quoted 5 lines · Suren Baghdasaryan
Quoted 3 lines · Abhishek Bapat

Hi everyone,

Quoted 7 lines
Quoted 4 lines

I can send a fixup patch for this error if needed. Could someone guide me on whether I should amend the original patch-set and send a v9 patchset or if there's another way to handle this without sending a v9 patchset?

I think Andrew already fixed it up (I saw an email flying by but I'll double-check).

Here: https://lore.kernel.org/all/[email protected]/

Quoted 48 lines
Quoted 48 lines

Thanks,
Abhishek.

Quoted 42 lines · Suren Baghdasaryan
Quoted 15 lines · kernel test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-new
head:   59e34180e138a293260301c139cf7ee800978533
commit: 27ace96bf8195484c9e9e1a08eb5af5a4e81f9f0 [344/369] alloc_tag: add ioctl to /proc/allocinfo
config: sparc64-randconfig-001-20260709 (https://download.01.org/0day-ci/archive/20260709/[email protected]/config)
compiler: sparc64-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260709/[email protected]/reproduce)

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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

Quoted 7 lines

mm/alloc_tag.c: In function 'allocinfo_compat_ioctl':

Quoted 1 line
Quoted 1 line

mm/alloc_tag.c:356:58: error: implicit declaration of function 'compat_ptr' [-Wimplicit-function-declaration]

     356 |         return allocinfo_ioctl(file, cmd, (unsigned long)compat_ptr(arg));
         |                                                          ^~~~~~~~~~

vim +/compat_ptr +356 mm/alloc_tag.c

Missing #include <linux/compat.h>
After adding it the error goes away.

Quoted 14 lines

351
352 #ifdef CONFIG_COMPAT
353 static long allocinfo_compat_ioctl(struct file *file, unsigned int cmd,
354 unsigned long arg)
355 {

Quoted 1 line

356 return allocinfo_ioctl(file, cmd, (unsigned long)compat_ptr(arg));

357 }
358 #endif
359

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

#5 lore raw
Quoted 12 lines · Suren Baghdasaryan
Quoted 10 lines · Suren Baghdasaryan
Quoted 7 lines · Abhishek Bapat

Hi everyone,

I can send a fixup patch for this error if needed. Could someone guide me on whether I should amend the original patch-set and send a v9 patchset or if there's another way to handle this without sending a v9 patchset?

Quoted 5 lines
Quoted 2 lines

I think Andrew already fixed it up (I saw an email flying by but I'll double-check).

Here: https://lore.kernel.org/all/[email protected]/

Ahh I see. Sounds good, thanks Andrew!

Quoted 48 lines
Quoted 48 lines
Quoted 48 lines

Thanks,
Abhishek.

Quoted 42 lines · Suren Baghdasaryan
Quoted 15 lines · kernel test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-new
head:   59e34180e138a293260301c139cf7ee800978533
commit: 27ace96bf8195484c9e9e1a08eb5af5a4e81f9f0 [344/369] alloc_tag: add ioctl to /proc/allocinfo
config: sparc64-randconfig-001-20260709 (https://download.01.org/0day-ci/archive/20260709/[email protected]/config)
compiler: sparc64-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260709/[email protected]/reproduce)

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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

Quoted 7 lines

mm/alloc_tag.c: In function 'allocinfo_compat_ioctl':

Quoted 1 line
Quoted 1 line

mm/alloc_tag.c:356:58: error: implicit declaration of function 'compat_ptr' [-Wimplicit-function-declaration]

     356 |         return allocinfo_ioctl(file, cmd, (unsigned long)compat_ptr(arg));
         |                                                          ^~~~~~~~~~

vim +/compat_ptr +356 mm/alloc_tag.c

Missing #include <linux/compat.h>
After adding it the error goes away.

Quoted 14 lines

351
352 #ifdef CONFIG_COMPAT
353 static long allocinfo_compat_ioctl(struct file *file, unsigned int cmd,
354 unsigned long arg)
355 {

Quoted 1 line

356 return allocinfo_ioctl(file, cmd, (unsigned long)compat_ptr(arg));

357 }
358 #endif
359

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki