* [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
@ 2025-09-18 9:52 kernel test robot
2025-09-18 10:08 ` Lorenzo Stoakes
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2025-09-18 9:52 UTC (permalink / raw)
To: Lorenzo Stoakes
Cc: oe-kbuild-all, Andrew Morton, Linux Memory Management List,
Jason Gunthorpe
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [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
2025-09-18 9:52 [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 kernel test robot
@ 2025-09-18 10:08 ` Lorenzo Stoakes
0 siblings, 0 replies; 2+ messages in thread
From: Lorenzo Stoakes @ 2025-09-18 10:08 UTC (permalink / raw)
To: kernel test robot
Cc: oe-kbuild-all, Andrew Morton, Linux Memory Management List,
Jason Gunthorpe
On Thu, Sep 18, 2025 at 05:52:51PM +0800, kernel test robot wrote:
> 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;
> | ^~~~
This is fixed in fix-patches already sent. We don't even need to have this logic at all :)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-09-18 10:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-18 9:52 [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 kernel test robot
2025-09-18 10:08 ` Lorenzo Stoakes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox