[akpm-mm:mm-unstable 26/52] mm/internal.h:1128:1: warning: control reaches end of non-void function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
head:   a824831a082f1d8f9b51a4c0598e633d38555fcf
commit: 1166721383f8962e2c6c388b2adc7c6f1e9901d5 [26/52] mm/migrate: split source folio if it is on deferred split list
config: openrisc-defconfig (https://download.01.org/0day-ci/archive/20240320/202403202323.Il6OdbUR-lkp@xxxxxxxxx/config)
compiler: or1k-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240320/202403202323.Il6OdbUR-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202403202323.Il6OdbUR-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   In file included from mm/migrate.c:58:
   mm/internal.h: In function 'get_deferred_split_queue':
   mm/internal.h:1127:22: error: 'struct pglist_data' has no member named 'deferred_split_queue'
    1127 |         return &pgdat->deferred_split_queue;
         |                      ^~
   In file included from include/linux/spinlock.h:314,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:7,
                    from include/linux/mm.h:7,
                    from include/linux/migrate.h:5,
                    from mm/migrate.c:16:
   mm/migrate.c: In function 'migrate_pages_batch':
   mm/migrate.c:1683:68: error: invalid use of undefined type 'struct deferred_split'
    1683 |                                         spin_lock_irqsave(&ds_queue->split_queue_lock,
         |                                                                    ^~
   include/linux/spinlock_api_up.h:28:32: note: in definition of macro '___LOCK'
      28 |   do { __acquire(lock); (void)(lock); } while (0)
         |                                ^~~~
   include/linux/spinlock_api_up.h:40:31: note: in expansion of macro '__LOCK'
      40 |   do { local_irq_save(flags); __LOCK(lock); } while (0)
         |                               ^~~~~~
   include/linux/spinlock_api_up.h:69:49: note: in expansion of macro '__LOCK_IRQSAVE'
      69 | #define _raw_spin_lock_irqsave(lock, flags)     __LOCK_IRQSAVE(lock, flags)
         |                                                 ^~~~~~~~~~~~~~
   include/linux/spinlock.h:266:17: note: in expansion of macro '_raw_spin_lock_irqsave'
     266 |                 _raw_spin_lock_irqsave(lock, flags);    \
         |                 ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/spinlock.h:381:9: note: in expansion of macro 'raw_spin_lock_irqsave'
     381 |         raw_spin_lock_irqsave(spinlock_check(lock), flags);     \
         |         ^~~~~~~~~~~~~~~~~~~~~
   mm/migrate.c:1683:41: note: in expansion of macro 'spin_lock_irqsave'
    1683 |                                         spin_lock_irqsave(&ds_queue->split_queue_lock,
         |                                         ^~~~~~~~~~~~~~~~~
   mm/migrate.c:1697:73: error: invalid use of undefined type 'struct deferred_split'
    1697 |                                         spin_unlock_irqrestore(&ds_queue->split_queue_lock,
         |                                                                         ^~
   mm/internal.h: In function 'get_deferred_split_queue':
>> mm/internal.h:1128:1: warning: control reaches end of non-void function [-Wreturn-type]
    1128 | }
         | ^


vim +1128 mm/internal.h

  1101	
  1102	/*
  1103	 * mm/huge_memory.c
  1104	 */
  1105	struct page *follow_trans_huge_pmd(struct vm_area_struct *vma,
  1106					   unsigned long addr, pmd_t *pmd,
  1107					   unsigned int flags);
  1108	
  1109	#ifdef CONFIG_MEMCG
  1110	static inline
  1111	struct deferred_split *get_deferred_split_queue(struct folio *folio)
  1112	{
  1113		struct mem_cgroup *memcg = folio_memcg(folio);
  1114		struct pglist_data *pgdat = NODE_DATA(folio_nid(folio));
  1115	
  1116		if (memcg)
  1117			return &memcg->deferred_split_queue;
  1118		else
  1119			return &pgdat->deferred_split_queue;
  1120	}
  1121	#else
  1122	static inline
  1123	struct deferred_split *get_deferred_split_queue(struct folio *folio)
  1124	{
  1125		struct pglist_data *pgdat = NODE_DATA(folio_nid(folio));
  1126	
  1127		return &pgdat->deferred_split_queue;
> 1128	}
  1129	#endif
  1130	
  1131	

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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux