linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [akpm-mm:mm-unstable 272/272] include/linux/stddef.h:8:14: error: called object is not a function or function pointer
@ 2025-05-01 21:02 kernel test robot
  2025-05-01 21:13 ` Andrew Morton
  0 siblings, 1 reply; 5+ messages in thread
From: kernel test robot @ 2025-05-01 21:02 UTC (permalink / raw)
  To: Shivank Garg; +Cc: oe-kbuild-all, Andrew Morton, Linux Memory Management List

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
head:   ea17e4fdc13cae144d90ce8561c2f50a49492037
commit: ea17e4fdc13cae144d90ce8561c2f50a49492037 [272/272] jfs: implement migrate_folio for jfs_metapage_aops
config: arm-randconfig-002-20250502 (https://download.01.org/0day-ci/archive/20250502/202505020405.YzD9aNCo-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 7.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250502/202505020405.YzD9aNCo-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/202505020405.YzD9aNCo-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from include/uapi/linux/posix_types.h:5:0,
                    from include/uapi/linux/types.h:14,
                    from include/linux/types.h:6,
                    from include/linux/blkdev.h:8,
                    from fs/jfs/jfs_metapage.c:7:
   fs/jfs/jfs_metapage.c: In function '__metapage_migrate_folio':
>> include/linux/stddef.h:8:14: error: called object is not a function or function pointer
    #define NULL ((void *)0)
                 ^
   include/linux/pagemap.h:1234:31: note: in expansion of macro 'NULL'
    #define filemap_migrate_folio NULL
                                  ^~~~
   fs/jfs/jfs_metapage.c:238:7: note: in expansion of macro 'filemap_migrate_folio'
     rc = filemap_migrate_folio(mapping, dst, src, mode);
          ^~~~~~~~~~~~~~~~~~~~~
   fs/jfs/jfs_metapage.c: In function 'metapage_migrate_folio':
>> include/linux/stddef.h:8:14: error: called object is not a function or function pointer
    #define NULL ((void *)0)
                 ^
   include/linux/pagemap.h:1234:31: note: in expansion of macro 'NULL'
    #define filemap_migrate_folio NULL
                                  ^~~~
   fs/jfs/jfs_metapage.c:641:10: note: in expansion of macro 'filemap_migrate_folio'
      return filemap_migrate_folio(mapping, dst, src, mode);
             ^~~~~~~~~~~~~~~~~~~~~


vim +8 include/linux/stddef.h

^1da177e4c3f415 Linus Torvalds   2005-04-16  6  
^1da177e4c3f415 Linus Torvalds   2005-04-16  7  #undef NULL
^1da177e4c3f415 Linus Torvalds   2005-04-16 @8  #define NULL ((void *)0)
6e2182874324727 Richard Knutsson 2006-09-30  9  

:::::: The code at line 8 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [akpm-mm:mm-unstable 272/272] include/linux/stddef.h:8:14: error: called object is not a function or function pointer
  2025-05-01 21:02 [akpm-mm:mm-unstable 272/272] include/linux/stddef.h:8:14: error: called object is not a function or function pointer kernel test robot
@ 2025-05-01 21:13 ` Andrew Morton
  2025-05-01 21:52   ` Matthew Wilcox
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2025-05-01 21:13 UTC (permalink / raw)
  To: kernel test robot
  Cc: Shivank Garg, oe-kbuild-all, Linux Memory Management List,
	Matthew Wilcox

On Fri, 2 May 2025 05:02:14 +0800 kernel test robot <lkp@intel.com> wrote:

> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
> head:   ea17e4fdc13cae144d90ce8561c2f50a49492037
> commit: ea17e4fdc13cae144d90ce8561c2f50a49492037 [272/272] jfs: implement migrate_folio for jfs_metapage_aops
> config: arm-randconfig-002-20250502 (https://download.01.org/0day-ci/archive/20250502/202505020405.YzD9aNCo-lkp@intel.com/config)
> compiler: arm-linux-gnueabi-gcc (GCC) 7.5.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250502/202505020405.YzD9aNCo-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/202505020405.YzD9aNCo-lkp@intel.com/
> 
> All errors (new ones prefixed by >>):
> 
>    In file included from include/uapi/linux/posix_types.h:5:0,
>                     from include/uapi/linux/types.h:14,
>                     from include/linux/types.h:6,
>                     from include/linux/blkdev.h:8,
>                     from fs/jfs/jfs_metapage.c:7:
>    fs/jfs/jfs_metapage.c: In function '__metapage_migrate_folio':
> >> include/linux/stddef.h:8:14: error: called object is not a function or function pointer
>     #define NULL ((void *)0)
>                  ^
>    include/linux/pagemap.h:1234:31: note: in expansion of macro 'NULL'
>     #define filemap_migrate_folio NULL
>                                   ^~~~
>    fs/jfs/jfs_metapage.c:238:7: note: in expansion of macro 'filemap_migrate_folio'
>      rc = filemap_migrate_folio(mapping, dst, src, mode);
>           ^~~~~~~~~~~~~~~~~~~~~
>    fs/jfs/jfs_metapage.c: In function 'metapage_migrate_folio':
> >> include/linux/stddef.h:8:14: error: called object is not a function or function pointer
>     #define NULL ((void *)0)
>                  ^
>    include/linux/pagemap.h:1234:31: note: in expansion of macro 'NULL'
>     #define filemap_migrate_folio NULL
>                                   ^~~~
>    fs/jfs/jfs_metapage.c:641:10: note: in expansion of macro 'filemap_migrate_folio'
>       return filemap_migrate_folio(mapping, dst, src, mode);

#ifdef CONFIG_MIGRATION
int filemap_migrate_folio(struct address_space *mapping, struct folio *dst,
		struct folio *src, enum migrate_mode mode);
#else
#define filemap_migrate_folio NULL
#endif

well that's odd.  I guess it was only anticipated that
filemap_migrate_folio would be used in a struct initializer.

Should this new JFS migration code be wrapped in #ifdef CONFIG_MIGRATION?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [akpm-mm:mm-unstable 272/272] include/linux/stddef.h:8:14: error: called object is not a function or function pointer
  2025-05-01 21:13 ` Andrew Morton
