[PATCH 1/4] fpga: altera-pr-ip: Add dummy definitions of API functions

Ian Abbott posted 4 patches 3 months ago
There is a newer version of this series
[PATCH 1/4] fpga: altera-pr-ip: Add dummy definitions of API functions
Posted by Ian Abbott 3 months ago
Add a dummy definition of alt_pr_register() for build testing.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
---
 include/linux/fpga/altera-pr-ip-core.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/include/linux/fpga/altera-pr-ip-core.h b/include/linux/fpga/altera-pr-ip-core.h
index a6b4c07858cc..4a5aa9adaccc 100644
--- a/include/linux/fpga/altera-pr-ip-core.h
+++ b/include/linux/fpga/altera-pr-ip-core.h
@@ -11,7 +11,13 @@
 #ifndef _ALT_PR_IP_CORE_H
 #define _ALT_PR_IP_CORE_H
 #include <linux/io.h>
+#include <asm/errno.h>
 
+#ifdef CONFIG_ALTERA_PR_IP_CORE
 int alt_pr_register(struct device *dev, void __iomem *reg_base);
-
+#else
+static inline int alt_pr_register(struct device *dev, void __iomem *reg_base)
+{
+	return -EOPNOTSUPP;
+}
 #endif /* _ALT_PR_IP_CORE_H */
-- 
2.51.0
Re: [PATCH 1/4] fpga: altera-pr-ip: Add dummy definitions of API functions
Posted by kernel test robot 3 months ago
Hi Ian,

kernel test robot noticed the following build errors:

