All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Yu Kuai <yukuai1@huaweicloud.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH RFC v2 for-6.8/block 04/18] mtd: block2mtd: use bdev apis
Date: Thu, 14 Dec 2023 08:09:10 +0800	[thread overview]
Message-ID: <202312140712.mwReKJAj-lkp@intel.com> (raw)
In-Reply-To: <20231211140552.973290-5-yukuai1@huaweicloud.com>

Hi Yu,

[This is a private test report for your RFC patch.]
kernel test robot noticed the following build errors:

[auto build test ERROR on tytso-ext4/dev]
[also build test ERROR on axboe-block/for-next kdave/for-next linus/master v6.7-rc5]
[cannot apply to next-20231213]
[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/Yu-Kuai/block-add-some-bdev-apis/20231211-221732
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev
patch link:    https://lore.kernel.org/r/20231211140552.973290-5-yukuai1%40huaweicloud.com
patch subject: [PATCH RFC v2 for-6.8/block 04/18] mtd: block2mtd: use bdev apis
config: i386-randconfig-003-20231214 (https://download.01.org/0day-ci/archive/20231214/202312140712.mwReKJAj-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231214/202312140712.mwReKJAj-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312140712.mwReKJAj-lkp@intel.com/

All errors (new ones prefixed by >>):

   ld: drivers/mtd/devices/block2mtd.o: in function `add_device':
>> drivers/mtd/devices/block2mtd.c:289: undefined reference to `__moddi3'


vim +289 drivers/mtd/devices/block2mtd.c

   255	
   256	static struct block2mtd_dev *add_device(char *devname, int erase_size,
   257			char *label, int timeout)
   258	{
   259		const blk_mode_t mode = BLK_OPEN_READ | BLK_OPEN_WRITE;
   260		struct bdev_handle *bdev_handle;
   261		struct block_device *bdev;
   262		struct block2mtd_dev *dev;
   263		char *name;
   264	
   265		if (!devname)
   266			return NULL;
   267	
   268		dev = kzalloc(sizeof(struct block2mtd_dev), GFP_KERNEL);
   269		if (!dev)
   270			return NULL;
   271	
   272		/* Get a handle on the device */
   273		bdev_handle = bdev_open_by_path(devname, mode, dev, NULL);
   274		if (IS_ERR(bdev_handle))
   275			bdev_handle = mdtblock_early_get_bdev(devname, mode, timeout,
   276							      dev);
   277		if (IS_ERR(bdev_handle)) {
   278			pr_err("error: cannot open device %s\n", devname);
   279			goto err_free_block2mtd;
   280		}
   281		dev->bdev_handle = bdev_handle;
   282		bdev = bdev_handle->bdev;
   283	
   284		if (MAJOR(bdev->bd_dev) == MTD_BLOCK_MAJOR) {
   285			pr_err("attempting to use an MTD device as a block device\n");
   286			goto err_free_block2mtd;
   287		}
   288	
 > 289		if (bdev_nr_bytes(bdev) % erase_size) {
   290			pr_err("erasesize must be a divisor of device size\n");
   291			goto err_free_block2mtd;
   292		}
   293	
   294		mutex_init(&dev->write_mutex);
   295	
   296		/* Setup the MTD structure */
   297		/* make the name contain the block device in */
   298		if (!label)
   299			name = kasprintf(GFP_KERNEL, "block2mtd: %s", devname);
   300		else
   301			name = kstrdup(label, GFP_KERNEL);
   302		if (!name)
   303			goto err_destroy_mutex;
   304	
   305		dev->mtd.name = name;
   306	
   307		dev->mtd.size = bdev_nr_bytes(bdev) & PAGE_MASK;
   308		dev->mtd.erasesize = erase_size;
   309		dev->mtd.writesize = 1;
   310		dev->mtd.writebufsize = PAGE_SIZE;
   311		dev->mtd.type = MTD_RAM;
   312		dev->mtd.flags = MTD_CAP_RAM;
   313		dev->mtd._erase = block2mtd_erase;
   314		dev->mtd._write = block2mtd_write;
   315		dev->mtd._sync = block2mtd_sync;
   316		dev->mtd._read = block2mtd_read;
   317		dev->mtd.priv = dev;
   318		dev->mtd.owner = THIS_MODULE;
   319	
   320		if (mtd_device_register(&dev->mtd, NULL, 0)) {
   321			/* Device didn't get added, so free the entry */
   322			goto err_destroy_mutex;
   323		}
   324	
   325		list_add(&dev->list, &blkmtd_device_list);
   326		pr_info("mtd%d: [%s] erase_size = %dKiB [%d]\n",
   327			dev->mtd.index,
   328			label ? label : dev->mtd.name + strlen("block2mtd: "),
   329			dev->mtd.erasesize >> 10, dev->mtd.erasesize);
   330		return dev;
   331	
   332	err_destroy_mutex:
   333		mutex_destroy(&dev->write_mutex);
   334	err_free_block2mtd:
   335		block2mtd_free_device(dev);
   336		return NULL;
   337	}
   338	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  reply	other threads:[~2023-12-14  0:13 UTC|newest]

Thread overview: 106+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-11 14:05 [PATCH RFC v2 for-6.8/block 00/18] block: don't access bd_inode directly from other modules Yu Kuai
2023-12-11 14:05 ` Yu Kuai
2023-12-11 14:05 ` Yu Kuai
2023-12-11 14:05 ` [PATCH RFC v2 for-6.8/block 01/18] block: add some bdev apis Yu Kuai
2023-12-11 14:05   ` Yu Kuai
2023-12-11 14:05   ` Yu Kuai
2023-12-11 16:52   ` Jan Kara
2023-12-11 16:52     ` Jan Kara
2023-12-11 16:52     ` Jan Kara
2023-12-12  1:25     ` Yu Kuai
2023-12-12  1:25       ` Yu Kuai
2023-12-12  1:25       ` Yu Kuai
2023-12-12 13:14     ` Christoph Hellwig
2023-12-12 13:14       ` Christoph Hellwig
2023-12-12 13:14       ` Christoph Hellwig
2023-12-13  1:10       ` Yu Kuai
2023-12-13  1:10         ` Yu Kuai
2023-12-13  1:10         ` Yu Kuai
2023-12-12 13:16   ` Christoph Hellwig
2023-12-12 13:16     ` Christoph Hellwig
2023-12-12 13:16     ` Christoph Hellwig
2023-12-13  1:09     ` Yu Kuai
2023-12-13  1:09       ` Yu Kuai
2023-12-13  1:09       ` Yu Kuai
2023-12-11 14:05 ` [PATCH RFC v2 for-6.8/block 02/18] xen/blkback: use bdev api in xen_update_blkif_status() Yu Kuai
2023-12-11 14:05   ` Yu Kuai
2023-12-11 14:05   ` Yu Kuai
2023-12-11 14:05 ` [PATCH RFC v2 for-6.8/block 03/18] bcache: use bdev api in read_super() Yu Kuai
2023-12-11 14:05   ` Yu Kuai
2023-12-11 14:05   ` Yu Kuai
2023-12-11 14:05 ` [PATCH RFC v2 for-6.8/block 04/18] mtd: block2mtd: use bdev apis Yu Kuai
2023-12-11 14:05   ` Yu Kuai
2023-12-11 14:05   ` Yu Kuai
2023-12-14  0:09   ` kernel test robot [this message]
2023-12-14  1:56   ` kernel test robot
2023-12-11 14:05 ` [PATCH RFC v2 for-6.8/block 05/18] s390/dasd: use bdev api in dasd_format() Yu Kuai
2023-12-11 14:05   ` Yu Kuai
2023-12-11 14:05   ` Yu Kuai
2023-12-11 14:05 ` [PATCH RFC v2 for-6.8/block 06/18] scsicam: use bdev api in scsi_bios_ptable() Yu Kuai
2023-12-11 14:05   ` Yu Kuai
2023-12-11 14:05   ` Yu Kuai
2023-12-11 14:05 ` [PATCH RFC v2 for-6.8/block 07/18] bcachefs: remove dead function bdev_sectors() Yu Kuai
2023-12-11 14:05   ` Yu Kuai
2023-12-11 14:05   ` Yu Kuai
2023-12-11 14:05 ` [PATCH RFC v2 for-6.8/block 08/18] bio: export bio_add_folio_nofail() Yu Kuai
2023-12-11 14:05   ` Yu Kuai
2023-12-11 14:05   ` Yu Kuai
2023-12-11 14:05 ` [PATCH RFC v2 for-6.8/block 09/18] btrfs: use bdev apis Yu Kuai
2023-12-11 14:05   ` Yu Kuai
2023-12-11 14:05   ` Yu Kuai
2023-12-11 14:05 ` [PATCH RFC v2 for-6.8/block 10/18] cramfs: use bdev apis in cramfs_blkdev_read() Yu Kuai
2023-12-11 14:05   ` Yu Kuai
2023-12-11 14:05   ` Yu Kuai
2023-12-11 14:07 ` [PATCH RFC v2 for-6.8/block 11/18] erofs: use bdev api Yu Kuai
2023-12-11 14:07   ` Yu Kuai
2023-12-11 14:07   ` Yu Kuai
2023-12-12  6:35   ` Gao Xiang
2023-12-12  6:35     ` Gao Xiang
2023-12-12  6:35     ` Gao Xiang
2023-12-12  6:49     ` Yu Kuai
2023-12-12  6:49       ` Yu Kuai
2023-12-12  6:49       ` Yu Kuai
2023-12-11 14:07 ` [PATCH RFC v2 for-6.8/block 12/18] gfs2: " Yu Kuai
2023-12-11 14:07   ` Yu Kuai
2023-12-11 14:07   ` Yu Kuai
2023-12-11 14:07 ` [PATCH RFC v2 for-6.8/block 13/18] nilfs2: use bdev api in nilfs_attach_log_writer() Yu Kuai
2023-12-11 14:07   ` Yu Kuai
2023-12-11 14:07   ` Yu Kuai
2023-12-11 14:07 ` [PATCH RFC v2 for-6.8/block 14/18] jbd2: use bdev apis Yu Kuai
2023-12-11 14:07   ` Yu Kuai
2023-12-11 14:07   ` Yu Kuai
2023-12-11 14:07 ` [PATCH RFC v2 for-6.8/block 15/18] buffer: add a new helper to read sb block Yu Kuai
2023-12-11 14:07   ` Yu Kuai
2023-12-11 14:07   ` Yu Kuai
2023-12-11 17:27   ` Jan Kara
2023-12-11 17:27     ` Jan Kara
2023-12-11 17:27     ` Jan Kara
2023-12-12  1:32     ` Yu Kuai
2023-12-12  1:32       ` Yu Kuai
2023-12-12  1:32       ` Yu Kuai
2023-12-12 13:25   ` Christoph Hellwig
2023-12-12 13:25     ` Christoph Hellwig
2023-12-12 13:25     ` Christoph Hellwig
2023-12-12 14:11     ` Jan Kara
2023-12-12 14:11       ` Jan Kara
2023-12-12 14:11       ` Jan Kara
2023-12-11 14:08 ` [PATCH RFC v2 for-6.8/block 16/18] ext4: use " Yu Kuai
2023-12-11 14:08   ` Yu Kuai
2023-12-11 14:08   ` Yu Kuai
2023-12-11 17:16   ` Jan Kara
2023-12-11 17:16     ` Jan Kara
2023-12-11 17:16     ` Jan Kara
2023-12-11 14:08 ` [PATCH RFC v2 for-6.8/block 17/18] ext4: remove block_device_ejected() Yu Kuai
2023-12-11 14:08   ` Yu Kuai
2023-12-11 14:08   ` Yu Kuai
2023-12-11 17:04   ` Jan Kara
2023-12-11 17:04     ` Jan Kara
2023-12-12 13:22   ` Christoph Hellwig
2023-12-12 13:22     ` Christoph Hellwig
2023-12-12 13:22     ` Christoph Hellwig
2023-12-11 14:08 ` [PATCH RFC v2 for-6.8/block 18/18] ext4: use bdev apis Yu Kuai
2023-12-11 14:08   ` Yu Kuai
2023-12-11 14:08   ` Yu Kuai
2023-12-11 17:02   ` Jan Kara
2023-12-11 17:02     ` Jan Kara
2023-12-11 17:02     ` Jan Kara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202312140712.mwReKJAj-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=yukuai1@huaweicloud.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.