@ 2025-05-01 21:52   ` Matthew Wilcox
  2025-05-01 22:59     ` Andrew Morton
  0 siblings, 1 reply; 5+ messages in thread
From: Matthew Wilcox @ 2025-05-01 21:52 UTC (permalink / raw)
  To: Andrew Morton
  Cc: kernel test robot, Shivank Garg, oe-kbuild-all,
	Linux Memory Management List

On Thu, May 01, 2025 at 02:13:04PM -0700, Andrew Morton wrote:
> Should this new JFS migration code be wrapped in #ifdef CONFIG_MIGRATION?

Yes


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [akpm-mm:mm-unstable 272/272] include/linux/stddef.h:8:14: error: called object is not a function or function pointer
  2025-05-01 21:52   ` Matthew Wilcox
@ 2025-05-01 22:59     ` Andrew Morton
  2025-05-02  6:11       ` Shivank Garg
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2025-05-01 22:59 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: kernel test robot, Shivank Garg, oe-kbuild-all,
	Linux Memory Management List

On Thu, 1 May 2025 22:52:30 +0100 Matthew Wilcox <willy@infradead.org> wrote:

> On Thu, May 01, 2025 at 02:13:04PM -0700, Andrew Morton wrote:
> > Should this new JFS migration code be wrapped in #ifdef CONFIG_MIGRATION?
> 
> Yes

OK, thanks, I'll try this.  Maybe there's a way to reduce the amount of
ifdeffing.  Warning, contains bonus whitespace tuneups!

--- a/fs/jfs/jfs_metapage.c~jfs-implement-migrate_folio-for-jfs_metapage_aops-fix-2
+++ a/fs/jfs/jfs_metapage.c
@@ -152,8 +152,10 @@ static inline void dec_io(struct folio *
 		handler(folio, anchor->status);
 }
 
-static int __metapage_migrate_folio(struct address_space *mapping, struct folio *dst,
-				    struct folio *src, enum migrate_mode mode)
+#ifdef CONFIG_MIGRATION
+static int __metapage_migrate_folio(struct address_space *mapping,
+				    struct folio *dst, struct folio *src,
+				    enum migrate_mode mode)
 {
 	struct meta_anchor *src_anchor = src->private;
 	struct metapage *mps[MPS_PER_PAGE] = {0};
@@ -199,8 +201,10 @@ static int __metapage_migrate_folio(stru
 
 	return MIGRATEPAGE_SUCCESS;
 }
+#endif	/* CONFIG_MIGRATION */
 
 #else
+
 static inline struct metapage *folio_to_mp(struct folio *folio, int offset)
 {
 	return folio->private;
@@ -224,8 +228,10 @@ static inline void remove_metapage(struc
 #define inc_io(folio) do {} while(0)
 #define dec_io(folio, status, handler) handler(folio, status)
 
-static int __metapage_migrate_folio(struct address_space *mapping, struct folio *dst,
-				    struct folio *src, enum migrate_mode mode)
+#ifdef CONFIG_MIGRATION
+static int __metapage_migrate_folio(struct address_space *mapping,
+				    struct folio *dst, struct folio *src,
+				    enum migrate_mode mode)
 {
 	struct metapage *mp;
 	int page_offset;
@@ -249,6 +255,7 @@ static int __metapage_migrate_folio(stru
 
 	return MIGRATEPAGE_SUCCESS;
 }
+#endif	/* CONFIG_MIGRATION */
 
 #endif
 
@@ -629,11 +636,13 @@ static bool metapage_release_folio(struc
 	return ret;
 }
 
+#ifdef CONFIG_MIGRATION
 /*
  * metapage_migrate_folio - Migration function for JFS metapages
  */
-static int metapage_migrate_folio(struct address_space *mapping, struct folio *dst,
-				  struct folio *src, enum migrate_mode mode)
+static int metapage_migrate_folio(struct address_space *mapping,
+				  struct folio *dst, struct folio *src,
+				  enum migrate_mode mode)
 {
 	int expected_count;
 
@@ -646,6 +655,9 @@ static int metapage_migrate_folio(struct
 		return -EAGAIN;
 	return __metapage_migrate_folio(mapping, dst, src, mode);
 }
+#else
+#define metapage_migrate_folio NULL
+#endif	/* CONFIG_MIGRATION */
 
 static void metapage_invalidate_folio(struct folio *folio, size_t offset,
 				    size_t length)
_



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [akpm-mm:mm-unstable 272/272] include/linux/stddef.h:8:14: error: called object is not a function or function pointer
  2025-05-01 22:59     ` Andrew Morton
