All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Kiryl Shutsemau (Meta)" <kas@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [kas:pte_size 14/30] include/linux/mm.h:2290:42: error: suggest parentheses around arithmetic in operand of '|'
Date: Mon, 23 Mar 2026 04:00:33 +0800	[thread overview]
Message-ID: <202603230325.JWMF5d91-lkp@intel.com> (raw)

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

                 reply	other threads:[~2026-03-22 20:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202603230325.JWMF5d91-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kas@kernel.org \
    --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.