linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Ye Liu <liuye@kylinos.cn>
Cc: oe-kbuild-all@lists.linux.dev,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Memory Management List <linux-mm@kvack.org>,
	Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
	Dev Jain <dev.jain@arm.com>
Subject: [linux-next:master 3830/4234] include/linux/mm.h:78: warning: "PAGES_TO_MB" redefined
Date: Fri, 22 Aug 2025 18:26:33 +0800	[thread overview]
Message-ID: <202508221819.lYpl8jIM-lkp@intel.com> (raw)

Hi Ye,

FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   0f4c93f7eb861acab537dbe94441817a270537bf
commit: b91db3a36f79ab7fb796fc3fbbe0950a04ff9589 [3830/4234] mm: replace (20 - PAGE_SHIFT) with common macros for pages<->MB conversion
config: arc-randconfig-001-20250822 (https://download.01.org/0day-ci/archive/20250822/202508221819.lYpl8jIM-lkp@intel.com/config)
compiler: arc-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250822/202508221819.lYpl8jIM-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/202508221819.lYpl8jIM-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from arch/arc/kernel/asm-offsets.c:7:
>> include/linux/mm.h:78: warning: "PAGES_TO_MB" redefined
    #define PAGES_TO_MB(pages) ((pages) >> (20 - PAGE_SHIFT))
    
   In file included from arch/arc/include/asm/irqflags-arcv2.h:9,
                    from arch/arc/include/asm/irqflags.h:13,
                    from include/linux/irqflags.h:18,
                    from include/linux/spinlock.h:59,
                    from include/linux/sched.h:37,
                    from arch/arc/kernel/asm-offsets.c:6:
   arch/arc/include/asm/arcregs.h:155: note: this is the location of the previous definition
    #define PAGES_TO_MB(n_pages) (PAGES_TO_KB(n_pages) >> 10)
    
--
   In file included from include/sound/pcm.h:15,
                    from sound/usb/pcm.c:14:
>> include/linux/mm.h:78: warning: "PAGES_TO_MB" redefined
    #define PAGES_TO_MB(pages) ((pages) >> (20 - PAGE_SHIFT))
    
   In file included from arch/arc/include/asm/irqflags-arcv2.h:9,
                    from arch/arc/include/asm/irqflags.h:13,
                    from include/linux/irqflags.h:18,
                    from include/linux/spinlock.h:59,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:7,
                    from include/linux/slab.h:16,
                    from sound/usb/pcm.c:6:
   arch/arc/include/asm/arcregs.h:155: note: this is the location of the previous definition
    #define PAGES_TO_MB(n_pages) (PAGES_TO_KB(n_pages) >> 10)
    
   during RTL pass: mach
   sound/usb/pcm.c: In function 'retire_capture_urb':
   sound/usb/pcm.c:1390:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9110
    }
    ^
   Please submit a full bug report,
   with preprocessed source if appropriate.
   See <https://gcc.gnu.org/bugs/> for instructions.
--
   In file included from include/sound/pcm.h:15,
                    from sound/usb/quirks.c:15:
>> include/linux/mm.h:78: warning: "PAGES_TO_MB" redefined
    #define PAGES_TO_MB(pages) ((pages) >> (20 - PAGE_SHIFT))
    
   In file included from arch/arc/include/asm/irqflags-arcv2.h:9,
                    from arch/arc/include/asm/irqflags.h:13,
                    from include/linux/irqflags.h:18,
                    from include/linux/spinlock.h:59,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:7,
                    from include/linux/slab.h:16,
                    from sound/usb/quirks.c:6:
   arch/arc/include/asm/arcregs.h:155: note: this is the location of the previous definition
    #define PAGES_TO_MB(n_pages) (PAGES_TO_KB(n_pages) >> 10)
    
   during RTL pass: mach
   sound/usb/quirks.c: In function 'snd_usb_apply_boot_quirk':
   sound/usb/quirks.c:1675:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9110
    }
    ^
   Please submit a full bug report,
   with preprocessed source if appropriate.
   See <https://gcc.gnu.org/bugs/> for instructions.
--
   In file included from include/sound/pcm.h:15,
                    from sound/usb/clock.c:16:
>> include/linux/mm.h:78: warning: "PAGES_TO_MB" redefined
    #define PAGES_TO_MB(pages) ((pages) >> (20 - PAGE_SHIFT))
    
   In file included from arch/arc/include/asm/irqflags-arcv2.h:9,
                    from arch/arc/include/asm/irqflags.h:13,
                    from include/linux/irqflags.h:18,
                    from include/linux/spinlock.h:59,
                    from include/linux/sched.h:37,
                    from include/linux/delay.h:13,
                    from include/linux/usb.h:15,
                    from sound/usb/clock.c:9:
   arch/arc/include/asm/arcregs.h:155: note: this is the location of the previous definition
    #define PAGES_TO_MB(n_pages) (PAGES_TO_KB(n_pages) >> 10)
    
   during RTL pass: mach
   sound/usb/clock.c: In function '__uac_clock_find_source':
   sound/usb/clock.c:435:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9110
    }
    ^
   Please submit a full bug report,
   with preprocessed source if appropriate.
   See <https://gcc.gnu.org/bugs/> for instructions.