@ 2025-05-02  6:11       ` Shivank Garg
  0 siblings, 0 replies; 5+ messages in thread
From: Shivank Garg @ 2025-05-02  6:11 UTC (permalink / raw)
  To: Andrew Morton
  Cc: kernel test robot, oe-kbuild-all, Linux Memory Management List,
	Matthew Wilcox



On 5/2/2025 4:29 AM, Andrew Morton wrote:
> On Thu, 1 May 2025 22:52:30 +0100 Matthew Wilcox <willy@infradead.org> wrote:
> 
>> On Thu, May 01, 2025 at 02:13:04PM -0700, Andrew Morton wrote:
>>> Should this new JFS migration code be wrapped in #ifdef CONFIG_MIGRATION?
>>
>> Yes
> 
> OK, thanks, I'll try this.  Maybe there's a way to reduce the amount of
> ifdeffing.  Warning, contains bonus whitespace tuneups!
> 
> --- a/fs/jfs/jfs_metapage.c~jfs-implement-migrate_folio-for-jfs_metapage_aops-fix-2
> +++ a/fs/jfs/jfs_metapage.c
> @@ -152,8 +152,10 @@ static inline void dec_io(struct folio *
>  		handler(folio, anchor->status);
>  }
>  
> -static int __metapage_migrate_folio(struct address_space *mapping, struct folio *dst,
> -				    struct folio *src, enum migrate_mode mode)
> +#ifdef CONFIG_MIGRATION
> +static int __metapage_migrate_folio(struct address_space *mapping,
> +				    struct folio *dst, struct folio *src,
> +				    enum migrate_mode mode)
>  {
>  	struct meta_anchor *src_anchor = src->private;
>  	struct metapage *mps[MPS_PER_PAGE] = {0};
> @@ -199,8 +201,10 @@ static int __metapage_migrate_folio(stru
>  
>  	return MIGRATEPAGE_SUCCESS;
>  }
> +#endif	/* CONFIG_MIGRATION */
>  
>  #else
> +
>  static inline struct metapage *folio_to_mp(struct folio *folio, int offset)
>  {
>  	return folio->private;
> @@ -224,8 +228,10 @@ static inline void remove_metapage(struc
>  #define inc_io(folio) do {} while(0)
>  #define dec_io(folio, status, handler) handler(folio, status)
>  
> -static int __metapage_migrate_folio(struct address_space *mapping, struct folio *dst,
> -				    struct folio *src, enum migrate_mode mode)
> +#ifdef CONFIG_MIGRATION
> +static int __metapage_migrate_folio(struct address_space *mapping,
> +				    struct folio *dst, struct folio *src,
> +				    enum migrate_mode mode)
>  {
>  	struct metapage *mp;
>  	int page_offset;
> @@ -249,6 +255,7 @@ static int __metapage_migrate_folio(stru
>  
>  	return MIGRATEPAGE_SUCCESS;
>  }
> +#endif	/* CONFIG_MIGRATION */
>  
>  #endif
>  
> @@ -629,11 +636,13 @@ static bool metapage_release_folio(struc
>  	return ret;
>  }
>  
> +#ifdef CONFIG_MIGRATION
>  /*
>   * metapage_migrate_folio - Migration function for JFS metapages
>   */
> -static int metapage_migrate_folio(struct address_space *mapping, struct folio *dst,
> -				  struct folio *src, enum migrate_mode mode)
> +static int metapage_migrate_folio(struct address_space *mapping,
> +				  struct folio *dst, struct folio *src,
> +				  enum migrate_mode mode)
>  {
>  	int expected_count;
>  
> @@ -646,6 +655,9 @@ static int metapage_migrate_folio(struct
>  		return -EAGAIN;
>  	return __metapage_migrate_folio(mapping, dst, src, mode);
>  }
> +#else
> +#define metapage_migrate_folio NULL
> +#endif	/* CONFIG_MIGRATION */
>  
>  static void metapage_invalidate_folio(struct folio *folio, size_t offset,
>  				    size_t length)
> _
> 

Hi Andrew,

Thank you for addressing the issues with my patch and fixing the errors.
I appreciate the cleanup and the CONFIG_MIGRATION wrapping.

Best regards,
Shivank



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-05-02  6:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-01 21:02 [akpm-mm:mm-unstable 272/272] include/linux/stddef.h:8:14: error: called object is not a function or function pointer kernel test robot
2025-05-01 21:13 ` Andrew Morton
2025-05-01 21:52   ` Matthew Wilcox
2025-05-01 22:59     ` Andrew Morton
2025-05-02  6:11       ` Shivank Garg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox