linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [helgaas-pci:for-linus 3/3] arch/x86/kernel/resource.c:51:18: warning: missing terminating " character
@ 2022-03-10  7:33 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-03-10  7:33 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: kbuild-all, linux-pci, Hans de Goede, Mika Westerberg

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git for-linus
head:   3018c5d59f923be2fa2d91c4ce02c8d97a37edce
commit: 3018c5d59f923be2fa2d91c4ce02c8d97a37edce [3/3] x86/PCI: Preserve host bridge windows completely covered by E820
config: i386-randconfig-a005 (https://download.01.org/0day-ci/archive/20220310/202203101549.x3qKzps6-lkp@intel.com/config)
compiler: gcc-9 (Ubuntu 9.4.0-1ubuntu1~20.04) 9.4.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git/commit/?id=3018c5d59f923be2fa2d91c4ce02c8d97a37edce
        git remote add helgaas-pci https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git
        git fetch --no-tags helgaas-pci for-linus
        git checkout 3018c5d59f923be2fa2d91c4ce02c8d97a37edce
        # save the config file to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash arch/x86/kernel/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   arch/x86/kernel/resource.c: In function 'remove_e820_regions':
>> arch/x86/kernel/resource.c:51:18: warning: missing terminating " character
      51 |    dev_info(dev, "resource %pR fully covered by e820 entry
         |                  ^
   arch/x86/kernel/resource.c:52:24: warning: missing terminating " character
      52 | [mem %#010Lx-%#010Lx]\n",
         |                        ^
   In file included from include/linux/kernel.h:29,
                    from arch/x86/include/asm/percpu.h:27,
                    from arch/x86/include/asm/current.h:6,
                    from include/linux/sched.h:12,
                    from include/linux/ratelimit.h:6,
                    from include/linux/dev_printk.h:16,
                    from arch/x86/kernel/resource.c:2:
   arch/x86/kernel/resource.c:51:18: error: missing terminating " character
      51 |    dev_info(dev, "resource %pR fully covered by e820 entry
         |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/printk.h:370:28: note: in definition of macro '__printk_index_emit'
     370 |   if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \
         |                            ^~~~
   include/linux/dev_printk.h:105:2: note: in expansion of macro 'printk_index_subsys_emit'
     105 |  printk_index_subsys_emit("%s %s: ", level, fmt)
         |  ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:109:3: note: in expansion of macro 'dev_printk_index_emit'
     109 |   dev_printk_index_emit(level, fmt);   \
         |   ^~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:150:2: note: in expansion of macro 'dev_printk_index_wrap'
     150 |  dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |  ^~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:150:51: note: in expansion of macro 'dev_fmt'
     150 |  dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                   ^~~~~~~
   arch/x86/kernel/resource.c:51:4: note: in expansion of macro 'dev_info'
      51 |    dev_info(dev, "resource %pR fully covered by e820 entry
         |    ^~~~~~~~
   arch/x86/kernel/resource.c:52:1: error: expected expression before '[' token
      52 | [mem %#010Lx-%#010Lx]\n",
         | ^
   include/linux/printk.h:370:28: note: in definition of macro '__printk_index_emit'
     370 |   if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \
         |                            ^~~~
   include/linux/dev_printk.h:105:2: note: in expansion of macro 'printk_index_subsys_emit'
     105 |  printk_index_subsys_emit("%s %s: ", level, fmt)
         |  ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:109:3: note: in expansion of macro 'dev_printk_index_emit'
     109 |   dev_printk_index_emit(level, fmt);   \
         |   ^~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:150:2: note: in expansion of macro 'dev_printk_index_wrap'
     150 |  dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |  ^~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:150:51: note: in expansion of macro 'dev_fmt'
     150 |  dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                   ^~~~~~~
   arch/x86/kernel/resource.c:51:4: note: in expansion of macro 'dev_info'
      51 |    dev_info(dev, "resource %pR fully covered by e820 entry
         |    ^~~~~~~~
   arch/x86/kernel/resource.c:52:2: error: 'mem' undeclared (first use in this function); did you mean 'sem'?
      52 | [mem %#010Lx-%#010Lx]\n",
         |  ^~~
   include/linux/printk.h:370:28: note: in definition of macro '__printk_index_emit'
     370 |   if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \
         |                            ^~~~
   include/linux/dev_printk.h:105:2: note: in expansion of macro 'printk_index_subsys_emit'
     105 |  printk_index_subsys_emit("%s %s: ", level, fmt)
         |  ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:109:3: note: in expansion of macro 'dev_printk_index_emit'
     109 |   dev_printk_index_emit(level, fmt);   \
         |   ^~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:150:2: note: in expansion of macro 'dev_printk_index_wrap'
     150 |  dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |  ^~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:150:51: note: in expansion of macro 'dev_fmt'
     150 |  dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                   ^~~~~~~
   arch/x86/kernel/resource.c:51:4: note: in expansion of macro 'dev_info'
      51 |    dev_info(dev, "resource %pR fully covered by e820 entry
         |    ^~~~~~~~
   arch/x86/kernel/resource.c:52:2: note: each undeclared identifier is reported only once for each function it appears in
      52 | [mem %#010Lx-%#010Lx]\n",
         |  ^~~
   include/linux/printk.h:370:28: note: in definition of macro '__printk_index_emit'
     370 |   if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \
         |                            ^~~~
   include/linux/dev_printk.h:105:2: note: in expansion of macro 'printk_index_subsys_emit'
     105 |  printk_index_subsys_emit("%s %s: ", level, fmt)
         |  ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:109:3: note: in expansion of macro 'dev_printk_index_emit'
     109 |   dev_printk_index_emit(level, fmt);   \
         |   ^~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:150:2: note: in expansion of macro 'dev_printk_index_wrap'
     150 |  dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |  ^~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:150:51: note: in expansion of macro 'dev_fmt'
     150 |  dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                   ^~~~~~~
   arch/x86/kernel/resource.c:51:4: note: in expansion of macro 'dev_info'
      51 |    dev_info(dev, "resource %pR fully covered by e820 entry
         |    ^~~~~~~~
   arch/x86/kernel/resource.c:52:7: error: stray '#' in program
      52 | [mem %#010Lx-%#010Lx]\n",
         |       ^
   include/linux/printk.h:370:28: note: in definition of macro '__printk_index_emit'


vim +51 arch/x86/kernel/resource.c

    26	
    27	void remove_e820_regions(struct device *dev, struct resource *avail)
    28	{
    29		struct resource orig = *avail;
    30		int i;
    31		struct e820_entry *entry;
    32		u64 e820_start, e820_end;
    33	
    34		if (!(avail->flags & IORESOURCE_MEM))
    35			return;
    36	
    37		for (i = 0; i < e820_table->nr_entries; i++) {
    38			entry = &e820_table->entries[i];
    39			e820_start = entry->addr;
    40			e820_end = entry->addr + entry->size - 1;
    41	
    42			/*
    43			 * If an E820 entry covers just part of the resource, we
    44			 * assume E820 is telling us about something like host
    45			 * bridge register space that is unavailable for PCI
    46			 * devices.  But if it covers the *entire* resource, it's
    47			 * more likely just telling us that this is MMIO space, and
    48			 * that doesn't need to be removed.
    49			 */
    50			if (e820_start <= avail->start && avail->end <= e820_end) {
  > 51				dev_info(dev, "resource %pR fully covered by e820 entry
    52	[mem %#010Lx-%#010Lx]\n",
    53					 avail, e820_start, e820_end);
    54	
    55				continue;
    56			}
    57	
    58			resource_clip(avail, e820_start, e820_end);
    59			if (orig.start != avail->start || orig.end != avail->end) {
    60				dev_info(dev, "clipped %pR to %pR for e820 entry [mem %#010Lx-%#010Lx]\n",
    61					 &orig, avail, e820_start, e820_end);
    62				orig = *avail;
    63			}
    64		}
    65	}
    66	

---
0-DAY CI Kernel Test Service
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [helgaas-pci:for-linus 3/3] arch/x86/kernel/resource.c:51:18: warning: missing terminating '"' character
@ 2022-03-10  6:52 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-03-10  6:52 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: llvm, kbuild-all, linux-pci, Hans de Goede, Mika Westerberg

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git for-linus
head:   3018c5d59f923be2fa2d91c4ce02c8d97a37edce
commit: 3018c5d59f923be2fa2d91c4ce02c8d97a37edce [3/3] x86/PCI: Preserve host bridge windows completely covered by E820
config: x86_64-randconfig-a001 (https://download.01.org/0day-ci/archive/20220310/202203101402.DpRD30NZ-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 276ca87382b8f16a65bddac700202924228982f6)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git/commit/?id=3018c5d59f923be2fa2d91c4ce02c8d97a37edce
        git remote add helgaas-pci https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git
        git fetch --no-tags helgaas-pci for-linus
        git checkout 3018c5d59f923be2fa2d91c4ce02c8d97a37edce
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/kernel/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> arch/x86/kernel/resource.c:51:18: warning: missing terminating '"' character [-Winvalid-pp-token]
                           dev_info(dev, "resource %pR fully covered by e820 entry
                                         ^
   arch/x86/kernel/resource.c:52:24: warning: missing terminating '"' character [-Winvalid-pp-token]
   [mem %#010Lx-%#010Lx]\n",
                          ^
   arch/x86/kernel/resource.c:51:18: error: expected expression
                           dev_info(dev, "resource %pR fully covered by e820 entry
                                         ^
   2 warnings and 1 error generated.


vim +51 arch/x86/kernel/resource.c

    26	
    27	void remove_e820_regions(struct device *dev, struct resource *avail)
    28	{
    29		struct resource orig = *avail;
    30		int i;
    31		struct e820_entry *entry;
    32		u64 e820_start, e820_end;
    33	
    34		if (!(avail->flags & IORESOURCE_MEM))
    35			return;
    36	
    37		for (i = 0; i < e820_table->nr_entries; i++) {
    38			entry = &e820_table->entries[i];
    39			e820_start = entry->addr;
    40			e820_end = entry->addr + entry->size - 1;
    41	
    42			/*
    43			 * If an E820 entry covers just part of the resource, we
    44			 * assume E820 is telling us about something like host
    45			 * bridge register space that is unavailable for PCI
    46			 * devices.  But if it covers the *entire* resource, it's
    47			 * more likely just telling us that this is MMIO space, and
    48			 * that doesn't need to be removed.
    49			 */
    50			if (e820_start <= avail->start && avail->end <= e820_end) {
  > 51				dev_info(dev, "resource %pR fully covered by e820 entry
    52	[mem %#010Lx-%#010Lx]\n",
    53					 avail, e820_start, e820_end);
    54	
    55				continue;
    56			}
    57	
    58			resource_clip(avail, e820_start, e820_end);
    59			if (orig.start != avail->start || orig.end != avail->end) {
    60				dev_info(dev, "clipped %pR to %pR for e820 entry [mem %#010Lx-%#010Lx]\n",
    61					 &orig, avail, e820_start, e820_end);
    62				orig = *avail;
    63			}
    64		}
    65	}
    66	

---
0-DAY CI Kernel Test Service
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-10  7:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-10  7:33 [helgaas-pci:for-linus 3/3] arch/x86/kernel/resource.c:51:18: warning: missing terminating " character kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2022-03-10  6:52 [helgaas-pci:for-linus 3/3] arch/x86/kernel/resource.c:51:18: warning: missing terminating '"' character kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).