[auto build test ERROR on linus/master]
[also build test ERROR on v6.18-rc4 next-20251104]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Ian-Abbott/fpga-altera-pr-ip-Add-dummy-definitions-of-API-functions/20251105-000956
base:   linus/master
patch link:    https://lore.kernel.org/r/20251104153013.154463-2-abbotti%40mev.co.uk
patch subject: [PATCH 1/4] fpga: altera-pr-ip: Add dummy definitions of API functions
config: arm64-randconfig-001-20251105 (https://download.01.org/0day-ci/archive/20251105/202511051539.q44jggF0-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251105/202511051539.q44jggF0-lkp@intel.com/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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202511051539.q44jggF0-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from drivers/fpga/altera-pr-ip-core.c:11:
>> include/linux/fpga/altera-pr-ip-core.h:11:2: error: unterminated conditional directive
      11 | #ifndef _ALT_PR_IP_CORE_H
         |  ^
   In file included from drivers/fpga/altera-pr-ip-core.c:12:
   In file included from include/linux/fpga/fpga-mgr.h:12:
   In file included from include/linux/platform_device.h:13:
   In file included from include/linux/device.h:32:
   In file included from include/linux/device/driver.h:21:
   In file included from include/linux/module.h:20:
   In file included from include/linux/elf.h:6:
   In file included from arch/arm64/include/asm/elf.h:141:
   In file included from include/linux/fs.h:34:
   In file included from include/linux/percpu-rwsem.h:7:
   In file included from include/linux/rcuwait.h:6:
   In file included from include/linux/sched/signal.h:6:
   include/linux/signal.h:98:11: warning: array index 3 is past the end of the array (that has type 'unsigned long[1]') [-Warray-bounds]
      98 |                 return (set->sig[3] | set->sig[2] |
         |                         ^        ~
   include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here
      62 |         unsigned long sig[_NSIG_WORDS];
         |         ^
   In file included from drivers/fpga/altera-pr-ip-core.c:12:
   In file included from include/linux/fpga/fpga-mgr.h:12:
   In file included from include/linux/platform_device.h:13:
   In file included from include/linux/device.h:32:
   In file included from include/linux/device/driver.h:21:
   In file included from include/linux/module.h:20:
   In file included from include/linux/elf.h:6:
   In file included from arch/arm64/include/asm/elf.h:141:
   In file included from include/linux/fs.h:34:
   In file included from include/linux/percpu-rwsem.h:7:
   In file included from include/linux/rcuwait.h:6:
   In file included from include/linux/sched/signal.h:6:
   include/linux/signal.h:98:25: warning: array index 2 is past the end of the array (that has type 'unsigned long[1]') [-Warray-bounds]
      98 |                 return (set->sig[3] | set->sig[2] |
         |                                       ^        ~
   include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here
      62 |         unsigned long sig[_NSIG_WORDS];
         |         ^
   In file included from drivers/fpga/altera-pr-ip-core.c:12:
   In file included from include/linux/fpga/fpga-mgr.h:12:
   In file included from include/linux/platform_device.h:13:
   In file included from include/linux/device.h:32:
   In file included from include/linux/device/driver.h:21:
   In file included from include/linux/module.h:20:
   In file included from include/linux/elf.h:6:
   In file included from arch/arm64/include/asm/elf.h:141:
   In file included from include/linux/fs.h:34:
   In file included from include/linux/percpu-rwsem.h:7:
   In file included from include/linux/rcuwait.h:6:
   In file included from include/linux/sched/signal.h:6:
   include/linux/signal.h:99:4: warning: array index 1 is past the end of the array (that has type 'unsigned long[1]') [-Warray-bounds]
      99 |                         set->sig[1] | set->sig[0]) == 0;
         |                         ^        ~
   include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here
      62 |         unsigned long sig[_NSIG_WORDS];
         |         ^
   In file included from drivers/fpga/altera-pr-ip-core.c:12:
   In file included from include/linux/fpga/fpga-mgr.h:12:
   In file included from include/linux/platform_device.h:13:
   In file included from include/linux/device.h:32:
   In file included from include/linux/device/driver.h:21:
   In file included from include/linux/module.h:20:
   In file included from include/linux/elf.h:6:
   In file included from arch/arm64/include/asm/elf.h:141:
   In file included from include/linux/fs.h:34:
   In file included from include/linux/percpu-rwsem.h:7:
   In file included from include/linux/rcuwait.h:6:
   In file included from include/linux/sched/signal.h:6:
   include/linux/signal.h:101:11: warning: array index 1 is past the end of the array (that has type 'unsigned long[1]') [-Warray-bounds]
     101 |                 return (set->sig[1] | set->sig[0]) == 0;
         |                         ^        ~
   include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here
      62 |         unsigned long sig[_NSIG_WORDS];
         |         ^
   In file included from drivers/fpga/altera-pr-ip-core.c:12:
   In file included from include/linux/fpga/fpga-mgr.h:12:
   In file included from include/linux/platform_device.h:13:
   In file included from include/linux/device.h:32:
   In file included from include/linux/device/driver.h:21:
   In file included from include/linux/module.h:20:
   In file included from include/linux/elf.h:6:
   In file included from arch/arm64/include/asm/elf.h:141:
   In file included from include/linux/fs.h:34:
   In file included from include/linux/percpu-rwsem.h:7:
   In file included from include/linux/rcuwait.h:6:
   In file included from include/linux/sched/signal.h:6:
   include/linux/signal.h:114:11: warning: array index 3 is past the end of the array (that has type 'const unsigned long[1]') [-Warray-bounds]
     114 |                 return  (set1->sig[3] == set2->sig[3]) &&
         |                          ^         ~
   include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here
      62 |         unsigned long sig[_NSIG_WORDS];
         |         ^
   In file included from drivers/fpga/altera-pr-ip-core.c:12:
   In file included from include/linux/fpga/fpga-mgr.h:12:
   In file included from include/linux/platform_device.h:13:
   In file included from include/linux/device.h:32:
   In file included from include/linux/device/driver.h:21:
   In file included from include/linux/module.h:20:
   In file included from include/linux/elf.h:6:
   In file included from arch/arm64/include/asm/elf.h:141:
--
   In file included from altera-pr-ip-core.c:11:
>> include/linux/fpga/altera-pr-ip-core.h:11:2: error: unterminated conditional directive
      11 | #ifndef _ALT_PR_IP_CORE_H
         |  ^
   In file included from altera-pr-ip-core.c:12:
   In file included from include/linux/fpga/fpga-mgr.h:12:
   In file included from include/linux/platform_device.h:13:
   In file included from include/linux/device.h:32:
   In file included from include/linux/device/driver.h:21:
   In file included from include/linux/module.h:20:
   In file included from include/linux/elf.h:6:
   In file included from arch/arm64/include/asm/elf.h:141:
   In file included from include/linux/fs.h:34:
   In file included from include/linux/percpu-rwsem.h:7:
   In file included from include/linux/rcuwait.h:6:
   In file included from include/linux/sched/signal.h:6:
   include/linux/signal.h:98:11: warning: array index 3 is past the end of the array (that has type 'unsigned long[1]') [-Warray-bounds]
      98 |                 return (set->sig[3] | set->sig[2] |
         |                         ^        ~
   include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here
      62 |         unsigned long sig[_NSIG_WORDS];
         |         ^
   In file included from altera-pr-ip-core.c:12:
   In file included from include/linux/fpga/fpga-mgr.h:12:
   In file included from include/linux/platform_device.h:13:
   In file included from include/linux/device.h:32:
   In file included from include/linux/device/driver.h:21:
   In file included from include/linux/module.h:20:
   In file included from include/linux/elf.h:6:
   In file included from arch/arm64/include/asm/elf.h:141:
   In file included from include/linux/fs.h:34:
   In file included from include/linux/percpu-rwsem.h:7:
   In file included from include/linux/rcuwait.h:6:
   In file included from include/linux/sched/signal.h:6:
   include/linux/signal.h:98:25: warning: array index 2 is past the end of the array (that has type 'unsigned long[1]') [-Warray-bounds]
      98 |                 return (set->sig[3] | set->sig[2] |
         |                                       ^        ~
   include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here
      62 |         unsigned long sig[_NSIG_WORDS];
         |         ^
   In file included from altera-pr-ip-core.c:12:
   In file included from include/linux/fpga/fpga-mgr.h:12:
   In file included from include/linux/platform_device.h:13:
   In file included from include/linux/device.h:32:
   In file included from include/linux/device/driver.h:21:
   In file included from include/linux/module.h:20:
   In file included from include/linux/elf.h:6:
   In file included from arch/arm64/include/asm/elf.h:141:
   In file included from include/linux/fs.h:34:
   In file included from include/linux/percpu-rwsem.h:7:
   In file included from include/linux/rcuwait.h:6:
   In file included from include/linux/sched/signal.h:6:
   include/linux/signal.h:99:4: warning: array index 1 is past the end of the array (that has type 'unsigned long[1]') [-Warray-bounds]
      99 |                         set->sig[1] | set->sig[0]) == 0;
         |                         ^        ~
   include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here
      62 |         unsigned long sig[_NSIG_WORDS];
         |         ^
   In file included from altera-pr-ip-core.c:12:
   In file included from include/linux/fpga/fpga-mgr.h:12:
   In file included from include/linux/platform_device.h:13:
   In file included from include/linux/device.h:32:
   In file included from include/linux/device/driver.h:21:
   In file included from include/linux/module.h:20:
   In file included from include/linux/elf.h:6:
   In file included from arch/arm64/include/asm/elf.h:141:
   In file included from include/linux/fs.h:34:
   In file included from include/linux/percpu-rwsem.h:7:
   In file included from include/linux/rcuwait.h:6:
   In file included from include/linux/sched/signal.h:6:
   include/linux/signal.h:101:11: warning: array index 1 is past the end of the array (that has type 'unsigned long[1]') [-Warray-bounds]
     101 |                 return (set->sig[1] | set->sig[0]) == 0;
         |                         ^        ~
   include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here
      62 |         unsigned long sig[_NSIG_WORDS];
         |         ^
   In file included from altera-pr-ip-core.c:12:
   In file included from include/linux/fpga/fpga-mgr.h:12:
   In file included from include/linux/platform_device.h:13:
   In file included from include/linux/device.h:32:
   In file included from include/linux/device/driver.h:21:
   In file included from include/linux/module.h:20:
   In file included from include/linux/elf.h:6:
   In file included from arch/arm64/include/asm/elf.h:141:
   In file included from include/linux/fs.h:34:
   In file included from include/linux/percpu-rwsem.h:7:
   In file included from include/linux/rcuwait.h:6:
   In file included from include/linux/sched/signal.h:6:
   include/linux/signal.h:114:11: warning: array index 3 is past the end of the array (that has type 'const unsigned long[1]') [-Warray-bounds]
     114 |                 return  (set1->sig[3] == set2->sig[3]) &&
         |                          ^         ~
   include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here
      62 |         unsigned long sig[_NSIG_WORDS];
         |         ^
   In file included from altera-pr-ip-core.c:12:
   In file included from include/linux/fpga/fpga-mgr.h:12:
   In file included from include/linux/platform_device.h:13:
   In file included from include/linux/device.h:32:
   In file included from include/linux/device/driver.h:21:
   In file included from include/linux/module.h:20:
   In file included from include/linux/elf.h:6:
   In file included from arch/arm64/include/asm/elf.h:141:


vim +11 include/linux/fpga/altera-pr-ip-core.h

d201cc17a8a31cc Matthew Gerlach 2017-03-23 @11  #ifndef _ALT_PR_IP_CORE_H
d201cc17a8a31cc Matthew Gerlach 2017-03-23  12  #define _ALT_PR_IP_CORE_H
d201cc17a8a31cc Matthew Gerlach 2017-03-23  13  #include <linux/io.h>
961ea9f518b4061 Ian Abbott      2025-11-04  14  #include <asm/errno.h>
d201cc17a8a31cc Matthew Gerlach 2017-03-23  15  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Re: [PATCH 1/4] fpga: altera-pr-ip: Add dummy definitions of API functions
Posted by kernel test robot 3 months ago
Hi Ian,

kernel test robot noticed the following build errors:

[auto build test ERROR on linus/master]
[also build test ERROR on v6.18-rc4 next-20251104]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Ian-Abbott/fpga-altera-pr-ip-Add-dummy-definitions-of-API-functions/20251105-000956
base:   linus/master
patch link:    https://lore.kernel.org/r/20251104153013.154463-2-abbotti%40mev.co.uk
patch subject: [PATCH 1/4] fpga: altera-pr-ip: Add dummy definitions of API functions
config: parisc-randconfig-001-20251105 (https://download.01.org/0day-ci/archive/20251105/202511051513.Wkv71gq0-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 12.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251105/202511051513.Wkv71gq0-lkp@intel.com/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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202511051513.Wkv71gq0-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from drivers/fpga/altera-pr-ip-core.c:11:
>> include/linux/fpga/altera-pr-ip-core.h:11: error: unterminated #ifndef
      11 | #ifndef _ALT_PR_IP_CORE_H
         | 
>> drivers/fpga/altera-pr-ip-core.c:176:5: error: redefinition of 'alt_pr_register'
     176 | int alt_pr_register(struct device *dev, void __iomem *reg_base)
         |     ^~~~~~~~~~~~~~~
   include/linux/fpga/altera-pr-ip-core.h:19:19: note: previous definition of 'alt_pr_register' with type 'int(struct device *, void *)'
      19 | static inline int alt_pr_register(struct device *dev, void __iomem *reg_base)
         |                   ^~~~~~~~~~~~~~~
--
   In file included from altera-pr-ip-core.c:11:
>> include/linux/fpga/altera-pr-ip-core.h:11: error: unterminated #ifndef
      11 | #ifndef _ALT_PR_IP_CORE_H
         | 
   altera-pr-ip-core.c:176:5: error: redefinition of 'alt_pr_register'
     176 | int alt_pr_register(struct device *dev, void __iomem *reg_base)
         |     ^~~~~~~~~~~~~~~
   include/linux/fpga/altera-pr-ip-core.h:19:19: note: previous definition of 'alt_pr_register' with type 'int(struct device *, void *)'
      19 | static inline int alt_pr_register(struct device *dev, void __iomem *reg_base)
         |                   ^~~~~~~~~~~~~~~


vim +11 include/linux/fpga/altera-pr-ip-core.h

d201cc17a8a31c Matthew Gerlach 2017-03-23 @11  #ifndef _ALT_PR_IP_CORE_H
d201cc17a8a31c Matthew Gerlach 2017-03-23  12  #define _ALT_PR_IP_CORE_H
d201cc17a8a31c Matthew Gerlach 2017-03-23  13  #include <linux/io.h>
961ea9f518b406 Ian Abbott      2025-11-04  14  #include <asm/errno.h>
d201cc17a8a31c Matthew Gerlach 2017-03-23  15  

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