public inbox for dm-devel@redhat.com
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "jaeyuel.im" <jaeyuel.im@lge.com>
Cc: oe-kbuild-all@lists.linux.dev, dm-devel@lists.linux.dev,
	Mikulas Patocka <mpatocka@redhat.com>
Subject: [device-mapper-dm:for-next 6/15] drivers/md/dm-init.c:314:41: error: implicit declaration of function 'blkdev_get_no_open'; did you mean 'blkdev_get_zone_info'?
Date: Mon, 05 Jan 2026 01:46:03 +0800	[thread overview]
Message-ID: <202601050152.9pJILlEG-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git for-next
head:   89db2b980bb27a5ec625382f8fe7798f6ab10d01
commit: 5cf739d81755e49c39a3bd3c8bf5ec57441710b5 [6/15] dm init: ensure block device is ready before creating mapped device
config: sparc-randconfig-002-20260104 (https://download.01.org/0day-ci/archive/20260105/202601050152.9pJILlEG-lkp@intel.com/config)
compiler: sparc-linux-gcc (GCC) 12.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260105/202601050152.9pJILlEG-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/202601050152.9pJILlEG-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/md/dm-init.c: In function 'dm_init_init':
>> drivers/md/dm-init.c:314:41: error: implicit declaration of function 'blkdev_get_no_open'; did you mean 'blkdev_get_zone_info'? [-Werror=implicit-function-declaration]
     314 |                         while (!(bdev = blkdev_get_no_open(dev, false)))
         |                                         ^~~~~~~~~~~~~~~~~~
         |                                         blkdev_get_zone_info
   drivers/md/dm-init.c:314:39: warning: assignment to 'struct block_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     314 |                         while (!(bdev = blkdev_get_no_open(dev, false)))
         |                                       ^
>> drivers/md/dm-init.c:316:25: error: implicit declaration of function 'blkdev_put_no_open' [-Werror=implicit-function-declaration]
     316 |                         blkdev_put_no_open(bdev);
         |                         ^~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +314 drivers/md/dm-init.c

   267	
   268	/**
   269	 * dm_init_init - parse "dm-mod.create=" argument and configure drivers
   270	 */
   271	static int __init dm_init_init(void)
   272	{
   273		struct dm_device *dev;
   274		LIST_HEAD(devices);
   275		char *str;
   276		int i, r;
   277	
   278		if (!create)
   279			return 0;
   280	
   281		if (strlen(create) >= DM_MAX_STR_SIZE) {
   282			DMERR("Argument is too big. Limit is %d", DM_MAX_STR_SIZE);
   283			return -EINVAL;
   284		}
   285		str = kstrndup(create, DM_MAX_STR_SIZE, GFP_KERNEL);
   286		if (!str)
   287			return -ENOMEM;
   288	
   289		r = dm_parse_devices(&devices, str);
   290		if (r)
   291			goto out;
   292	
   293		DMINFO("waiting for all devices to be available before creating mapped devices");
   294		wait_for_device_probe();
   295	
   296		for (i = 0; i < ARRAY_SIZE(waitfor); i++) {
   297			if (waitfor[i]) {
   298				dev_t dev;
   299				struct block_device *bdev;
   300	
   301				DMINFO("waiting for device %s ...", waitfor[i]);
   302				while (early_lookup_bdev(waitfor[i], &dev))
   303					fsleep(5000);
   304	
   305				/*
   306				 * early_lookup_bdev() only checks if the device node exists and
   307				 * returns the dev_t. It does not guarantee that the underlying
   308				 * block device is fully initialized and ready to be opened. On
   309				 * some platforms, this can lead to a race condition where
   310				 * dm_early_create() fails because the device is not yet ready.
   311				 * Ensure the block device is truly available by attempting to
   312				 * get it.
   313				 */
 > 314				while (!(bdev = blkdev_get_no_open(dev, false)))
   315					fsleep(5000);
 > 316				blkdev_put_no_open(bdev);
   317			}
   318		}
   319	
   320		if (waitfor[0])
   321			DMINFO("all devices available");
   322	
   323		list_for_each_entry(dev, &devices, list) {
   324			if (dm_early_create(&dev->dmi, dev->table,
   325					    dev->target_args_array))
   326				break;
   327		}
   328	out:
   329		kfree(str);
   330		dm_setup_cleanup(&devices);
   331		return r;
   332	}
   333	

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

             reply	other threads:[~2026-01-04 17:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-04 17:46 kernel test robot [this message]
2026-01-04 19:37 ` [device-mapper-dm:for-next 6/15] drivers/md/dm-init.c:314:41: error: implicit declaration of function 'blkdev_get_no_open'; did you mean 'blkdev_get_zone_info'? Mikulas Patocka

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=202601050152.9pJILlEG-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=dm-devel@lists.linux.dev \
    --cc=jaeyuel.im@lge.com \
    --cc=mpatocka@redhat.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox