All of lore.kernel.org
 help / color / mirror / Atom feed
* [kas:pte_size 14/30] include/linux/mm.h:2290:42: error: suggest parentheses around arithmetic in operand of '|'
@ 2026-03-22 20:00 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-03-22 20:00 UTC (permalink / raw)
  To: Kiryl Shutsemau (Meta); +Cc: oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/kas/linux.git pte_size
head:   3ecd2bc82d7d0382233099de8d07616df26745c4
commit: cdc06b03f4725681883e0faf3b429849cd5c3475 [14/30] mm: Introduce mkpte() and folio_mkpte()
config: nios2-randconfig-001-20260322 (https://download.01.org/0day-ci/archive/20260323/202603230325.JWMF5d91-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 11.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260323/202603230325.JWMF5d91-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/202603230325.JWMF5d91-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from arch/nios2/include/asm/processor.h:22,
                    from include/linux/spinlock_up.h:8,
                    from include/linux/spinlock.h:97,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:7,
                    from include/linux/umh.h:4,
                    from include/linux/kmod.h:9,
                    from include/linux/module.h:18,
                    from lib/test_bitops.c:10:
   include/linux/mm.h: In function 'mkpte':
>> include/linux/mm.h:2290:42: error: suggest parentheses around arithmetic in operand of '|' [-Werror=parentheses]
    2290 |         return pfn_pte(page_to_pfn(page) + off, pgprot);
   arch/nios2/include/asm/page.h:65:37: note: in definition of macro '__pte'
      65 | #define __pte(x)        ((pte_t) { (x) })
         |                                     ^
   include/linux/mm.h:2290:16: note: in expansion of macro 'pfn_pte'
    2290 |         return pfn_pte(page_to_pfn(page) + off, pgprot);
         |                ^~~~~~~
   include/linux/mm.h: In function 'folio_mkpte':
   include/linux/mm.h:2309:41: error: suggest parentheses around arithmetic in operand of '|' [-Werror=parentheses]
    2309 |         return pfn_pte(folio_pfn(folio) + off, pgprot);
         |                        ~~~~~~~~~~~~~~~~~^~~~~
   arch/nios2/include/asm/page.h:65:37: note: in definition of macro '__pte'
      65 | #define __pte(x)        ((pte_t) { (x) })
         |                                     ^
   include/linux/mm.h:2309:16: note: in expansion of macro 'pfn_pte'
    2309 |         return pfn_pte(folio_pfn(folio) + off, pgprot);
         |                ^~~~~~~
   cc1: all warnings being treated as errors


vim +2290 include/linux/mm.h

  2283	
  2284	#ifdef CONFIG_MMU
  2285	static inline pte_t mkpte(const struct page *page, unsigned long pteoff,
  2286			pgprot_t pgprot)
  2287	{
  2288		unsigned long off = pteoff & ((1UL << (PG_SHIFT - PTE_SHIFT)) - 1);
  2289	
> 2290		return pfn_pte(page_to_pfn(page) + off, pgprot);
  2291	}
  2292	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-03-22 20:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-22 20:00 [kas:pte_size 14/30] include/linux/mm.h:2290:42: error: suggest parentheses around arithmetic in operand of '|' kernel test robot

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.