All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: oe-kbuild-all@lists.linux.dev,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Memory Management List <linux-mm@kvack.org>,
	Jason Gunthorpe <jgg@nvidia.com>
Subject: [akpm-mm:mm-unstable 235/243] include/linux/mm.h:3679:16: error: incompatible types when returning type 'pgprot_t' but 'long unsigned int' was expected
Date: Thu, 18 Sep 2025 17:52:51 +0800	[thread overview]
Message-ID: <202509181744.SIHyVUMm-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
head:   1f98191f08b46ad015d4480af96541b521fa2411
commit: 322cdf975a863b1d694bfb2d4232eef49944b91f [235/243] mm: abstract io_remap_pfn_range() based on PFN
config: csky-randconfig-002-20250918 (https://download.01.org/0day-ci/archive/20250918/202509181744.SIHyVUMm-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250918/202509181744.SIHyVUMm-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/202509181744.SIHyVUMm-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from arch/csky/include/asm/cacheflush.h:6,
                    from include/linux/cacheflush.h:5,
                    from include/linux/highmem.h:8,
                    from include/linux/bvec.h:10,
                    from include/linux/blk_types.h:10,
                    from include/linux/buffer_head.h:12,
                    from fs/hfsplus/hfsplus_fs.h:22,
                    from fs/hfsplus/attributes.c:10:
   include/linux/mm.h: In function 'io_remap_pfn_range_prot':
>> include/linux/mm.h:3679:16: error: incompatible types when returning type 'pgprot_t' but 'long unsigned int' was expected
    3679 |         return prot;
         |                ^~~~
   include/linux/mm.h: In function 'io_remap_pfn_range':
>> include/linux/mm.h:3699:31: error: invalid initializer
    3699 |         const pgprot_t prot = io_remap_pfn_range_prot(orig_prot);
         |                               ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/thread_info.h:27,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/csky/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:79,
                    from include/linux/spinlock.h:56,
                    from include/linux/wait.h:9,
                    from include/linux/wait_bit.h:8,
                    from include/linux/fs.h:7,
                    from fs/hfsplus/hfsplus_fs.h:20:
   arch/csky/abiv2/inc/abi/cacheflush.h: In function 'flush_dcache_folio':
   arch/csky/abiv2/inc/abi/cacheflush.h:23:39: error: passing argument 2 of 'const_test_bit' from incompatible pointer type [-Wincompatible-pointer-types]
      23 |         if (test_bit(PG_dcache_clean, &folio->flags))
         |                                       ^~~~~~~~~~~~~
         |                                       |
         |                                       memdesc_flags_t *
   include/linux/bitops.h:47:24: note: in definition of macro 'bitop'
      47 |          const##op(nr, addr) : op(nr, addr))
         |                        ^~~~
   arch/csky/abiv2/inc/abi/cacheflush.h:23:13: note: in expansion of macro 'test_bit'
      23 |         if (test_bit(PG_dcache_clean, &folio->flags))
         |             ^~~~~~~~
   In file included from include/linux/bitops.h:28:
   include/asm-generic/bitops/generic-non-atomic.h:166:64: note: expected 'const volatile long unsigned int *' but argument is of type 'memdesc_flags_t *'
     166 | const_test_bit(unsigned long nr, const volatile unsigned long *addr)
         |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
   arch/csky/abiv2/inc/abi/cacheflush.h:23:39: error: passing argument 2 of 'generic_test_bit' from incompatible pointer type [-Wincompatible-pointer-types]
      23 |         if (test_bit(PG_dcache_clean, &folio->flags))
         |                                       ^~~~~~~~~~~~~
         |                                       |
         |                                       memdesc_flags_t *
   include/linux/bitops.h:47:39: note: in definition of macro 'bitop'
      47 |          const##op(nr, addr) : op(nr, addr))
         |                                       ^~~~
   arch/csky/abiv2/inc/abi/cacheflush.h:23:13: note: in expansion of macro 'test_bit'
      23 |         if (test_bit(PG_dcache_clean, &folio->flags))
         |             ^~~~~~~~
   include/asm-generic/bitops/generic-non-atomic.h:121:66: note: expected 'const volatile long unsigned int *' but argument is of type 'memdesc_flags_t *'
     121 | generic_test_bit(unsigned long nr, const volatile unsigned long *addr)
         |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
   In file included from arch/csky/include/asm/cacheflush.h:7:
   arch/csky/abiv2/inc/abi/cacheflush.h:24:44: error: passing argument 2 of 'clear_bit' from incompatible pointer type [-Wincompatible-pointer-types]
      24 |                 clear_bit(PG_dcache_clean, &folio->flags);
         |                                            ^~~~~~~~~~~~~
         |                                            |
         |                                            memdesc_flags_t *
   In file included from include/asm-generic/bitops/atomic.h:68,
                    from arch/csky/include/asm/bitops.h:70,
                    from include/linux/bitops.h:67:
   include/asm-generic/bitops/instrumented-atomic.h:39:72: note: expected 'volatile long unsigned int *' but argument is of type 'memdesc_flags_t *'
      39 | static __always_inline void clear_bit(long nr, volatile unsigned long *addr)
         |                                                ~~~~~~~~~~~~~~~~~~~~~~~~^~~~
--
   In file included from include/linux/xattr.h:18,
                    from squashfs/xattr.c:16:
   include/linux/mm.h: In function 'io_remap_pfn_range_prot':
>> include/linux/mm.h:3679:16: error: incompatible types when returning type 'pgprot_t' but 'long unsigned int' was expected
    3679 |         return prot;
         |                ^~~~
   include/linux/mm.h: In function 'io_remap_pfn_range':
>> include/linux/mm.h:3699:31: error: invalid initializer
    3699 |         const pgprot_t prot = io_remap_pfn_range_prot(orig_prot);
         |                               ^~~~~~~~~~~~~~~~~~~~~~~


vim +3679 include/linux/mm.h

  3674	
  3675	#ifdef io_remap_pfn_range_pfn
  3676	static inline unsigned long io_remap_pfn_range_prot(pgprot_t prot)
  3677	{
  3678		/* We do not decrypt if arch customises PFN. */
> 3679		return prot;
  3680	}
  3681	#else
  3682	static inline unsigned long io_remap_pfn_range_pfn(unsigned long pfn,
  3683			unsigned long size)
  3684	{
  3685		return pfn;
  3686	}
  3687	
  3688	static inline pgprot_t io_remap_pfn_range_prot(pgprot_t prot)
  3689	{
  3690		return pgprot_decrypted(prot);
  3691	}
  3692	#endif
  3693	
  3694	static inline int io_remap_pfn_range(struct vm_area_struct *vma,
  3695					     unsigned long addr, unsigned long orig_pfn,
  3696					     unsigned long size, pgprot_t orig_prot)
  3697	{
  3698		const unsigned long pfn = io_remap_pfn_range_pfn(orig_pfn, size);
> 3699		const pgprot_t prot = io_remap_pfn_range_prot(orig_prot);
  3700	
  3701		return remap_pfn_range(vma, addr, pfn, size, prot);
  3702	}
  3703	

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


             reply	other threads:[~2025-09-18  9:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-18  9:52 kernel test robot [this message]
2025-09-18 10:08 ` [akpm-mm:mm-unstable 235/243] include/linux/mm.h:3679:16: error: incompatible types when returning type 'pgprot_t' but 'long unsigned int' was expected Lorenzo Stoakes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202509181744.SIHyVUMm-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=jgg@nvidia.com \
    --cc=linux-mm@kvack.org \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.