Re: [PATCH v2] video: hyperv: hyperv_fb: Use physical memory for fb on HyperV Gen 1 VMs.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Wei,

I love your patch! Perhaps something to improve:

[auto build test WARNING on next-20191122]
[cannot apply to linus/master v5.4-rc8 v5.4-rc7 v5.4-rc6 v5.4]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Wei-Hu/video-hyperv-hyperv_fb-Use-physical-memory-for-fb-on-HyperV-Gen-1-VMs/20191124-163533
base:    b9d3d01405061bb42358fe53f824e894a1922ced
config: i386-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

   In file included from include/linux/printk.h:7:0,
                    from include/linux/kernel.h:15,
                    from include/linux/list.h:9,
                    from include/linux/module.h:12,
                    from drivers/video/fbdev/hyperv_fb.c:48:
   drivers/video/fbdev/hyperv_fb.c: In function 'hvfb_get_phymem':
   include/linux/kern_levels.h:5:18: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'phys_addr_t {aka unsigned int}' [-Wformat=]
    #define KERN_SOH "\001"  /* ASCII Start Of Header */
                     ^
   include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
    #define KERN_INFO KERN_SOH "6" /* informational */
                      ^~~~~~~~
   include/linux/printk.h:311:9: note: in expansion of macro 'KERN_INFO'
     printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
            ^~~~~~~~~
>> drivers/video/fbdev/hyperv_fb.c:1003:2: note: in expansion of macro 'pr_info'
     pr_info("Allocated %d pages starts at physical addr 0x%llx\n",
     ^~~~~~~

vim +/pr_info +1003 drivers/video/fbdev/hyperv_fb.c

   955	
   956	/*
   957	 * Allocate enough contiguous physical memory.
   958	 * Return physical address if succeeded or -1 if failed.
   959	 */
   960	static phys_addr_t hvfb_get_phymem(struct hv_device *hdev,
   961					   unsigned int request_size)
   962	{
   963		struct page *page = NULL;
   964		dma_addr_t dma_handle;
   965		void *vmem;
   966		unsigned int request_pages;
   967		phys_addr_t paddr = 0;
   968		unsigned int order = get_order(request_size);
   969	
   970		if (request_size == 0)
   971			return -1;
   972	
   973		/* Try to call alloc_pages if the size is less than 2^MAX_ORDER */
   974		if (order < MAX_ORDER) {
   975			page = alloc_pages(GFP_KERNEL | __GFP_ZERO, order);
   976			if (!page)
   977				return -1;
   978	
   979			paddr = (page_to_pfn(page) << PAGE_SHIFT);
   980			request_pages = (1 << order);
   981			goto get_phymem1;
   982		}
   983	
   984		/* Allocate from CMA */
   985		if (hdev == NULL)
   986			return -1;
   987	
   988		hdev->device.coherent_dma_mask = DMA_BIT_MASK(64);
   989	
   990		request_pages = (round_up(request_size, PAGE_SIZE) >> PAGE_SHIFT);
   991	
   992		vmem = dma_alloc_coherent(&hdev->device,
   993					 request_pages * PAGE_SIZE,
   994					 &dma_handle,
   995					 GFP_KERNEL | __GFP_NOWARN);
   996	
   997		if (!vmem)
   998			return -1;
   999	
  1000		paddr = virt_to_phys(vmem);
  1001	
  1002	get_phymem1:
> 1003		pr_info("Allocated %d pages starts at physical addr 0x%llx\n",
  1004			request_pages, paddr);
  1005	
  1006		return paddr;
  1007	}
  1008	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux