[dm:dm-5.8 50/54] drivers/md/dm-zoned-metadata.c:2468:6: warning: no previous prototype for 'dmz_print_dev'

[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.8
head:   44eaf01834bc7414ab5298d097ed4e142a714420
commit: 4813c868bef0182b7ca7662f967b1c4bfdff1c1e [50/54] dm zoned: add metadata logging functions
config: parisc-randconfig-r024-20200519 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 4813c868bef0182b7ca7662f967b1c4bfdff1c1e
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc 

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

All warnings (new ones prefixed by >>, old ones prefixed by <<):

In file included from include/linux/mm.h:94,
from include/linux/bvec.h:13,
from include/linux/blk_types.h:10,
from include/linux/genhd.h:19,
from include/linux/blkdev.h:11,
from drivers/md/dm-zoned.h:12,
from drivers/md/dm-zoned-metadata.c:8:
include/asm-generic/pgtable.h: In function 'pte_clear_not_present_full':
arch/parisc/include/asm/pgtable.h:96:9: warning: variable 'old_pte' set but not used [-Wunused-but-set-variable]
96 |   pte_t old_pte;              |         ^~~~~~~
arch/parisc/include/asm/pgtable.h:322:34: note: in expansion of macro 'set_pte_at'
322 | #define pte_clear(mm, addr, xp)  set_pte_at(mm, addr, xp, __pte(0))
|                                  ^~~~~~~~~~
include/asm-generic/pgtable.h:201:2: note: in expansion of macro 'pte_clear'
201 |  pte_clear(mm, address, ptep);
|  ^~~~~~~~~
include/asm-generic/pgtable.h: In function '__ptep_modify_prot_commit':
arch/parisc/include/asm/pgtable.h:96:9: warning: variable 'old_pte' set but not used [-Wunused-but-set-variable]
96 |   pte_t old_pte;              |         ^~~~~~~
include/asm-generic/pgtable.h:640:2: note: in expansion of macro 'set_pte_at'
640 |  set_pte_at(vma->vm_mm, addr, ptep, pte);
|  ^~~~~~~~~~
drivers/md/dm-zoned-metadata.c: At top level:
>> drivers/md/dm-zoned-metadata.c:2468:6: warning: no previous prototype for 'dmz_print_dev' [-Wmissing-prototypes]
2468 | void dmz_print_dev(struct dmz_metadata *zmd, int num)
|      ^~~~~~~~~~~~~

vim +/dmz_print_dev +2468 drivers/md/dm-zoned-metadata.c

  2467	
> 2468	void dmz_print_dev(struct dmz_metadata *zmd, int num)
  2469	{
  2470		struct dmz_dev *dev = &zmd->dev[num];
  2471	
  2472		dmz_dev_info(dev, "Host-%s zoned block device",
  2473			     bdev_zoned_model(dev->bdev) == BLK_ZONED_HA ?
  2474			     "aware" : "managed");
  2475		dmz_dev_info(dev, "  %llu 512-byte logical sectors",
  2476			     (u64)dev->capacity);
  2477		dmz_dev_info(dev, "  %u zones of %llu 512-byte logical sectors",
  2478			     dev->nr_zones, (u64)zmd->zone_nr_sectors);
  2479	}
  2480	/*
  2481	 * Initialize the zoned metadata.
  2482	 */
  2483	int dmz_ctr_metadata(struct dmz_dev *dev, struct dmz_metadata **metadata,
  2484			     const char *devname)
  2485	{
  2486		struct dmz_metadata *zmd;
  2487		unsigned int i;
  2488		struct dm_zone *zone;
  2489		int ret;
  2490	
  2491		zmd = kzalloc(sizeof(struct dmz_metadata), GFP_KERNEL);
  2492		if (!zmd)
  2493			return -ENOMEM;
  2494	
  2495		strcpy(zmd->devname, devname);
  2496		zmd->dev = dev;
  2497		zmd->mblk_rbtree = RB_ROOT;
  2498		init_rwsem(&zmd->mblk_sem);
  2499		mutex_init(&zmd->mblk_flush_lock);
  2500		spin_lock_init(&zmd->mblk_lock);
  2501		INIT_LIST_HEAD(&zmd->mblk_lru_list);
  2502		INIT_LIST_HEAD(&zmd->mblk_dirty_list);
  2503	
  2504		mutex_init(&zmd->map_lock);
  2505		atomic_set(&zmd->unmap_nr_rnd, 0);
  2506		INIT_LIST_HEAD(&zmd->unmap_rnd_list);
  2507		INIT_LIST_HEAD(&zmd->map_rnd_list);
  2508	
  2509		atomic_set(&zmd->unmap_nr_seq, 0);
  2510		INIT_LIST_HEAD(&zmd->unmap_seq_list);
  2511		INIT_LIST_HEAD(&zmd->map_seq_list);
  2512	
  2513		atomic_set(&zmd->nr_reserved_seq_zones, 0);
  2514		INIT_LIST_HEAD(&zmd->reserved_seq_zones_list);
  2515	
  2516		init_waitqueue_head(&zmd->free_wq);
  2517	
  2518		/* Initialize zone descriptors */
  2519		ret = dmz_init_zones(zmd);
  2520		if (ret)
  2521			goto err;
  2522	
  2523		/* Get super block */
  2524		ret = dmz_load_sb(zmd);
  2525		if (ret)
  2526			goto err;
  2527	
  2528		/* Set metadata zones starting from sb_zone */
  2529		for (i = 0; i < zmd->nr_meta_zones << 1; i++) {
  2530			zone = dmz_get(zmd, zmd->sb[0].zone->id + i);
  2531			if (!dmz_is_rnd(zone))
  2532				goto err;
  2533			set_bit(DMZ_META, &zone->flags);
  2534		}
  2535	
  2536		/* Load mapping table */
  2537		ret = dmz_load_mapping(zmd);
  2538		if (ret)
  2539			goto err;
  2540	
  2541		/*
  2542		 * Cache size boundaries: allow at least 2 super blocks, the chunk map
  2543		 * blocks and enough blocks to be able to cache the bitmap blocks of
  2544		 * up to 16 zones when idle (min_nr_mblks). Otherwise, if busy, allow
  2545		 * the cache to add 512 more metadata blocks.
  2546		 */
  2547		zmd->min_nr_mblks = 2 + zmd->nr_map_blocks + zmd->zone_nr_bitmap_blocks * 16;
  2548		zmd->max_nr_mblks = zmd->min_nr_mblks + 512;
  2549		zmd->mblk_shrinker.count_objects = dmz_mblock_shrinker_count;
  2550		zmd->mblk_shrinker.scan_objects = dmz_mblock_shrinker_scan;
  2551		zmd->mblk_shrinker.seeks = DEFAULT_SEEKS;
  2552	
  2553		/* Metadata cache shrinker */
  2554		ret = register_shrinker(&zmd->mblk_shrinker);
  2555		if (ret) {
  2556			dmz_zmd_err(zmd, "Register metadata cache shrinker failed");
  2557			goto err;
  2558		}
  2559	
  2560		dmz_zmd_info(zmd, "DM-Zoned metadata version %d", DMZ_META_VER);
  2561		dmz_print_dev(zmd, 0);
  2562	
  2563		dmz_zmd_info(zmd, "  %u zones of %llu 512-byte logical sectors",
  2564			     zmd->nr_zones, (u64)zmd->zone_nr_sectors);
  2565		dmz_zmd_info(zmd, "  %u metadata zones",
  2566			     zmd->nr_meta_zones * 2);
  2567		dmz_zmd_info(zmd, "  %u data zones for %u chunks",
  2568			     zmd->nr_data_zones, zmd->nr_chunks);
  2569		dmz_zmd_info(zmd, "    %u random zones (%u unmapped)",
  2570			     zmd->nr_rnd, atomic_read(&zmd->unmap_nr_rnd));
  2571		dmz_zmd_info(zmd, "    %u sequential zones (%u unmapped)",
  2572			     zmd->nr_seq, atomic_read(&zmd->unmap_nr_seq));
  2573		dmz_zmd_info(zmd, "  %u reserved sequential data zones",
  2574			     zmd->nr_reserved_seq);
  2575		dmz_zmd_debug(zmd, "Format:");
  2576		dmz_zmd_debug(zmd, "%u metadata blocks per set (%u max cache)",
  2577			      zmd->nr_meta_blocks, zmd->max_nr_mblks);
  2578		dmz_zmd_debug(zmd, "  %u data zone mapping blocks",
  2579			      zmd->nr_map_blocks);
  2580		dmz_zmd_debug(zmd, "  %u bitmap blocks",
  2581			      zmd->nr_bitmap_blocks);
  2582	
  2583		*metadata = zmd;
  2584	
  2585		return 0;
  2586	err:
  2587		dmz_cleanup_metadata(zmd);
  2588		kfree(zmd);
  2589		*metadata = NULL;
  2590	
  2591		return ret;
  2592	}
  2593	

---
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