Hi Linus, [auto build test ERROR on linus/master] [also build test ERROR on v4.10-rc8 next-20170215] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Linus-Walleij/mmc-core-make-block-layer-non-optional/20170215-181952 config: i386-randconfig-h1-02151737 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=i386 All errors (new ones prefixed by >>): In file included from drivers/mmc/core/block.c:48:0: drivers/mmc/core/queue.h: In function 'mmc_req_is_special': drivers/mmc/core/queue.h:7:4: error: implicit declaration of function 'req_op' [-Werror=implicit-function-declaration] (req_op(req) == REQ_OP_FLUSH || ^~~~~~ drivers/mmc/core/queue.h:7:19: error: 'REQ_OP_FLUSH' undeclared (first use in this function) (req_op(req) == REQ_OP_FLUSH || ^~~~~~~~~~~~ drivers/mmc/core/queue.h:7:19: note: each undeclared identifier is reported only once for each function it appears in drivers/mmc/core/queue.h:8:19: error: 'REQ_OP_DISCARD' undeclared (first use in this function) req_op(req) == REQ_OP_DISCARD || ^~~~~~~~~~~~~~ drivers/mmc/core/queue.h:9:19: error: 'REQ_OP_SECURE_ERASE' undeclared (first use in this function) req_op(req) == REQ_OP_SECURE_ERASE); ^~~~~~~~~~~~~~~~~~~ drivers/mmc/core/block.c: In function 'mmc_blk_get': >> drivers/mmc/core/block.c:137:11: error: dereferencing pointer to incomplete type 'struct gendisk' md = disk->private_data; ^~ drivers/mmc/core/block.c: In function 'mmc_blk_put': drivers/mmc/core/block.c:159:3: error: implicit declaration of function 'blk_cleanup_queue' [-Werror=implicit-function-declaration] blk_cleanup_queue(md->queue.queue); ^~~~~~~~~~~~~~~~~ drivers/mmc/core/block.c:165:3: error: implicit declaration of function 'put_disk' [-Werror=implicit-function-declaration] put_disk(md->disk); ^~~~~~~~ drivers/mmc/core/block.c: In function 'power_ro_lock_show': drivers/mmc/core/block.c:175:40: error: implicit declaration of function 'dev_to_disk' [-Werror=implicit-function-declaration] struct mmc_blk_data *md = mmc_blk_get(dev_to_disk(dev)); ^~~~~~~~~~~ drivers/mmc/core/block.c:175:40: warning: passing argument 1 of 'mmc_blk_get' makes pointer from integer without a cast [-Wint-conversion] drivers/mmc/core/block.c:132:29: note: expected 'struct gendisk *' but argument is of type 'int' static struct mmc_blk_data *mmc_blk_get(struct gendisk *disk) ^~~~~~~~~~~ drivers/mmc/core/block.c: In function 'power_ro_lock_store': drivers/mmc/core/block.c:205:19: warning: passing argument 1 of 'mmc_blk_get' makes pointer from integer without a cast [-Wint-conversion] md = mmc_blk_get(dev_to_disk(dev)); ^~~~~~~~~~~ drivers/mmc/core/block.c:132:29: note: expected 'struct gendisk *' but argument is of type 'int' static struct mmc_blk_data *mmc_blk_get(struct gendisk *disk) ^~~~~~~~~~~ drivers/mmc/core/block.c:224:3: error: implicit declaration of function 'set_disk_ro' [-Werror=implicit-function-declaration] set_disk_ro(md->disk, 1); ^~~~~~~~~~~ drivers/mmc/core/block.c: In function 'force_ro_show': drivers/mmc/core/block.c:241:40: warning: passing argument 1 of 'mmc_blk_get' makes pointer from integer without a cast [-Wint-conversion] struct mmc_blk_data *md = mmc_blk_get(dev_to_disk(dev)); ^~~~~~~~~~~ drivers/mmc/core/block.c:132:29: note: expected 'struct gendisk *' but argument is of type 'int' static struct mmc_blk_data *mmc_blk_get(struct gendisk *disk) ^~~~~~~~~~~ drivers/mmc/core/block.c:244:10: error: implicit declaration of function 'get_disk_ro' [-Werror=implicit-function-declaration] get_disk_ro(dev_to_disk(dev)) ^ ^~~~~~~~~~~ drivers/mmc/core/block.c: In function 'force_ro_store': drivers/mmc/core/block.c:255:40: warning: passing argument 1 of 'mmc_blk_get' makes pointer from integer without a cast [-Wint-conversion] struct mmc_blk_data *md = mmc_blk_get(dev_to_disk(dev)); ^~~~~~~~~~~ drivers/mmc/core/block.c:132:29: note: expected 'struct gendisk *' but argument is of type 'int' static struct mmc_blk_data *mmc_blk_get(struct gendisk *disk) ^~~~~~~~~~~ drivers/mmc/core/block.c: In function 'mmc_blk_open': drivers/mmc/core/block.c:277:4: error: implicit declaration of function 'check_disk_change' [-Werror=implicit-function-declaration] check_disk_change(bdev); ^~~~~~~~~~~~~~~~~ drivers/mmc/core/block.c: In function 'mmc_blk_getgeo': drivers/mmc/core/block.c:302:19: error: implicit declaration of function 'get_capacity' [-Werror=implicit-function-declaration] geo->cylinders = get_capacity(bdev->bd_disk) / (4 * 16); ^~~~~~~~~~~~ In file included from include/asm-generic/ioctl.h:4:0, from arch/x86/include/uapi/asm/ioctl.h:1, from include/uapi/linux/ioctl.h:4, from arch/x86/include/uapi/asm/msr.h:7, from arch/x86/include/asm/msr.h:11, from arch/x86/include/asm/processor.h:20, from arch/x86/include/asm/cpufeature.h:4, from arch/x86/include/asm/thread_info.h:52, from include/linux/thread_info.h:25, from arch/x86/include/asm/preempt.h:6, from include/linux/preempt.h:59, from include/linux/spinlock.h:50, from include/linux/seqlock.h:35, from include/linux/time.h:5, from include/linux/stat.h:18, from include/linux/module.h:10, from drivers/mmc/core/block.c:21: drivers/mmc/core/block.c: In function 'mmc_blk_ioctl': include/uapi/linux/mmc/ioctl.h:59:27: error: 'MMC_BLOCK_MAJOR' undeclared (first use in this function) #define MMC_IOC_CMD _IOWR(MMC_BLOCK_MAJOR, 0, struct mmc_ioc_cmd) ^ include/uapi/asm-generic/ioctl.h:67:5: note: in definition of macro '_IOC' ((type) << _IOC_TYPESHIFT) | \ ^~~~ include/uapi/linux/mmc/ioctl.h:59:21: note: in expansion of macro '_IOWR' #define MMC_IOC_CMD _IOWR(MMC_BLOCK_MAJOR, 0, struct mmc_ioc_cmd) ^~~~~ drivers/mmc/core/block.c:698:7: note: in expansion of macro 'MMC_IOC_CMD' case MMC_IOC_CMD: ^~~~~~~~~~~ drivers/mmc/core/block.c: At top level: drivers/mmc/core/block.c:717:21: error: variable 'mmc_bdops' has initializer but incomplete type static const struct block_device_operations mmc_bdops = { ^~~~~~~~~~~~~~~~~~~~~~~ drivers/mmc/core/block.c:718:2: error: unknown field 'open' specified in initializer .open = mmc_blk_open, ^ drivers/mmc/core/block.c:718:12: warning: excess elements in struct initializer .open = mmc_blk_open, ^~~~~~~~~~~~ drivers/mmc/core/block.c:718:12: note: (near initialization for 'mmc_bdops') drivers/mmc/core/block.c:719:2: error: unknown field 'release' specified in initializer .release = mmc_blk_release, ^ drivers/mmc/core/block.c:719:14: warning: excess elements in struct initializer .release = mmc_blk_release, ^~~~~~~~~~~~~~~ drivers/mmc/core/block.c:719:14: note: (near initialization for 'mmc_bdops') drivers/mmc/core/block.c:720:2: error: unknown field 'getgeo' specified in initializer .getgeo = mmc_blk_getgeo, ^ drivers/mmc/core/block.c:720:14: warning: excess elements in struct initializer .getgeo = mmc_blk_getgeo, ^~~~~~~~~~~~~~ drivers/mmc/core/block.c:720:14: note: (near initialization for 'mmc_bdops') drivers/mmc/core/block.c:721:2: error: unknown field 'owner' specified in initializer .owner = THIS_MODULE, ^ In file included from include/linux/linkage.h:6:0, from include/linux/kernel.h:6, from include/linux/moduleparam.h:6, from drivers/mmc/core/block.c:20: include/linux/export.h:37:21: warning: excess elements in struct initializer #define THIS_MODULE ((struct module *)0) ^ drivers/mmc/core/block.c:721:13: note: in expansion of macro 'THIS_MODULE' .owner = THIS_MODULE, ^~~~~~~~~~~ include/linux/export.h:37:21: note: (near initialization for 'mmc_bdops') #define THIS_MODULE ((struct module *)0) ^ drivers/mmc/core/block.c:721:13: note: in expansion of macro 'THIS_MODULE' .owner = THIS_MODULE, ^~~~~~~~~~~ drivers/mmc/core/block.c:722:2: error: unknown field 'ioctl' specified in initializer .ioctl = mmc_blk_ioctl, ^ drivers/mmc/core/block.c:722:13: warning: excess elements in struct initializer .ioctl = mmc_blk_ioctl, ^~~~~~~~~~~~~ drivers/mmc/core/block.c:722:13: note: (near initialization for 'mmc_bdops') In file included from include/linux/kernel.h:13:0, from include/linux/moduleparam.h:6, from drivers/mmc/core/block.c:20: drivers/mmc/core/block.c: In function 'card_busy_detect': >> drivers/mmc/core/block.c:846:14: error: dereferencing pointer to incomplete type 'struct request' req->rq_disk->disk_name, err); ^ include/linux/printk.h:292:33: note: in definition of macro 'pr_err' printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~ drivers/mmc/core/block.c: In function 'send_stop': drivers/mmc/core/block.c:889:22: error: implicit declaration of function 'rq_data_dir' [-Werror=implicit-function-declaration] bool use_r1b_resp = rq_data_dir(req) == WRITE; ^~~~~~~~~~~ drivers/mmc/core/block.c: In function 'mmc_blk_issue_discard_rq': drivers/mmc/core/block.c:1158:9: error: implicit declaration of function 'blk_rq_pos' [-Werror=implicit-function-declaration] from = blk_rq_pos(req); ^~~~~~~~~~ drivers/mmc/core/block.c:1159:7: error: implicit declaration of function 'blk_rq_sectors' [-Werror=implicit-function-declaration] nr = blk_rq_sectors(req); ^~~~~~~~~~~~~~ drivers/mmc/core/block.c:1184:2: error: implicit declaration of function 'blk_end_request' [-Werror=implicit-function-declaration] blk_end_request(req, err, blk_rq_bytes(req)); ^~~~~~~~~~~~~~~ drivers/mmc/core/block.c:1184:28: error: implicit declaration of function 'blk_rq_bytes' [-Werror=implicit-function-declaration] blk_end_request(req, err, blk_rq_bytes(req)); ^~~~~~~~~~~~ drivers/mmc/core/block.c: In function 'mmc_blk_issue_flush': drivers/mmc/core/block.c:1266:2: error: implicit declaration of function 'blk_end_request_all' [-Werror=implicit-function-declaration] blk_end_request_all(req, ret); ^~~~~~~~~~~~~~~~~~~ drivers/mmc/core/block.c: In function 'mmc_blk_rw_rq_prep': drivers/mmc/core/block.c:1423:37: error: 'REQ_FUA' undeclared (first use in this function) bool do_rel_wr = (req->cmd_flags & REQ_FUA) && ^~~~~~~ drivers/mmc/core/block.c:1504:21: error: 'REQ_META' undeclared (first use in this function) (req->cmd_flags & REQ_META) && ^~~~~~~~ drivers/mmc/core/block.c: In function 'mmc_blk_issue_rw_rq': drivers/mmc/core/block.c:1736:20: error: 'RQF_QUIET' undeclared (first use in this function) req->rq_flags |= RQF_QUIET; ^~~~~~~~~ drivers/mmc/core/block.c:1739:5: error: implicit declaration of function 'blk_rq_cur_bytes' [-Werror=implicit-function-declaration] blk_rq_cur_bytes(req)); ^~~~~~~~~~~~~~~~ drivers/mmc/core/block.c: In function 'mmc_blk_issue_rq': drivers/mmc/core/block.c:1777:28: error: 'REQ_OP_DISCARD' undeclared (first use in this function) if (req && req_op(req) == REQ_OP_DISCARD) { ^~~~~~~~~~~~~~ drivers/mmc/core/block.c:1782:35: error: 'REQ_OP_SECURE_ERASE' undeclared (first use in this function) } else if (req && req_op(req) == REQ_OP_SECURE_ERASE) { ^~~~~~~~~~~~~~~~~~~ drivers/mmc/core/block.c:1787:35: error: 'REQ_OP_FLUSH' undeclared (first use in this function) } else if (req && req_op(req) == REQ_OP_FLUSH) { ^~~~~~~~~~~~ drivers/mmc/core/block.c: In function 'mmc_blk_alloc_req': drivers/mmc/core/block.c:1856:13: error: implicit declaration of function 'alloc_disk' [-Werror=implicit-function-declaration] md->disk = alloc_disk(perdev_minors); ^~~~~~~~~~ drivers/mmc/core/block.c:1856:11: warning: assignment makes pointer from integer without a cast [-Wint-conversion] md->disk = alloc_disk(perdev_minors); ^ drivers/mmc/core/block.c:1872:20: error: 'MMC_BLOCK_MAJOR' undeclared (first use in this function) md->disk->major = MMC_BLOCK_MAJOR; ^~~~~~~~~~~~~~~ drivers/mmc/core/block.c:1879:20: error: 'GENHD_FL_EXT_DEVT' undeclared (first use in this function) md->disk->flags = GENHD_FL_EXT_DEVT; ^~~~~~~~~~~~~~~~~ drivers/mmc/core/block.c:1881:22: error: 'GENHD_FL_NO_PART_SCAN' undeclared (first use in this function) md->disk->flags |= GENHD_FL_NO_PART_SCAN; ^~~~~~~~~~~~~~~~~~~~~ drivers/mmc/core/block.c:1899:3: error: implicit declaration of function 'blk_queue_logical_block_size' [-Werror=implicit-function-declaration] blk_queue_logical_block_size(md->queue.queue, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mmc/core/block.c:1904:2: error: implicit declaration of function 'set_capacity' [-Werror=implicit-function-declaration] set_capacity(md->disk, size); ^~~~~~~~~~~~ drivers/mmc/core/block.c:1919:3: error: implicit declaration of function 'blk_queue_write_cache' [-Werror=implicit-function-declaration] blk_queue_write_cache(md->queue.queue, true, true); ^~~~~~~~~~~~~~~~~~~~~ drivers/mmc/core/block.c: In function 'mmc_blk_alloc_part': drivers/mmc/core/block.c:1969:36: error: implicit declaration of function 'disk_to_dev' [-Werror=implicit-function-declaration] part_md = mmc_blk_alloc_req(card, disk_to_dev(md->disk), size, default_ro, ^~~~~~~~~~~ drivers/mmc/core/block.c:1969:36: warning: passing argument 2 of 'mmc_blk_alloc_req' makes pointer from integer without a cast [-Wint-conversion] drivers/mmc/core/block.c:1814:29: note: expected 'struct device *' but argument is of type 'int' static struct mmc_blk_data *mmc_blk_alloc_req(struct mmc_card *card, ^~~~~~~~~~~~~~~~~ drivers/mmc/core/block.c: In function 'mmc_blk_remove_req': drivers/mmc/core/block.c:2025:25: error: 'GENHD_FL_UP' undeclared (first use in this function) if (md->disk->flags & GENHD_FL_UP) { ^~~~~~~~~~~ drivers/mmc/core/block.c:2026:23: warning: passing argument 1 of 'device_remove_file' makes pointer from integer without a cast [-Wint-conversion] device_remove_file(disk_to_dev(md->disk), &md->force_ro); ^~~~~~~~~~~ In file included from include/linux/pm_runtime.h:12:0, from drivers/mmc/core/block.c:37: include/linux/device.h:602:13: note: expected 'struct device *' but argument is of type 'int' extern void device_remove_file(struct device *dev, ^~~~~~~~~~~~~~~~~~ drivers/mmc/core/block.c:2029:24: warning: passing argument 1 of 'device_remove_file' makes pointer from integer without a cast [-Wint-conversion] device_remove_file(disk_to_dev(md->disk), ^~~~~~~~~~~ In file included from include/linux/pm_runtime.h:12:0, from drivers/mmc/core/block.c:37: include/linux/device.h:602:13: note: expected 'struct device *' but argument is of type 'int' extern void device_remove_file(struct device *dev, ^~~~~~~~~~~~~~~~~~ drivers/mmc/core/block.c:2032:4: error: implicit declaration of function 'del_gendisk' [-Werror=implicit-function-declaration] del_gendisk(md->disk); ^~~~~~~~~~~ drivers/mmc/core/block.c: In function 'mmc_add_disk': drivers/mmc/core/block.c:2056:2: error: implicit declaration of function 'device_add_disk' [-Werror=implicit-function-declaration] device_add_disk(md->parent, md->disk); ^~~~~~~~~~~~~~~ drivers/mmc/core/block.c:2062:27: warning: passing argument 1 of 'device_create_file' makes pointer from integer without a cast [-Wint-conversion] ret = device_create_file(disk_to_dev(md->disk), &md->force_ro); ^~~~~~~~~~~ In file included from include/linux/pm_runtime.h:12:0, from drivers/mmc/core/block.c:37: include/linux/device.h:600:12: note: expected 'struct device *' but argument is of type 'int' extern int device_create_file(struct device *device, ^~~~~~~~~~~~~~~~~~ drivers/mmc/core/block.c:2081:28: warning: passing argument 1 of 'device_create_file' makes pointer from integer without a cast [-Wint-conversion] ret = device_create_file(disk_to_dev(md->disk), ^~~~~~~~~~~ In file included from include/linux/pm_runtime.h:12:0, from drivers/mmc/core/block.c:37: include/linux/device.h:600:12: note: expected 'struct device *' but argument is of type 'int' extern int device_create_file(struct device *device, ^~~~~~~~~~~~~~~~~~ drivers/mmc/core/block.c:2089:21: warning: passing argument 1 of 'device_remove_file' makes pointer from integer without a cast [-Wint-conversion] device_remove_file(disk_to_dev(md->disk), &md->force_ro); ^~~~~~~~~~~ In file included from include/linux/pm_runtime.h:12:0, from drivers/mmc/core/block.c:37: include/linux/device.h:602:13: note: expected 'struct device *' but argument is of type 'int' extern void device_remove_file(struct device *dev, ^~~~~~~~~~~~~~~~~~ drivers/mmc/core/block.c: In function 'mmc_blk_init': drivers/mmc/core/block.c:2310:8: error: implicit declaration of function 'register_blkdev' [-Werror=implicit-function-declaration] res = register_blkdev(MMC_BLOCK_MAJOR, "mmc"); ^~~~~~~~~~~~~~~ drivers/mmc/core/block.c:2310:24: error: 'MMC_BLOCK_MAJOR' undeclared (first use in this function) res = register_blkdev(MMC_BLOCK_MAJOR, "mmc"); ^~~~~~~~~~~~~~~ drivers/mmc/core/block.c:2320:2: error: implicit declaration of function 'unregister_blkdev' [-Werror=implicit-function-declaration] unregister_blkdev(MMC_BLOCK_MAJOR, "mmc"); ^~~~~~~~~~~~~~~~~ drivers/mmc/core/block.c: In function 'mmc_blk_exit': drivers/mmc/core/block.c:2328:20: error: 'MMC_BLOCK_MAJOR' undeclared (first use in this function) unregister_blkdev(MMC_BLOCK_MAJOR, "mmc"); ^~~~~~~~~~~~~~~ drivers/mmc/core/block.c: At top level: >> drivers/mmc/core/block.c:717:45: error: storage size of 'mmc_bdops' isn't known static const struct block_device_operations mmc_bdops = { ^~~~~~~~~ In file included from drivers/mmc/core/block.c:48:0: drivers/mmc/core/queue.h: In function 'mmc_req_is_special': drivers/mmc/core/queue.h:10:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ cc1: some warnings being treated as errors .. vim +137 drivers/mmc/core/block.c ^1da177e drivers/mmc/mmc_block.c Linus Torvalds 2005-04-16 121 }; ^1da177e drivers/mmc/mmc_block.c Linus Torvalds 2005-04-16 122 a621aaed drivers/mmc/mmc_block.c Arjan van de Ven 2006-01-12 123 static DEFINE_MUTEX(open_lock); ^1da177e drivers/mmc/mmc_block.c Linus Torvalds 2005-04-16 124 5e71b7a6 drivers/mmc/card/block.c Olof Johansson 2010-09-17 125 module_param(perdev_minors, int, 0444); 5e71b7a6 drivers/mmc/card/block.c Olof Johansson 2010-09-17 126 MODULE_PARM_DESC(perdev_minors, "Minors numbers to allocate per device"); 5e71b7a6 drivers/mmc/card/block.c Olof Johansson 2010-09-17 127 8d1e977d drivers/mmc/card/block.c Loic Pallardy 2012-08-06 128 static inline int mmc_blk_part_switch(struct mmc_card *card, 8d1e977d drivers/mmc/card/block.c Loic Pallardy 2012-08-06 129 struct mmc_blk_data *md); 8d1e977d drivers/mmc/card/block.c Loic Pallardy 2012-08-06 130 static int get_card_status(struct mmc_card *card, u32 *status, int retries); 8d1e977d drivers/mmc/card/block.c Loic Pallardy 2012-08-06 131 ^1da177e drivers/mmc/mmc_block.c Linus Torvalds 2005-04-16 132 static struct mmc_blk_data *mmc_blk_get(struct gendisk *disk) ^1da177e drivers/mmc/mmc_block.c Linus Torvalds 2005-04-16 133 { ^1da177e drivers/mmc/mmc_block.c Linus Torvalds 2005-04-16 134 struct mmc_blk_data *md; ^1da177e drivers/mmc/mmc_block.c Linus Torvalds 2005-04-16 135 a621aaed drivers/mmc/mmc_block.c Arjan van de Ven 2006-01-12 136 mutex_lock(&open_lock); ^1da177e drivers/mmc/mmc_block.c Linus Torvalds 2005-04-16 @137 md = disk->private_data; ^1da177e drivers/mmc/mmc_block.c Linus Torvalds 2005-04-16 138 if (md && md->usage == 0) ^1da177e drivers/mmc/mmc_block.c Linus Torvalds 2005-04-16 139 md = NULL; ^1da177e drivers/mmc/mmc_block.c Linus Torvalds 2005-04-16 140 if (md) ^1da177e drivers/mmc/mmc_block.c Linus Torvalds 2005-04-16 141 md->usage++; a621aaed drivers/mmc/mmc_block.c Arjan van de Ven 2006-01-12 142 mutex_unlock(&open_lock); ^1da177e drivers/mmc/mmc_block.c Linus Torvalds 2005-04-16 143 ^1da177e drivers/mmc/mmc_block.c Linus Torvalds 2005-04-16 144 return md; ^1da177e drivers/mmc/mmc_block.c Linus Torvalds 2005-04-16 145 } :::::: The code at line 137 was first introduced by commit :::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2 :::::: TO: Linus Torvalds <torvalds@xxxxxxxxxxxxxxx> :::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip