Re: [PATCH v1 5/5] scsi: ufs: UFS Host Performance Booster(HPB) driver

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

 



Hi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on mkp-scsi/for-next]
[also build test ERROR on scsi/for-next next-20200320]
[cannot apply to v5.6-rc6]
[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/huobean-gmail-com/scsi-ufs-add-UFS-Host-Performance-Booster-HPB-driver/20200321-084331
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: parisc-allyesconfig (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=9.2.0 make.cross ARCH=parisc 

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

All error/warnings (new ones prefixed by >>):

   drivers/scsi/ufs/ufshpb.c: In function 'ufshpb_mctx_mempool_remove':
>> drivers/scsi/ufs/ufshpb.c:1767:3: error: implicit declaration of function 'vfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration]
    1767 |   vfree(mctx->ppn_dirty);
         |   ^~~~~
         |   kvfree
   drivers/scsi/ufs/ufshpb.c: In function 'ufshpb_mctx_mempool_init':
>> drivers/scsi/ufs/ufshpb.c:1794:21: error: implicit declaration of function 'vzalloc'; did you mean 'kvzalloc'? [-Werror=implicit-function-declaration]
    1794 |   mctx->ppn_dirty = vzalloc(entry_count >> bits_per_byte_shift);
         |                     ^~~~~~~
         |                     kvzalloc
>> drivers/scsi/ufs/ufshpb.c:1794:19: warning: assignment to 'unsigned int *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    1794 |   mctx->ppn_dirty = vzalloc(entry_count >> bits_per_byte_shift);
         |                   ^
   In file included from include/linux/printk.h:7,
                    from include/linux/kernel.h:15,
                    from arch/parisc/include/asm/bug.h:5,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:12,
                    from include/asm-generic/current.h:5,
                    from ./arch/parisc/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from include/linux/blkdev.h:5,
                    from drivers/scsi/ufs/ufshpb.c:12:
   drivers/scsi/ufs/ufshpb.c: In function 'ufshpb_lu_init':
   include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'unsigned int' [-Wformat=]
       5 | #define KERN_SOH "\001"  /* ASCII Start Of Header */
         |                  ^~~~~~
   include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
      14 | #define KERN_INFO KERN_SOH "6" /* informational */
         |                   ^~~~~~~~
   include/linux/printk.h:310:9: note: in expansion of macro 'KERN_INFO'
     310 |  printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~~~~
   drivers/scsi/ufs/ufshpb.h:28:2: note: in expansion of macro 'pr_info'
      28 |  pr_info("%s:" fmt, DRIVER_NAME, ##__VA_ARGS__)
         |  ^~~~~~~
   drivers/scsi/ufs/ufshpb.c:2034:2: note: in expansion of macro 'hpb_info'
    2034 |  hpb_info("LU%d region table size: %lu bytes\n", lun,
         |  ^~~~~~~~
   drivers/scsi/ufs/ufshpb.c:2034:38: note: format string is defined here
    2034 |  hpb_info("LU%d region table size: %lu bytes\n", lun,
         |                                    ~~^
         |                                      |
         |                                      long unsigned int
         |                                    %u
   In file included from include/linux/printk.h:7,
                    from include/linux/kernel.h:15,
                    from arch/parisc/include/asm/bug.h:5,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:12,
                    from include/asm-generic/current.h:5,
                    from ./arch/parisc/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from include/linux/blkdev.h:5,
                    from drivers/scsi/ufs/ufshpb.c:12:
   include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'unsigned int' [-Wformat=]
       5 | #define KERN_SOH "\001"  /* ASCII Start Of Header */
         |                  ^~~~~~
   include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
      14 | #define KERN_INFO KERN_SOH "6" /* informational */
         |                   ^~~~~~~~
   include/linux/printk.h:310:9: note: in expansion of macro 'KERN_INFO'
     310 |  printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~~~~
   drivers/scsi/ufs/ufshpb.h:28:2: note: in expansion of macro 'pr_info'
      28 |  pr_info("%s:" fmt, DRIVER_NAME, ##__VA_ARGS__)
         |  ^~~~~~~
   drivers/scsi/ufs/ufshpb.c:2111:2: note: in expansion of macro 'hpb_info'
    2111 |  hpb_info("LU%d subregions info table takes memory %lu bytes\n", lun,
         |  ^~~~~~~~
   drivers/scsi/ufs/ufshpb.c:2111:54: note: format string is defined here
    2111 |  hpb_info("LU%d subregions info table takes memory %lu bytes\n", lun,
         |                                                    ~~^
         |                                                      |
         |                                                      long unsigned int
         |                                                    %u
   cc1: some warnings being treated as errors

vim +1767 drivers/scsi/ufs/ufshpb.c

  1757	
  1758	static void ufshpb_mctx_mempool_remove(struct ufshpb_lu *hpb)
  1759	{
  1760		struct ufshpb_map_ctx *mctx, *next;
  1761		int i;
  1762	
  1763		list_for_each_entry_safe(mctx, next, &hpb->lh_map_ctx, list_table) {
  1764			for (i = 0; i < hpb->mpages_per_subregion; i++)
  1765				__free_page(mctx->m_page[i]);
  1766	
> 1767			vfree(mctx->ppn_dirty);
  1768			kfree(mctx->m_page);
  1769			kfree(mctx);
  1770			alloc_mctx--;
  1771		}
  1772	}
  1773	
  1774	static int ufshpb_mctx_mempool_init(struct ufshpb_lu *hpb, int num_regions,
  1775					    int subregions_per_region, int entry_count,
  1776					    int entry_byte)
  1777	{
  1778		int i, j, k;
  1779		struct ufshpb_map_ctx *mctx = NULL;
  1780	
  1781		INIT_LIST_HEAD(&hpb->lh_map_ctx);
  1782	
  1783		for (i = 0; i < num_regions * subregions_per_region; i++) {
  1784			mctx = kzalloc(sizeof(struct ufshpb_map_ctx), GFP_KERNEL);
  1785			if (!mctx)
  1786				goto release_mem;
  1787	
  1788			mctx->m_page = kcalloc(hpb->mpages_per_subregion,
  1789					       sizeof(struct page *),
  1790					       GFP_KERNEL);
  1791			if (!mctx->m_page)
  1792				goto release_mem;
  1793	
> 1794			mctx->ppn_dirty = vzalloc(entry_count >> bits_per_byte_shift);
  1795			if (!mctx->ppn_dirty)
  1796				goto release_mem;
  1797	
  1798			for (j = 0; j < hpb->mpages_per_subregion; j++) {
  1799				mctx->m_page[j] = alloc_page(GFP_KERNEL | __GFP_ZERO);
  1800				if (!mctx->m_page[j]) {
  1801					for (k = 0; k < j; k++)
  1802						kfree(mctx->m_page[k]);
  1803					goto release_mem;
  1804				}
  1805			}
  1806	
  1807			INIT_LIST_HEAD(&mctx->list_table);
  1808			list_add(&mctx->list_table, &hpb->lh_map_ctx);
  1809			hpb->free_mctx++;
  1810		}
  1811	
  1812		alloc_mctx = num_regions * subregions_per_region;
  1813		hpb_info("LU%d amount of mctx %d\n", hpb->lun, hpb->free_mctx);
  1814		return 0;
  1815	
  1816	release_mem:
  1817		/*
  1818		 * mctxs already added in lh_map_ctx will be removed
  1819		 * in the caller function.
  1820		 */
  1821		if (mctx) {
  1822			kfree(mctx->m_page);
  1823			vfree(mctx->ppn_dirty);
  1824			kfree(mctx);
  1825		}
  1826		return -ENOMEM;
  1827	}
  1828	

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

Attachment: .config.gz
Description: application/gzip


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux