lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <201511130323.sQCDZAjl%fengguang.wu@intel.com>
Date:	Fri, 13 Nov 2015 03:10:11 +0800
From:	kbuild test robot <lkp@...el.com>
To:	Matias Bjørling <m@...rling.me>
Cc:	kbuild-all@...org, linux-block@...r.kernel.org,
	linux-kernel@...r.kernel.org, axboe@...com,
	Matias Bjørling <m@...rling.me>
Subject: Re: [PATCH v2] null_blk: register as a LightNVM device

Hi Matias,

[auto build test ERROR on next-20151112]
[cannot apply to v4.3-rc7 v4.3-rc6 v4.3-rc5 v4.3]

url:    https://github.com/0day-ci/linux/commits/Matias-Bj-rling/null_blk-register-as-a-LightNVM-device/20151113-024143
config: i386-allmodconfig (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

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

   drivers/block/null_blk.c: In function 'null_lnvm_destroy_dma_pool':
>> drivers/block/null_blk.c:538:14: error: invalid storage class for function 'null_lnvm_dev_dma_alloc'
    static void *null_lnvm_dev_dma_alloc(struct request_queue *q, void *pool,
                 ^
>> drivers/block/null_blk.c:538:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
    static void *null_lnvm_dev_dma_alloc(struct request_queue *q, void *pool,
    ^
>> drivers/block/null_blk.c:544:13: error: invalid storage class for function 'null_lnvm_dev_dma_free'
    static void null_lnvm_dev_dma_free(void *pool, void *entry,
                ^
>> drivers/block/null_blk.c:556:20: error: initializer element is not constant
     .dev_dma_alloc  = null_lnvm_dev_dma_alloc,
                       ^
   drivers/block/null_blk.c:556:20: note: (near initialization for 'null_lnvm_dev_ops.dev_dma_alloc')
   drivers/block/null_blk.c:557:19: error: initializer element is not constant
     .dev_dma_free  = null_lnvm_dev_dma_free,
                      ^
   drivers/block/null_blk.c:557:19: note: (near initialization for 'null_lnvm_dev_ops.dev_dma_free')
>> drivers/block/null_blk.c:566:12: error: invalid storage class for function 'null_open'
    static int null_open(struct block_device *bdev, fmode_t mode)
               ^
>> drivers/block/null_blk.c:571:13: error: invalid storage class for function 'null_release'
    static void null_release(struct gendisk *disk, fmode_t mode)
                ^
   drivers/block/null_blk.c:577:11: error: initializer element is not constant
     .open =  null_open,
              ^
   drivers/block/null_blk.c:577:11: note: (near initialization for 'null_fops.open')
   drivers/block/null_blk.c:578:13: error: initializer element is not constant
     .release = null_release,
                ^
   drivers/block/null_blk.c:578:13: note: (near initialization for 'null_fops.release')
>> drivers/block/null_blk.c:581:12: error: invalid storage class for function 'setup_commands'
    static int setup_commands(struct nullb_queue *nq)
               ^
>> drivers/block/null_blk.c:607:12: error: invalid storage class for function 'setup_queues'
    static int setup_queues(struct nullb *nullb)
               ^
>> drivers/block/null_blk.c:620:12: error: invalid storage class for function 'init_driver_queues'
    static int init_driver_queues(struct nullb *nullb)
               ^
>> drivers/block/null_blk.c:638:12: error: invalid storage class for function 'null_add_dev'
    static int null_add_dev(void)
               ^
>> drivers/block/null_blk.c:760:19: error: invalid storage class for function 'null_init'
    static int __init null_init(void)
                      ^
>> drivers/block/null_blk.c:817:20: error: invalid storage class for function 'null_exit'
    static void __exit null_exit(void)
                       ^
   In file included from drivers/block/null_blk.c:1:0:
   include/linux/module.h:128:27: error: invalid storage class for function '__inittest'
     static inline initcall_t __inittest(void)  \
                              ^
>> drivers/block/null_blk.c:831:1: note: in expansion of macro 'module_init'
    module_init(null_init);
    ^
>> drivers/block/null_blk.c:831:1: warning: 'alias' attribute ignored [-Wattributes]
   In file included from drivers/block/null_blk.c:1:0:
   include/linux/module.h:134:27: error: invalid storage class for function '__exittest'
     static inline exitcall_t __exittest(void)  \
                              ^
>> drivers/block/null_blk.c:832:1: note: in expansion of macro 'module_exit'
    module_exit(null_exit);
    ^
   include/linux/module.h:134:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
     static inline exitcall_t __exittest(void)  \
     ^
>> drivers/block/null_blk.c:832:1: note: in expansion of macro 'module_exit'
    module_exit(null_exit);
    ^
   drivers/block/null_blk.c:832:1: warning: 'alias' attribute ignored [-Wattributes]
   In file included from include/linux/module.h:18:0,
                    from drivers/block/null_blk.c:1:
   include/linux/moduleparam.h:21:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
    static const char __UNIQUE_ID(name)[]       \
    ^
   include/linux/module.h:171:32: note: in expansion of macro '__MODULE_INFO'
    #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
                                   ^
   include/linux/module.h:215:32: note: in expansion of macro 'MODULE_INFO'
    #define MODULE_AUTHOR(_author) MODULE_INFO(author, _author)
                                   ^
>> drivers/block/null_blk.c:834:1: note: in expansion of macro 'MODULE_AUTHOR'
    MODULE_AUTHOR("Jens Axboe <jaxboe@...ionio.com>");
    ^
>> drivers/block/null_blk.c:835:1: error: expected declaration or statement at end of input
    MODULE_LICENSE("GPL");
    ^
   drivers/block/null_blk.c: At top level:
   drivers/block/null_blk.c:533:13: warning: 'null_lnvm_destroy_dma_pool' defined but not used [-Wunused-function]
    static void null_lnvm_destroy_dma_pool(void *pool)
                ^

vim +/null_lnvm_dev_dma_alloc +538 drivers/block/null_blk.c

   532	
   533	static void null_lnvm_destroy_dma_pool(void *pool)
   534	{
   535		mempool_destroy(pool);
   536	
   537	
 > 538	static void *null_lnvm_dev_dma_alloc(struct request_queue *q, void *pool,
   539					gfp_t mem_flags, dma_addr_t *dma_handler)
   540	{
   541		return mempool_alloc(pool, mem_flags);
   542	}
   543	
 > 544	static void null_lnvm_dev_dma_free(void *pool, void *entry,
   545								dma_addr_t dma_handler)
   546	{
   547		mempool_free(entry, pool);
   548	}
   549	
   550	static struct nvm_dev_ops null_lnvm_dev_ops = {
   551		.identity		= null_lnvm_id,
   552		.submit_io		= null_lnvm_submit_io,
   553	
   554		.create_dma_pool	= null_lnvm_create_dma_pool,
   555		.destroy_dma_pool	= null_lnvm_destroy_dma_pool,
 > 556		.dev_dma_alloc		= null_lnvm_dev_dma_alloc,
   557		.dev_dma_free		= null_lnvm_dev_dma_free,
   558	
   559		/* Simulate nvme protocol restriction */
   560		.max_phys_sect		= 64,
   561	};
   562	#else
   563	static struct nvm_dev_ops null_lnvm_dev_ops;
   564	#endif /* CONFIG_NVM */
   565	
 > 566	static int null_open(struct block_device *bdev, fmode_t mode)
   567	{
   568		return 0;
   569	}
   570	
 > 571	static void null_release(struct gendisk *disk, fmode_t mode)
   572	{
   573	}
   574	
   575	static const struct block_device_operations null_fops = {
   576		.owner =	THIS_MODULE,
 > 577		.open =		null_open,
 > 578		.release =	null_release,
   579	};
   580	
 > 581	static int setup_commands(struct nullb_queue *nq)
   582	{
   583		struct nullb_cmd *cmd;
   584		int i, tag_size;
   585	
   586		nq->cmds = kzalloc(nq->queue_depth * sizeof(*cmd), GFP_KERNEL);
   587		if (!nq->cmds)
   588			return -ENOMEM;
   589	
   590		tag_size = ALIGN(nq->queue_depth, BITS_PER_LONG) / BITS_PER_LONG;
   591		nq->tag_map = kzalloc(tag_size * sizeof(unsigned long), GFP_KERNEL);
   592		if (!nq->tag_map) {
   593			kfree(nq->cmds);
   594			return -ENOMEM;
   595		}
   596	
   597		for (i = 0; i < nq->queue_depth; i++) {
   598			cmd = &nq->cmds[i];
   599			INIT_LIST_HEAD(&cmd->list);
   600			cmd->ll_list.next = NULL;
   601			cmd->tag = -1U;
   602		}
   603	
   604		return 0;
   605	}
   606	
 > 607	static int setup_queues(struct nullb *nullb)
   608	{
   609		nullb->queues = kzalloc(submit_queues * sizeof(struct nullb_queue),
   610									GFP_KERNEL);
   611		if (!nullb->queues)
   612			return -ENOMEM;
   613	
   614		nullb->nr_queues = 0;
   615		nullb->queue_depth = hw_queue_depth;
   616	
   617		return 0;
   618	}
   619	
 > 620	static int init_driver_queues(struct nullb *nullb)
   621	{
   622		struct nullb_queue *nq;
   623		int i, ret = 0;
   624	
   625		for (i = 0; i < submit_queues; i++) {
   626			nq = &nullb->queues[i];
   627	
   628			null_init_queue(nullb, nq);
   629	
   630			ret = setup_commands(nq);
   631			if (ret)
   632				return ret;
   633			nullb->nr_queues++;
   634		}
   635		return 0;
   636	}
   637	
 > 638	static int null_add_dev(void)
   639	{
   640		struct gendisk *disk;
   641		struct nullb *nullb;

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

Download attachment ".config.gz" of type "application/octet-stream" (52748 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