--
   In file included from include/sound/pcm.h:15,
                    from pcm.c:14:
>> include/linux/mm.h:78: warning: "PAGES_TO_MB" redefined
    #define PAGES_TO_MB(pages) ((pages) >> (20 - PAGE_SHIFT))
    
   In file included from arch/arc/include/asm/irqflags-arcv2.h:9,
                    from arch/arc/include/asm/irqflags.h:13,
                    from include/linux/irqflags.h:18,
                    from include/linux/spinlock.h:59,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:7,
                    from include/linux/slab.h:16,
                    from pcm.c:6:
   arch/arc/include/asm/arcregs.h:155: note: this is the location of the previous definition
    #define PAGES_TO_MB(n_pages) (PAGES_TO_KB(n_pages) >> 10)
    
   during RTL pass: mach
   pcm.c: In function 'retire_capture_urb':
   pcm.c:1390:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9110
    }
    ^
   Please submit a full bug report,
   with preprocessed source if appropriate.
   See <https://gcc.gnu.org/bugs/> for instructions.
--
   In file included from include/sound/pcm.h:15,
                    from quirks.c:15:
>> include/linux/mm.h:78: warning: "PAGES_TO_MB" redefined
    #define PAGES_TO_MB(pages) ((pages) >> (20 - PAGE_SHIFT))
    
   In file included from arch/arc/include/asm/irqflags-arcv2.h:9,
                    from arch/arc/include/asm/irqflags.h:13,
                    from include/linux/irqflags.h:18,
                    from include/linux/spinlock.h:59,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:7,
                    from include/linux/slab.h:16,
                    from quirks.c:6:
   arch/arc/include/asm/arcregs.h:155: note: this is the location of the previous definition
    #define PAGES_TO_MB(n_pages) (PAGES_TO_KB(n_pages) >> 10)
    
   during RTL pass: mach
   quirks.c: In function 'snd_usb_apply_boot_quirk':
   quirks.c:1675:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9110
    }
    ^
   Please submit a full bug report,
   with preprocessed source if appropriate.
   See <https://gcc.gnu.org/bugs/> for instructions.
--
   In file included from include/sound/pcm.h:15,
                    from clock.c:16:
>> include/linux/mm.h:78: warning: "PAGES_TO_MB" redefined
    #define PAGES_TO_MB(pages) ((pages) >> (20 - PAGE_SHIFT))
    
   In file included from arch/arc/include/asm/irqflags-arcv2.h:9,
                    from arch/arc/include/asm/irqflags.h:13,
                    from include/linux/irqflags.h:18,
                    from include/linux/spinlock.h:59,
                    from include/linux/sched.h:37,
                    from include/linux/delay.h:13,
                    from include/linux/usb.h:15,
                    from clock.c:9:
   arch/arc/include/asm/arcregs.h:155: note: this is the location of the previous definition
    #define PAGES_TO_MB(n_pages) (PAGES_TO_KB(n_pages) >> 10)
    
   during RTL pass: mach
   clock.c: In function '__uac_clock_find_source':
   clock.c:435:1: internal compiler error: in arc_ifcvt, at config/arc/arc.c:9110
    }
    ^
   Please submit a full bug report,
   with preprocessed source if appropriate.
   See <https://gcc.gnu.org/bugs/> for instructions.
--
   In file included from arch/arc/kernel/asm-offsets.c:7:
>> include/linux/mm.h:78: warning: "PAGES_TO_MB" redefined
    #define PAGES_TO_MB(pages) ((pages) >> (20 - PAGE_SHIFT))
    
   In file included from arch/arc/include/asm/irqflags-arcv2.h:9,
                    from arch/arc/include/asm/irqflags.h:13,
                    from include/linux/irqflags.h:18,
                    from include/linux/spinlock.h:59,
                    from include/linux/sched.h:37,
                    from arch/arc/kernel/asm-offsets.c:6:
   arch/arc/include/asm/arcregs.h:155: note: this is the location of the previous definition
    #define PAGES_TO_MB(n_pages) (PAGES_TO_KB(n_pages) >> 10)
    


vim +/PAGES_TO_MB +78 include/linux/mm.h

    71	
    72	/*
    73	 * Convert between pages and MB
    74	 * 20 is the shift for 1MB (2^20 = 1MB)
    75	 * PAGE_SHIFT is the shift for page size (e.g., 12 for 4KB pages)
    76	 * So (20 - PAGE_SHIFT) converts between pages and MB
    77	 */
  > 78	#define PAGES_TO_MB(pages) ((pages) >> (20 - PAGE_SHIFT))
    79	#define MB_TO_PAGES(mb)    ((mb) << (20 - PAGE_SHIFT))
    80	

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


                 reply	other threads:[~2025-08-22 10:26 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=202508221819.lYpl8jIM-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=dev.jain@arm.com \
    --cc=linux-mm@kvack.org \
    --cc=liuye@kylinos.cn \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox