[dm:dm-5.10 3/6] drivers/md/dm-table.c:1507:28: error: implicit declaration of function 'lcm_not_zero'; did you mean

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git dm-5.10
head:   86958eac97c2edd72a4a36ac2c7c257aee639711
commit: 7a888ac0a16dbdff2889066f35580575c56ebf0c [3/6] dm table: stack 'chunk_sectors' limit to account for target-specific splitting
config: microblaze-randconfig-r033-20200913 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 7a888ac0a16dbdff2889066f35580575c56ebf0c
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=microblaze 

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

All errors (new ones prefixed by >>):

   drivers/md/dm-table.c: In function 'dm_calculate_queue_limits':
>> drivers/md/dm-table.c:1507:28: error: implicit declaration of function 'lcm_not_zero'; did you mean 'min_not_zero'? [-Werror=implicit-function-declaration]
    1507 |    limits->chunk_sectors = lcm_not_zero(ti->max_io_len,
         |                            ^~~~~~~~~~~~
         |                            min_not_zero
   cc1: some warnings being treated as errors

# https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git/commit/?id=7a888ac0a16dbdff2889066f35580575c56ebf0c
git remote add dm https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git
git fetch --no-tags dm dm-5.10
git checkout 7a888ac0a16dbdff2889066f35580575c56ebf0c
vim +1507 drivers/md/dm-table.c

  1467	
  1468	/*
  1469	 * Establish the new table's queue_limits and validate them.
  1470	 */
  1471	int dm_calculate_queue_limits(struct dm_table *table,
  1472				      struct queue_limits *limits)
  1473	{
  1474		struct dm_target *ti;
  1475		struct queue_limits ti_limits;
  1476		unsigned i;
  1477		enum blk_zoned_model zoned_model = BLK_ZONED_NONE;
  1478		unsigned int zone_sectors = 0;
  1479	
  1480		blk_set_stacking_limits(limits);
  1481	
  1482		for (i = 0; i < dm_table_get_num_targets(table); i++) {
  1483			blk_set_stacking_limits(&ti_limits);
  1484	
  1485			ti = dm_table_get_target(table, i);
  1486	
  1487			if (!ti->type->iterate_devices)
  1488				goto combine_limits;
  1489	
  1490			/*
  1491			 * Combine queue limits of all the devices this target uses.
  1492			 */
  1493			ti->type->iterate_devices(ti, dm_set_device_limits,
  1494						  &ti_limits);
  1495	
  1496			if (zoned_model == BLK_ZONED_NONE && ti_limits.zoned != BLK_ZONED_NONE) {
  1497				/*
  1498				 * After stacking all limits, validate all devices
  1499				 * in table support this zoned model and zone sectors.
  1500				 */
  1501				zoned_model = ti_limits.zoned;
  1502				zone_sectors = ti_limits.chunk_sectors;
  1503			}
  1504	
  1505			/* Stack chunk_sectors if target-specific splitting is required */
  1506			if (ti->max_io_len)
> 1507				limits->chunk_sectors = lcm_not_zero(ti->max_io_len,
  1508								     ti_limits.chunk_sectors);
  1509			/* Set I/O hints portion of queue limits */
  1510			if (ti->type->io_hints)
  1511				ti->type->io_hints(ti, &ti_limits);
  1512	
  1513			/*
  1514			 * Check each device area is consistent with the target's
  1515			 * overall queue limits.
  1516			 */
  1517			if (ti->type->iterate_devices(ti, device_area_is_invalid,
  1518						      &ti_limits))
  1519				return -EINVAL;
  1520	
  1521	combine_limits:
  1522			/*
  1523			 * Merge this target's queue limits into the overall limits
  1524			 * for the table.
  1525			 */
  1526			if (blk_stack_limits(limits, &ti_limits, 0) < 0)
  1527				DMWARN("%s: adding target device "
  1528				       "(start sect %llu len %llu) "
  1529				       "caused an alignment inconsistency",
  1530				       dm_device_name(table->md),
  1531				       (unsigned long long) ti->begin,
  1532				       (unsigned long long) ti->len);
  1533		}
  1534	
  1535		/*
  1536		 * Verify that the zoned model and zone sectors, as determined before
  1537		 * any .io_hints override, are the same across all devices in the table.
  1538		 * - this is especially relevant if .io_hints is emulating a disk-managed
  1539		 *   zoned model (aka BLK_ZONED_NONE) on host-managed zoned block devices.
  1540		 * BUT...
  1541		 */
  1542		if (limits->zoned != BLK_ZONED_NONE) {
  1543			/*
  1544			 * ...IF the above limits stacking determined a zoned model
  1545			 * validate that all of the table's devices conform to it.
  1546			 */
  1547			zoned_model = limits->zoned;
  1548			zone_sectors = limits->chunk_sectors;
  1549		}
  1550		if (validate_hardware_zoned_model(table, zoned_model, zone_sectors))
  1551			return -EINVAL;
  1552	
  1553		return validate_hardware_logical_block_alignment(table, limits);
  1554	}
  1555	

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

Attachment: .config.gz
Description: application/gzip

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux