[android-common:android12-5.10 1/1] mm/hmm.c:219:1: warning: control reaches end of non-void function

kernel test robot <[email protected]>
Newsgroups dev.linux.lists.oe-kbuild-all
Message-ID <[email protected]>
Hi Jihan,

FYI, the error/warning still remains.

tree:   https://android.googlesource.com/kernel/common android12-5.10
head:   1d929bc650954dfa344168039d30b1bc13a3e48e
commit: 2ea27b7efa3f6fd0b4fab6a748ab08322280f29b [1/1] ANDROID: GKI: Kconfig.gki: enable CONFIG_HMM_MIRROR with HIDDEN GPU
config: arm-randconfig-003-20260813 (https://download.01.org/0day-ci/archive/20260813/[email protected]/config)
compiler: arm-linux-gnueabi-gcc (GCC) 7.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260813/[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 warnings (new ones prefixed by >>):

            ^~~~~~~~~~~~~~~~~~~~~~~
            hmm_is_device_private_entry
   mm/hmm.c:217:3: error: implicit declaration of function 'device_private_entry_to_page'; did you mean 'is_device_private_page'? [-Werror=implicit-function-declaration]
      device_private_entry_to_page(entry)->pgmap->owner ==
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      is_device_private_page
   mm/hmm.c:217:38: error: invalid type argument of '->' (have 'int')
      device_private_entry_to_page(entry)->pgmap->owner ==
                                         ^~
   mm/hmm.c: In function 'pte_to_hmm_pfn_flags':
   mm/hmm.c:224:6: error: implicit declaration of function 'pte_none'; did you mean 'p4d_none'? [-Werror=implicit-function-declaration]
     if (pte_none(pte) || !pte_present(pte) || pte_protnone(pte))
         ^~~~~~~~
         p4d_none
   mm/hmm.c:224:24: error: implicit declaration of function 'pte_present'; did you mean 'p4d_present'? [-Werror=implicit-function-declaration]
     if (pte_none(pte) || !pte_present(pte) || pte_protnone(pte))
                           ^~~~~~~~~~~
                           p4d_present
   mm/hmm.c:224:44: error: implicit declaration of function 'pte_protnone'; did you mean 'p4d_none'? [-Werror=implicit-function-declaration]
     if (pte_none(pte) || !pte_present(pte) || pte_protnone(pte))
                                               ^~~~~~~~~~~~
                                               p4d_none
   mm/hmm.c:226:9: error: implicit declaration of function 'pte_write'; did you mean 'pgd_write'? [-Werror=implicit-function-declaration]
     return pte_write(pte) ? (HMM_PFN_VALID | HMM_PFN_WRITE) : HMM_PFN_VALID;
            ^~~~~~~~~
            pgd_write
   mm/hmm.c: In function 'hmm_vma_handle_pte':
   mm/hmm.c:250:23: error: implicit declaration of function 'pte_to_swp_entry'; did you mean 'pte_lockptr'? [-Werror=implicit-function-declaration]
      swp_entry_t entry = pte_to_swp_entry(pte);
                          ^~~~~~~~~~~~~~~~
                          pte_lockptr
   mm/hmm.c:250:23: error: invalid initializer
   mm/hmm.c:258:8: error: implicit declaration of function 'is_write_device_private_entry'; did you mean 'hmm_is_device_private_entry'? [-Werror=implicit-function-declaration]
       if (is_write_device_private_entry(entry))
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           hmm_is_device_private_entry
   mm/hmm.c:260:15: error: implicit declaration of function 'device_private_entry_to_pfn'; did you mean 'device_create_with_groups'? [-Werror=implicit-function-declaration]
       *hmm_pfn = device_private_entry_to_pfn(entry) |
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
                  device_create_with_groups
   mm/hmm.c:272:8: error: implicit declaration of function 'non_swap_entry'; did you mean 'init_wait_entry'? [-Werror=implicit-function-declaration]
      if (!non_swap_entry(entry))
           ^~~~~~~~~~~~~~
           init_wait_entry
   mm/hmm.c:275:7: error: implicit declaration of function 'is_migration_entry'; did you mean 'list_first_entry'? [-Werror=implicit-function-declaration]
      if (is_migration_entry(entry)) {
          ^~~~~~~~~~~~~~~~~~
          list_first_entry
   mm/hmm.c:276:4: error: implicit declaration of function 'pte_unmap'; did you mean 'memunmap'? [-Werror=implicit-function-declaration]
       pte_unmap(ptep);
       ^~~~~~~~~
       memunmap
   mm/hmm.c:278:4: error: implicit declaration of function 'migration_entry_wait'; did you mean 'in_entry_text'? [-Werror=implicit-function-declaration]
       migration_entry_wait(walk->mm, pmdp, addr);
       ^~~~~~~~~~~~~~~~~~~~
       in_entry_text
   mm/hmm.c:297:39: error: implicit declaration of function 'pte_pfn'; did you mean 'pte_val'? [-Werror=implicit-function-declaration]
     if (pte_special(pte) && !is_zero_pfn(pte_pfn(pte))) {
                                          ^~~~~~~
                                          pte_val
   mm/hmm.c: In function 'hmm_vma_walk_pmd':
   mm/hmm.c:331:6: error: implicit declaration of function 'pmd_none'; did you mean 'p4d_none'? [-Werror=implicit-function-declaration]
     if (pmd_none(pmd))
         ^~~~~~~~
         p4d_none
   mm/hmm.c:334:35: error: implicit declaration of function 'is_pmd_migration_entry'; did you mean 'list_first_entry'? [-Werror=implicit-function-declaration]
     if (thp_migration_supported() && is_pmd_migration_entry(pmd)) {
                                      ^~~~~~~~~~~~~~~~~~~~~~
                                      list_first_entry
   mm/hmm.c:337:4: error: implicit declaration of function 'pmd_migration_entry_wait' [-Werror=implicit-function-declaration]
       pmd_migration_entry_wait(walk->mm, pmdp);
       ^~~~~~~~~~~~~~~~~~~~~~~~
   mm/hmm.c:343:7: error: implicit declaration of function 'pmd_present'; did you mean 'p4d_present'? [-Werror=implicit-function-declaration]
     if (!pmd_present(pmd)) {
          ^~~~~~~~~~~
          p4d_present
   mm/hmm.c:349:6: error: implicit declaration of function 'pmd_devmap'; did you mean 'pte_devmap'? [-Werror=implicit-function-declaration]
     if (pmd_devmap(pmd) || pmd_trans_huge(pmd)) {
         ^~~~~~~~~~
         pte_devmap
   mm/hmm.c:349:25: error: implicit declaration of function 'pmd_trans_huge'; did you mean 'pmd_trans_huge_lock'? [-Werror=implicit-function-declaration]
     if (pmd_devmap(pmd) || pmd_trans_huge(pmd)) {
                            ^~~~~~~~~~~~~~
                            pmd_trans_huge_lock
   mm/hmm.c:359:9: error: implicit declaration of function 'pmd_read_atomic'; did you mean 'kmap_atomic'? [-Werror=implicit-function-declaration]
      pmd = pmd_read_atomic(pmdp);
            ^~~~~~~~~~~~~~~
            kmap_atomic
   mm/hmm.c:373:6: error: implicit declaration of function 'pmd_bad'; did you mean 'p4d_bad'? [-Werror=implicit-function-declaration]
     if (pmd_bad(pmd)) {
         ^~~~~~~
         p4d_bad
   mm/hmm.c:379:9: error: implicit declaration of function 'pte_offset_map'; did you mean 'pte_offset_map_lock'? [-Werror=implicit-function-declaration]
     ptep = pte_offset_map(pmdp, addr);
            ^~~~~~~~~~~~~~
            pte_offset_map_lock
   mm/hmm.c:379:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
     ptep = pte_offset_map(pmdp, addr);
          ^
   mm/hmm.c: In function 'hmm_is_device_private_entry':
>> mm/hmm.c:219:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
   cc1: some warnings being treated as errors

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for USB_PHY
   Depends on [n]: USB_SUPPORT [=n]
   Selected by [y]:
   - GKI_HIDDEN_USB_CONFIGS [=y]
   WARNING: unmet direct dependencies detected for SND_PCM_ELD
   Depends on [n]: SOUND [=m] && !UML && SND [=n]
   Selected by [y]:
   - GKI_HIDDEN_SND_CONFIGS [=y]
   WARNING: unmet direct dependencies detected for WEXT_PROC
   Depends on [n]: NET [=y] && WIRELESS [=n] && PROC_FS [=n] && WEXT_CORE [=y]
   Selected by [y]:
   - GKI_LEGACY_WEXT_ALLCONFIG [=y]
   WARNING: unmet direct dependencies detected for WEXT_PRIV
   Depends on [n]: NET [=y] && WIRELESS [=n]
   Selected by [y]:
   - GKI_LEGACY_WEXT_ALLCONFIG [=y]
   WARNING: unmet direct dependencies detected for BALLOON_COMPACTION
   Depends on [n]: COMPACTION [=n] && MEMORY_BALLOON [=y]
   Selected by [y]:
   - GKI_HIDDEN_MM_CONFIGS [=y]
   WARNING: unmet direct dependencies detected for WEXT_SPY
   Depends on [n]: NET [=y] && WIRELESS [=n]
   Selected by [y]:
   - GKI_LEGACY_WEXT_ALLCONFIG [=y]
   WARNING: unmet direct dependencies detected for WIRELESS_EXT
   Depends on [n]: NET [=y] && WIRELESS [=n]
   Selected by [y]:
   - GKI_LEGACY_WEXT_ALLCONFIG [=y]
   WARNING: unmet direct dependencies detected for WEXT_CORE
   Depends on [n]: NET [=y] && WIRELESS [=n] && (CFG80211_WEXT [=n] || WIRELESS_EXT [=y])
   Selected by [y]:
   - GKI_LEGACY_WEXT_ALLCONFIG [=y]
   WARNING: unmet direct dependencies detected for SND_VMASTER
   Depends on [n]: SOUND [=m] && !UML && SND [=n]
   Selected by [y]:
   - GKI_HIDDEN_SND_CONFIGS [=y]
   WARNING: unmet direct dependencies detected for SND_PCM_IEC958
   Depends on [n]: SOUND [=m] && !UML && SND [=n]
   Selected by [y]:
   - GKI_HIDDEN_SND_SOC_CONFIGS [=y]
   WARNING: unmet direct dependencies detected for DRM_TTM
   Depends on [n]: HAS_IOMEM [=y] && DRM [=y] && MMU [=n]
   Selected by [y]:
   - GKI_HIDDEN_DRM_CONFIGS [=y] && HAS_IOMEM [=y] && DRM [=y]
   WARNING: unmet direct dependencies detected for SND_JACK
   Depends on [n]: SOUND [=m] && !UML && SND [=n]
   Selected by [y]:
   - GKI_HIDDEN_SND_CONFIGS [=y]
   WARNING: unmet direct dependencies detected for SND_JACK_INPUT_DEV
   Depends on [n]: SOUND [=m] && !UML && SND [=n] && SND_JACK [=y]
   Selected by [y]:
   - GKI_HIDDEN_SND_CONFIGS [=y]
   WARNING: unmet direct dependencies detected for HMM_MIRROR
   Depends on [n]: MMU [=n]
   Selected by [y]:
   - GKI_HIDDEN_GPU_CONFIGS [=y]


vim +219 mm/hmm.c

da4c3c735ea4dc Jérôme Glisse     2017-09-08  212  
08ddddda667b3b Christoph Hellwig 2020-03-16  213  static inline bool hmm_is_device_private_entry(struct hmm_range *range,
08ddddda667b3b Christoph Hellwig 2020-03-16  214  		swp_entry_t entry)
08ddddda667b3b Christoph Hellwig 2020-03-16  215  {
08ddddda667b3b Christoph Hellwig 2020-03-16  216  	return is_device_private_entry(entry) &&
08ddddda667b3b Christoph Hellwig 2020-03-16  217  		device_private_entry_to_page(entry)->pgmap->owner ==
08ddddda667b3b Christoph Hellwig 2020-03-16  218  		range->dev_private_owner;
08ddddda667b3b Christoph Hellwig 2020-03-16 @219  }
08ddddda667b3b Christoph Hellwig 2020-03-16  220  

:::::: The code at line 219 was first introduced by commit
:::::: 08ddddda667b3b7aaac10641418283f78118c5cd mm/hmm: check the device private page owner in hmm_range_fault()

:::::: TO: Christoph Hellwig <[email protected]>
:::::: CC: Jason Gunthorpe <[email protected]>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.