Re: [PATCH] PCI/VGA: Fixup the firmware fb address om demanding time
From: kernel test robot
Date: Tue Aug 01 2023 - 22:28:11 EST
Hi Sui,
kernel test robot noticed the following build warnings:
[auto build test WARNING on pci/next]
[also build test WARNING on pci/for-linus linus/master v6.5-rc4 next-20230801]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Sui-Jingfeng/PCI-VGA-Fixup-the-firmware-fb-address-om-demanding-time/20230802-023743
base: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next
patch link: https://lore.kernel.org/r/20230801183706.702567-1-suijingfeng%40loongson.cn
patch subject: [PATCH] PCI/VGA: Fixup the firmware fb address om demanding time
config: arm-randconfig-r004-20230731 (https://download.01.org/0day-ci/archive/20230802/202308021027.rCgALJ5d-lkp@xxxxxxxxx/config)
compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project.git 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
reproduce: (https://download.01.org/0day-ci/archive/20230802/202308021027.rCgALJ5d-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308021027.rCgALJ5d-lkp@xxxxxxxxx/
All warnings (new ones prefixed by >>):
>> drivers/pci/vgaarb.c:133:7: warning: format specifies type 'unsigned long long' but the argument has type 'resource_size_t' (aka 'unsigned int') [-Wformat]
old_fb_start, old_fb_end,
^~~~~~~~~~~~
drivers/pci/vgaarb.c:13:69: note: expanded from macro 'vgaarb_dbg'
#define vgaarb_dbg(dev, fmt, arg...) dev_dbg(dev, "vgaarb: " fmt, ##arg)
~~~ ^~~
include/linux/dev_printk.h:163:47: note: expanded from macro 'dev_dbg'
dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
include/linux/dev_printk.h:129:34: note: expanded from macro 'dev_printk'
_dev_printk(level, dev, fmt, ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
drivers/pci/vgaarb.c:133:21: warning: format specifies type 'unsigned long long' but the argument has type 'resource_size_t' (aka 'unsigned int') [-Wformat]
old_fb_start, old_fb_end,
^~~~~~~~~~
drivers/pci/vgaarb.c:13:69: note: expanded from macro 'vgaarb_dbg'
#define vgaarb_dbg(dev, fmt, arg...) dev_dbg(dev, "vgaarb: " fmt, ##arg)
~~~ ^~~
include/linux/dev_printk.h:163:47: note: expanded from macro 'dev_dbg'
dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
include/linux/dev_printk.h:129:34: note: expanded from macro 'dev_printk'
_dev_printk(level, dev, fmt, ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
drivers/pci/vgaarb.c:134:7: warning: format specifies type 'unsigned long long' but the argument has type 'resource_size_t' (aka 'unsigned int') [-Wformat]
firmware_fb.start, firmware_fb.end);
^~~~~~~~~~~~~~~~~
drivers/pci/vgaarb.c:13:69: note: expanded from macro 'vgaarb_dbg'
#define vgaarb_dbg(dev, fmt, arg...) dev_dbg(dev, "vgaarb: " fmt, ##arg)
~~~ ^~~
include/linux/dev_printk.h:163:47: note: expanded from macro 'dev_dbg'
dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
include/linux/dev_printk.h:129:34: note: expanded from macro 'dev_printk'
_dev_printk(level, dev, fmt, ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
drivers/pci/vgaarb.c:134:26: warning: format specifies type 'unsigned long long' but the argument has type 'resource_size_t' (aka 'unsigned int') [-Wformat]
firmware_fb.start, firmware_fb.end);
^~~~~~~~~~~~~~~
drivers/pci/vgaarb.c:13:69: note: expanded from macro 'vgaarb_dbg'
#define vgaarb_dbg(dev, fmt, arg...) dev_dbg(dev, "vgaarb: " fmt, ##arg)
~~~ ^~~
include/linux/dev_printk.h:163:47: note: expanded from macro 'dev_dbg'
dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
include/linux/dev_printk.h:129:34: note: expanded from macro 'dev_printk'
_dev_printk(level, dev, fmt, ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
4 warnings generated.
vim +133 drivers/pci/vgaarb.c
104
105 static bool vga_arb_get_fb_range_from_tracker(resource_size_t *start,
106 resource_size_t *end)
107 {
108 struct pci_dev *pdev = firmware_fb.pdev;
109 resource_size_t new_vram_base;
110 resource_size_t new_fb_start;
111 resource_size_t old_fb_start;
112 resource_size_t old_fb_end;
113
114 /*
115 * No firmware framebuffer support or No aperture that contains the
116 * firmware FB is found, in this case, the firmware_fb.pdev will be
117 * NULL. We will return immediately.
118 */
119 if (!pdev)
120 return false;
121
122 new_vram_base = pdev->resource[firmware_fb.bar].start;
123 new_fb_start = new_vram_base + firmware_fb.offset;
124 old_fb_start = firmware_fb.start;
125 old_fb_end = firmware_fb.end;
126
127 if (new_fb_start != old_fb_start) {
128 firmware_fb.start = new_fb_start;
129 firmware_fb.end = new_fb_start + firmware_fb.size - 1;
130 /* Firmware fb address range moved */
131 vgaarb_dbg(&pdev->dev,
132 "[0x%llx, 0x%llx] -> [0x%llx, 0x%llx]\n",
> 133 old_fb_start, old_fb_end,
134 firmware_fb.start, firmware_fb.end);
135 }
136
137 *start = firmware_fb.start;
138 *end = firmware_fb.end;
139
140 return true;
141 }
142
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki