[dm:dm-5.8 50/54] drivers/md/dm-zoned-metadata.c:2468:6: warning: no previous prototype for 'dmz_print_dev'
by kbuild test robot
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(a)intel.com>
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@lists.01.org
2 years, 4 months
[hyperv-linux:hyperv-next 16/27] drivers/scsi/storvsc_drv.c:624:6: warning: no previous prototype for function 'storvsc_change_target_cpu'
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git hyperv-next
head: f69bc337f7bdb619619af0a1caf951b1feeccb08
commit: 951d33f2d785c6dc721db44bb8c00ceaa4eeb2d6 [16/27] scsi: storvsc: Re-init stor_chns when a channel interrupt is re-assigned
config: x86_64-randconfig-a011-20200519 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 135b877874fae96b4372c8a3fbfaa8ff44ff86e3)
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout 951d33f2d785c6dc721db44bb8c00ceaa4eeb2d6
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
>> drivers/scsi/storvsc_drv.c:624:6: warning: no previous prototype for function 'storvsc_change_target_cpu' [-Wmissing-prototypes]
void storvsc_change_target_cpu(struct vmbus_channel *channel, u32 old, u32 new)
^
drivers/scsi/storvsc_drv.c:624:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void storvsc_change_target_cpu(struct vmbus_channel *channel, u32 old, u32 new)
^
static
1 warning generated.
vim +/storvsc_change_target_cpu +624 drivers/scsi/storvsc_drv.c
623
> 624 void storvsc_change_target_cpu(struct vmbus_channel *channel, u32 old, u32 new)
625 {
626 struct storvsc_device *stor_device;
627 struct vmbus_channel *cur_chn;
628 bool old_is_alloced = false;
629 struct hv_device *device;
630 unsigned long flags;
631 int cpu;
632
633 device = channel->primary_channel ?
634 channel->primary_channel->device_obj
635 : channel->device_obj;
636 stor_device = get_out_stor_device(device);
637 if (!stor_device)
638 return;
639
640 /* See storvsc_do_io() -> get_og_chn(). */
641 spin_lock_irqsave(&device->channel->lock, flags);
642
643 /*
644 * Determines if the storvsc device has other channels assigned to
645 * the "old" CPU to update the alloced_cpus mask and the stor_chns
646 * array.
647 */
648 if (device->channel != channel && device->channel->target_cpu == old) {
649 cur_chn = device->channel;
650 old_is_alloced = true;
651 goto old_is_alloced;
652 }
653 list_for_each_entry(cur_chn, &device->channel->sc_list, sc_list) {
654 if (cur_chn == channel)
655 continue;
656 if (cur_chn->target_cpu == old) {
657 old_is_alloced = true;
658 goto old_is_alloced;
659 }
660 }
661
662 old_is_alloced:
663 if (old_is_alloced)
664 WRITE_ONCE(stor_device->stor_chns[old], cur_chn);
665 else
666 cpumask_clear_cpu(old, &stor_device->alloced_cpus);
667
668 /* "Flush" the stor_chns array. */
669 for_each_possible_cpu(cpu) {
670 if (stor_device->stor_chns[cpu] && !cpumask_test_cpu(
671 cpu, &stor_device->alloced_cpus))
672 WRITE_ONCE(stor_device->stor_chns[cpu], NULL);
673 }
674
675 WRITE_ONCE(stor_device->stor_chns[new], channel);
676 cpumask_set_cpu(new, &stor_device->alloced_cpus);
677
678 spin_unlock_irqrestore(&device->channel->lock, flags);
679 }
680
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[habanaai:habanalabs-next 32/38] drivers/misc/habanalabs/gaudi/gaudi.c:3145:6: warning: variable 'val' set but not used
by kbuild test robot
tree: https://github.com/HabanaAI/linux.git habanalabs-next
head: 20ae9a7e300f7c35ba07cdfc6eff7e87a56f1b78
commit: 5a8ba1e332c98857b7a6190bf07e60ec48f00c9e [32/38] habanalabs: add gaudi asic-dependent code
config: x86_64-allmodconfig (attached as .config)
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-193-gb8fad4bc-dirty
git checkout 5a8ba1e332c98857b7a6190bf07e60ec48f00c9e
# save the attached .config to linux build tree
make C=1 ARCH=x86_64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
drivers/misc/habanalabs/gaudi/gaudi.c: In function 'gaudi_pre_hw_init':
>> drivers/misc/habanalabs/gaudi/gaudi.c:3145:6: warning: variable 'val' set but not used [-Wunused-but-set-variable]
u32 val;
^~~
drivers/misc/habanalabs/gaudi/gaudi.c: In function 'gaudi_hw_init':
drivers/misc/habanalabs/gaudi/gaudi.c:3212:6: warning: variable 'val' set but not used [-Wunused-but-set-variable]
u32 val;
^~~
drivers/misc/habanalabs/gaudi/gaudi.c: In function 'gaudi_debugfs_read32':
>> drivers/misc/habanalabs/gaudi/gaudi.c:4761:19: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
} else if ((addr >= DRAM_PHYS_BASE) &&
^~
drivers/misc/habanalabs/gaudi/gaudi.c: In function 'gaudi_debugfs_write32':
drivers/misc/habanalabs/gaudi/gaudi.c:4804:19: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
} else if ((addr >= DRAM_PHYS_BASE) &&
^~
drivers/misc/habanalabs/gaudi/gaudi.c: In function 'gaudi_debugfs_read64':
drivers/misc/habanalabs/gaudi/gaudi.c:4850:19: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
} else if ((addr >= DRAM_PHYS_BASE) &&
^~
drivers/misc/habanalabs/gaudi/gaudi.c: In function 'gaudi_debugfs_write64':
drivers/misc/habanalabs/gaudi/gaudi.c:4896:19: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
} else if ((addr >= DRAM_PHYS_BASE) &&
^~
vim +/val +3145 drivers/misc/habanalabs/gaudi/gaudi.c
3142
3143 static void gaudi_pre_hw_init(struct hl_device *hdev)
3144 {
> 3145 u32 val;
3146
3147 /* Perform read from the device to make sure device is up */
3148 val = RREG32(mmPCIE_DBI_DEVICE_ID_VENDOR_ID_REG);
3149
3150 /*
3151 * Let's mark in the H/W that we have reached this point. We check
3152 * this value in the reset_before_init function to understand whether
3153 * we need to reset the chip before doing H/W init. This register is
3154 * cleared by the H/W upon H/W reset
3155 */
3156 WREG32(mmHW_STATE, HL_DEVICE_HW_STATE_DIRTY);
3157
3158 /* Set the access through PCI bars (Linux driver only) as secured */
3159 WREG32(mmPCIE_WRAP_LBW_PROT_OVR, (PCIE_WRAP_LBW_PROT_OVR_RD_EN_MASK |
3160 PCIE_WRAP_LBW_PROT_OVR_WR_EN_MASK));
3161
3162 /* Perform read to flush the waiting writes to ensure configuration
3163 * was set in the device
3164 */
3165 val = RREG32(mmPCIE_WRAP_LBW_PROT_OVR);
3166
3167 if (hdev->axi_drain) {
3168 WREG32(mmPCIE_WRAP_LBW_DRAIN_CFG,
3169 1 << PCIE_WRAP_LBW_DRAIN_CFG_EN_SHIFT);
3170 WREG32(mmPCIE_WRAP_HBW_DRAIN_CFG,
3171 1 << PCIE_WRAP_HBW_DRAIN_CFG_EN_SHIFT);
3172
3173 /* Perform read to flush the DRAIN cfg */
3174 val = RREG32(mmPCIE_WRAP_HBW_DRAIN_CFG);
3175 } else {
3176 WREG32(mmPCIE_WRAP_LBW_DRAIN_CFG, 0);
3177 WREG32(mmPCIE_WRAP_HBW_DRAIN_CFG, 0);
3178
3179 /* Perform read to flush the DRAIN cfg */
3180 val = RREG32(mmPCIE_WRAP_HBW_DRAIN_CFG);
3181 }
3182
3183 /* Configure the reset registers. Must be done as early as possible
3184 * in case we fail during H/W initialization
3185 */
3186 WREG32(mmPSOC_GLOBAL_CONF_SOFT_RST_CFG_H,
3187 (CFG_RST_H_DMA_MASK |
3188 CFG_RST_H_MME_MASK |
3189 CFG_RST_H_SM_MASK |
3190 CFG_RST_H_TPC_MASK));
3191
3192 WREG32(mmPSOC_GLOBAL_CONF_SOFT_RST_CFG_L, CFG_RST_L_TPC_MASK);
3193
3194 WREG32(mmPSOC_GLOBAL_CONF_SW_ALL_RST_CFG_H,
3195 (CFG_RST_H_HBM_MASK |
3196 CFG_RST_H_TPC_MASK |
3197 CFG_RST_H_NIC_MASK |
3198 CFG_RST_H_SM_MASK |
3199 CFG_RST_H_DMA_MASK |
3200 CFG_RST_H_MME_MASK |
3201 CFG_RST_H_CPU_MASK |
3202 CFG_RST_H_MMU_MASK));
3203
3204 WREG32(mmPSOC_GLOBAL_CONF_SW_ALL_RST_CFG_L,
3205 (CFG_RST_L_IF_MASK |
3206 CFG_RST_L_PSOC_MASK |
3207 CFG_RST_L_TPC_MASK));
3208 }
3209
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
drivers/clk/socfpga/clk-gate.c:100:10: note: in expansion of macro 'GENMASK'
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 642b151f45dd54809ea00ecd3976a56c1ec9b53d
commit: 295bcca84916cb5079140a89fccb472bb8d1f6e2 linux/bits.h: add compile time sanity check of GENMASK inputs
date: 6 weeks ago
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-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 295bcca84916cb5079140a89fccb472bb8d1f6e2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
In file included from include/linux/bits.h:23,
from include/linux/bitops.h:5,
from include/linux/kernel.h:12,
from include/asm-generic/bug.h:19,
from arch/arm/include/asm/bug.h:60,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/gfp.h:5,
from include/linux/slab.h:15,
from drivers/clk/socfpga/clk-gate.c:8:
drivers/clk/socfpga/clk-gate.c: In function 'socfpga_clk_recalc_rate':
include/linux/bits.h:26:28: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
26 | __builtin_constant_p((l) > (h)), (l) > (h), 0)))
| ^
include/linux/build_bug.h:16:62: note: in definition of macro 'BUILD_BUG_ON_ZERO'
16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
| ^
include/linux/bits.h:39:3: note: in expansion of macro 'GENMASK_INPUT_CHECK'
39 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~~~~~~~~~~~
>> drivers/clk/socfpga/clk-gate.c:100:10: note: in expansion of macro 'GENMASK'
100 | val &= GENMASK(socfpgaclk->width - 1, 0);
| ^~~~~~~
include/linux/bits.h:26:40: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
26 | __builtin_constant_p((l) > (h)), (l) > (h), 0)))
| ^
include/linux/build_bug.h:16:62: note: in definition of macro 'BUILD_BUG_ON_ZERO'
16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
| ^
include/linux/bits.h:39:3: note: in expansion of macro 'GENMASK_INPUT_CHECK'
39 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~~~~~~~~~~~
>> drivers/clk/socfpga/clk-gate.c:100:10: note: in expansion of macro 'GENMASK'
100 | val &= GENMASK(socfpgaclk->width - 1, 0);
| ^~~~~~~
--
In file included from include/linux/bits.h:23,
from include/linux/bitops.h:5,
from include/linux/kernel.h:12,
from include/asm-generic/bug.h:19,
from arch/arm/include/asm/bug.h:60,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/gfp.h:5,
from include/linux/slab.h:15,
from drivers/clk/socfpga/clk-periph.c:8:
drivers/clk/socfpga/clk-periph.c: In function 'clk_periclk_recalc_rate':
include/linux/bits.h:26:28: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
26 | __builtin_constant_p((l) > (h)), (l) > (h), 0)))
| ^
include/linux/build_bug.h:16:62: note: in definition of macro 'BUILD_BUG_ON_ZERO'
16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
| ^
include/linux/bits.h:39:3: note: in expansion of macro 'GENMASK_INPUT_CHECK'
39 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~~~~~~~~~~~
>> drivers/clk/socfpga/clk-periph.c:28:11: note: in expansion of macro 'GENMASK'
28 | val &= GENMASK(socfpgaclk->width - 1, 0);
| ^~~~~~~
include/linux/bits.h:26:40: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
26 | __builtin_constant_p((l) > (h)), (l) > (h), 0)))
| ^
include/linux/build_bug.h:16:62: note: in definition of macro 'BUILD_BUG_ON_ZERO'
16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
| ^
include/linux/bits.h:39:3: note: in expansion of macro 'GENMASK_INPUT_CHECK'
39 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~~~~~~~~~~~
>> drivers/clk/socfpga/clk-periph.c:28:11: note: in expansion of macro 'GENMASK'
28 | val &= GENMASK(socfpgaclk->width - 1, 0);
| ^~~~~~~
--
In file included from include/linux/bits.h:23,
from include/linux/bitops.h:5,
from include/linux/kernel.h:12,
from include/asm-generic/bug.h:19,
from arch/arm/include/asm/bug.h:60,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/gfp.h:5,
from include/linux/slab.h:15,
from drivers/clk/socfpga/clk-periph-a10.c:5:
drivers/clk/socfpga/clk-periph-a10.c: In function 'clk_periclk_recalc_rate':
include/linux/bits.h:26:28: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
26 | __builtin_constant_p((l) > (h)), (l) > (h), 0)))
| ^
include/linux/build_bug.h:16:62: note: in definition of macro 'BUILD_BUG_ON_ZERO'
16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
| ^
include/linux/bits.h:39:3: note: in expansion of macro 'GENMASK_INPUT_CHECK'
39 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~~~~~~~~~~~
>> drivers/clk/socfpga/clk-periph-a10.c:30:10: note: in expansion of macro 'GENMASK'
30 | div &= GENMASK(socfpgaclk->width - 1, 0);
| ^~~~~~~
include/linux/bits.h:26:40: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
26 | __builtin_constant_p((l) > (h)), (l) > (h), 0)))
| ^
include/linux/build_bug.h:16:62: note: in definition of macro 'BUILD_BUG_ON_ZERO'
16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
| ^
include/linux/bits.h:39:3: note: in expansion of macro 'GENMASK_INPUT_CHECK'
39 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~~~~~~~~~~~
>> drivers/clk/socfpga/clk-periph-a10.c:30:10: note: in expansion of macro 'GENMASK'
30 | div &= GENMASK(socfpgaclk->width - 1, 0);
| ^~~~~~~
--
In file included from include/linux/bits.h:23,
from include/linux/bitops.h:5,
from include/linux/kernel.h:12,
from include/asm-generic/bug.h:19,
from arch/arm/include/asm/bug.h:60,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/gfp.h:5,
from include/linux/slab.h:15,
from drivers/clk/socfpga/clk-gate-a10.c:5:
drivers/clk/socfpga/clk-gate-a10.c: In function 'socfpga_gate_clk_recalc_rate':
include/linux/bits.h:26:28: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
26 | __builtin_constant_p((l) > (h)), (l) > (h), 0)))
| ^
include/linux/build_bug.h:16:62: note: in definition of macro 'BUILD_BUG_ON_ZERO'
16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
| ^
include/linux/bits.h:39:3: note: in expansion of macro 'GENMASK_INPUT_CHECK'
39 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~~~~~~~~~~~
>> drivers/clk/socfpga/clk-gate-a10.c:31:10: note: in expansion of macro 'GENMASK'
31 | val &= GENMASK(socfpgaclk->width - 1, 0);
| ^~~~~~~
include/linux/bits.h:26:40: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
26 | __builtin_constant_p((l) > (h)), (l) > (h), 0)))
| ^
include/linux/build_bug.h:16:62: note: in definition of macro 'BUILD_BUG_ON_ZERO'
16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
| ^
include/linux/bits.h:39:3: note: in expansion of macro 'GENMASK_INPUT_CHECK'
39 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~~~~~~~~~~~
>> drivers/clk/socfpga/clk-gate-a10.c:31:10: note: in expansion of macro 'GENMASK'
31 | val &= GENMASK(socfpgaclk->width - 1, 0);
| ^~~~~~~
vim +/GENMASK +100 drivers/clk/socfpga/clk-gate.c
97259e99bdc914 Steffen Trumtrar 2014-01-06 89
97259e99bdc914 Steffen Trumtrar 2014-01-06 90 static unsigned long socfpga_clk_recalc_rate(struct clk_hw *hwclk,
97259e99bdc914 Steffen Trumtrar 2014-01-06 91 unsigned long parent_rate)
97259e99bdc914 Steffen Trumtrar 2014-01-06 92 {
97259e99bdc914 Steffen Trumtrar 2014-01-06 93 struct socfpga_gate_clk *socfpgaclk = to_socfpga_gate_clk(hwclk);
97259e99bdc914 Steffen Trumtrar 2014-01-06 94 u32 div = 1, val;
97259e99bdc914 Steffen Trumtrar 2014-01-06 95
97259e99bdc914 Steffen Trumtrar 2014-01-06 96 if (socfpgaclk->fixed_div)
97259e99bdc914 Steffen Trumtrar 2014-01-06 97 div = socfpgaclk->fixed_div;
97259e99bdc914 Steffen Trumtrar 2014-01-06 98 else if (socfpgaclk->div_reg) {
97259e99bdc914 Steffen Trumtrar 2014-01-06 99 val = readl(socfpgaclk->div_reg) >> socfpgaclk->shift;
25d4d341d31b34 Andy Shevchenko 2015-07-13 @100 val &= GENMASK(socfpgaclk->width - 1, 0);
97259e99bdc914 Steffen Trumtrar 2014-01-06 101 /* Check for GPIO_DB_CLK by its offset */
97259e99bdc914 Steffen Trumtrar 2014-01-06 102 if ((int) socfpgaclk->div_reg & SOCFPGA_GPIO_DB_CLK_OFFSET)
97259e99bdc914 Steffen Trumtrar 2014-01-06 103 div = val + 1;
97259e99bdc914 Steffen Trumtrar 2014-01-06 104 else
97259e99bdc914 Steffen Trumtrar 2014-01-06 105 div = (1 << val);
97259e99bdc914 Steffen Trumtrar 2014-01-06 106 }
97259e99bdc914 Steffen Trumtrar 2014-01-06 107
97259e99bdc914 Steffen Trumtrar 2014-01-06 108 return parent_rate / div;
97259e99bdc914 Steffen Trumtrar 2014-01-06 109 }
97259e99bdc914 Steffen Trumtrar 2014-01-06 110
:::::: The code at line 100 was first introduced by commit
:::::: 25d4d341d31b349836e1b12d10be34b9b575c12b clk: socfpga: switch to GENMASK()
:::::: TO: Andy Shevchenko <andriy.shevchenko(a)linux.intel.com>
:::::: CC: Stephen Boyd <sboyd(a)codeaurora.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[linux-next:master 6839/8703] drivers/rpmsg/qcom_glink_ssr.c:64:6: warning: no previous prototype for function 'qcom_glink_ssr_notify'
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: e098d7762d602be640c53565ceca342f81e55ad2
commit: 93bc3feee8bd5fbe29ad27779c5e7b369fd7c80b [6839/8703] rpmsg: glink: Integrate glink_ssr in qcom_glink
config: x86_64-randconfig-a013-20200519 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 135b877874fae96b4372c8a3fbfaa8ff44ff86e3)
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout 93bc3feee8bd5fbe29ad27779c5e7b369fd7c80b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
>> drivers/rpmsg/qcom_glink_ssr.c:64:6: warning: no previous prototype for function 'qcom_glink_ssr_notify' [-Wmissing-prototypes]
void qcom_glink_ssr_notify(const char *ssr_name)
^
drivers/rpmsg/qcom_glink_ssr.c:64:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void qcom_glink_ssr_notify(const char *ssr_name)
^
static
1 warning generated.
vim +/qcom_glink_ssr_notify +64 drivers/rpmsg/qcom_glink_ssr.c
5d1f2e3c8090c0 drivers/soc/qcom/glink_ssr.c Bjorn Andersson 2020-04-22 59
5d1f2e3c8090c0 drivers/soc/qcom/glink_ssr.c Bjorn Andersson 2020-04-22 60 /**
5d1f2e3c8090c0 drivers/soc/qcom/glink_ssr.c Bjorn Andersson 2020-04-22 61 * qcom_glink_ssr_notify() - notify GLINK SSR about stopped remoteproc
5d1f2e3c8090c0 drivers/soc/qcom/glink_ssr.c Bjorn Andersson 2020-04-22 62 * @ssr_name: name of the remoteproc that has been stopped
5d1f2e3c8090c0 drivers/soc/qcom/glink_ssr.c Bjorn Andersson 2020-04-22 63 */
5d1f2e3c8090c0 drivers/soc/qcom/glink_ssr.c Bjorn Andersson 2020-04-22 @64 void qcom_glink_ssr_notify(const char *ssr_name)
5d1f2e3c8090c0 drivers/soc/qcom/glink_ssr.c Bjorn Andersson 2020-04-22 65 {
5d1f2e3c8090c0 drivers/soc/qcom/glink_ssr.c Bjorn Andersson 2020-04-22 66 blocking_notifier_call_chain(&ssr_notifiers, 0, (void *)ssr_name);
5d1f2e3c8090c0 drivers/soc/qcom/glink_ssr.c Bjorn Andersson 2020-04-22 67 }
5d1f2e3c8090c0 drivers/soc/qcom/glink_ssr.c Bjorn Andersson 2020-04-22 68 EXPORT_SYMBOL_GPL(qcom_glink_ssr_notify);
5d1f2e3c8090c0 drivers/soc/qcom/glink_ssr.c Bjorn Andersson 2020-04-22 69
:::::: The code at line 64 was first introduced by commit
:::::: 5d1f2e3c8090c0769ee4a1b920e82277613327fc soc: qcom: glink_ssr: Internalize ssr_notifiers
:::::: TO: Bjorn Andersson <bjorn.andersson(a)linaro.org>
:::::: CC: Bjorn Andersson <bjorn.andersson(a)linaro.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[morimoto-linux:fw-cleanup-2020-05-18-v1 112/211] sound/soc/soc-pcm.c:631:28: warning: variable 'last' set but not used
by kbuild test robot
tree: https://github.com/morimoto/linux fw-cleanup-2020-05-18-v1
head: ab7ab9e3fba39b481f85abd88e5d2893f013650f
commit: f0b68bf29aed7f5122fcd158f1b0b3be032c422d [112/211] ASoC: soc-component: add mark for soc_pcm_components_open/close()
config: riscv-randconfig-r022-20200519 (attached as .config)
compiler: riscv64-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 f0b68bf29aed7f5122fcd158f1b0b3be032c422d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
sound/soc/soc-pcm.c: In function 'soc_pcm_components_open':
>> sound/soc/soc-pcm.c:631:28: warning: variable 'last' set but not used [-Wunused-but-set-variable]
631 | struct snd_soc_component *last = NULL;
| ^~~~
vim +/last +631 sound/soc/soc-pcm.c
bd477c31ca3ae8 Lars-Peter Clausen 2013-05-14 627
dd03907bf129b4 Kuninori Morimoto 2020-02-10 628 static int soc_pcm_components_open(struct snd_pcm_substream *substream)
e7ecfdb794fef1 Kuninori Morimoto 2019-05-13 629 {
e7ecfdb794fef1 Kuninori Morimoto 2019-05-13 630 struct snd_soc_pcm_runtime *rtd = substream->private_data;
d2aaa8d8bfba93 Kai Vehmanen 2020-02-20 @631 struct snd_soc_component *last = NULL;
e7ecfdb794fef1 Kuninori Morimoto 2019-05-13 632 struct snd_soc_component *component;
613fb50059cf19 Kuninori Morimoto 2020-01-10 633 int i, ret = 0;
e7ecfdb794fef1 Kuninori Morimoto 2019-05-13 634
613fb50059cf19 Kuninori Morimoto 2020-01-10 635 for_each_rtd_components(rtd, i, component) {
d2aaa8d8bfba93 Kai Vehmanen 2020-02-20 636 last = component;
d2aaa8d8bfba93 Kai Vehmanen 2020-02-20 637
f0b68bf29aed7f Kuninori Morimoto 2020-03-04 638 ret = snd_soc_component_module_get_when_open(component, substream);
4a81e8f30d0b42 Kuninori Morimoto 2019-07-26 639 if (ret < 0) {
e7ecfdb794fef1 Kuninori Morimoto 2019-05-13 640 dev_err(component->dev,
e7ecfdb794fef1 Kuninori Morimoto 2019-05-13 641 "ASoC: can't get module %s\n",
e7ecfdb794fef1 Kuninori Morimoto 2019-05-13 642 component->name);
d2aaa8d8bfba93 Kai Vehmanen 2020-02-20 643 break;
e7ecfdb794fef1 Kuninori Morimoto 2019-05-13 644 }
e7ecfdb794fef1 Kuninori Morimoto 2019-05-13 645
ae2f4849286eed Kuninori Morimoto 2019-07-26 646 ret = snd_soc_component_open(component, substream);
e7ecfdb794fef1 Kuninori Morimoto 2019-05-13 647 if (ret < 0) {
e7ecfdb794fef1 Kuninori Morimoto 2019-05-13 648 dev_err(component->dev,
e7ecfdb794fef1 Kuninori Morimoto 2019-05-13 649 "ASoC: can't open component %s: %d\n",
e7ecfdb794fef1 Kuninori Morimoto 2019-05-13 650 component->name, ret);
d2aaa8d8bfba93 Kai Vehmanen 2020-02-20 651 break;
e7ecfdb794fef1 Kuninori Morimoto 2019-05-13 652 }
e7ecfdb794fef1 Kuninori Morimoto 2019-05-13 653 }
dd03907bf129b4 Kuninori Morimoto 2020-02-10 654
d2aaa8d8bfba93 Kai Vehmanen 2020-02-20 655 return ret;
e7ecfdb794fef1 Kuninori Morimoto 2019-05-13 656 }
e7ecfdb794fef1 Kuninori Morimoto 2019-05-13 657
:::::: The code at line 631 was first introduced by commit
:::::: d2aaa8d8bfba93237ac944ee058fb98e2c2ef983 ASoC: soc-pcm: fix state tracking error in snd_soc_component_open/close()
:::::: TO: Kai Vehmanen <kai.vehmanen(a)linux.intel.com>
:::::: CC: Mark Brown <broonie(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[dm:dm-5.8 47/54] drivers/md/dm-zoned-reclaim.c:350:18: warning: variable 'dev' set but not used
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git dm-5.8
head: 44eaf01834bc7414ab5298d097ed4e142a714420
commit: 21a33c39f41e5fc4e9ecfdf958190c9dc4a86b94 [47/54] dm zoned: remove 'dev' argument from reclaim
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 21a33c39f41e5fc4e9ecfdf958190c9dc4a86b94
# 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(a)intel.com>
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-reclaim.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-reclaim.c: In function 'dmz_do_reclaim':
>> drivers/md/dm-zoned-reclaim.c:350:18: warning: variable 'dev' set but not used [-Wunused-but-set-variable]
350 | struct dmz_dev *dev;
| ^~~
vim +/dev +350 drivers/md/dm-zoned-reclaim.c
341
342 /*
343 * Find a candidate zone for reclaim and process it.
344 */
345 static int dmz_do_reclaim(struct dmz_reclaim *zrc)
346 {
347 struct dmz_metadata *zmd = zrc->metadata;
348 struct dm_zone *dzone;
349 struct dm_zone *rzone;
> 350 struct dmz_dev *dev;
351 unsigned long start;
352 int ret;
353
354 /* Get a data zone */
355 dzone = dmz_get_zone_for_reclaim(zmd);
356 if (IS_ERR(dzone))
357 return PTR_ERR(dzone);
358
359 start = jiffies;
360 dev = dmz_zone_to_dev(zmd, dzone);
361 if (dmz_is_rnd(dzone)) {
362 if (!dmz_weight(dzone)) {
363 /* Empty zone */
364 dmz_reclaim_empty(zrc, dzone);
365 ret = 0;
366 } else {
367 /*
368 * Reclaim the random data zone by moving its
369 * valid data blocks to a free sequential zone.
370 */
371 ret = dmz_reclaim_rnd_data(zrc, dzone);
372 }
373 rzone = dzone;
374
375 } else {
376 struct dm_zone *bzone = dzone->bzone;
377 sector_t chunk_block = 0;
378
379 ret = dmz_first_valid_block(zmd, bzone, &chunk_block);
380 if (ret < 0)
381 goto out;
382
383 if (ret == 0 || chunk_block >= dzone->wp_block) {
384 /*
385 * The buffer zone is empty or its valid blocks are
386 * after the data zone write pointer.
387 */
388 ret = dmz_reclaim_buf(zrc, dzone);
389 rzone = bzone;
390 } else {
391 /*
392 * Reclaim the data zone by merging it into the
393 * buffer zone so that the buffer zone itself can
394 * be later reclaimed.
395 */
396 ret = dmz_reclaim_seq_data(zrc, dzone);
397 rzone = dzone;
398 }
399 }
400 out:
401 if (ret) {
402 dmz_unlock_zone_reclaim(dzone);
403 return ret;
404 }
405
406 ret = dmz_flush_metadata(zrc->metadata);
407 if (ret) {
408 DMDEBUG("(%s): Metadata flush for zone %u failed, err %d\n",
409 dmz_metadata_label(zmd), rzone->id, ret);
410 return ret;
411 }
412
413 DMDEBUG("(%s): Reclaimed zone %u in %u ms",
414 dmz_metadata_label(zmd),
415 rzone->id, jiffies_to_msecs(jiffies - start));
416 return 0;
417 }
418
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[morimoto-linux:fw-cleanup-2020-05-18-v1 75/211] sound/soc/meson/aiu-encoder-i2s.c:75:15: warning: variable 'val' set but not used
by kbuild test robot
tree: https://github.com/morimoto/linux fw-cleanup-2020-05-18-v1
head: ab7ab9e3fba39b481f85abd88e5d2893f013650f
commit: 51a8050cee171f0bc5023ef26365e9700ab73994 [75/211] ASoC: soc-component: merge snd_soc_component_read() and snd_soc_component_read32()
config: ia64-randconfig-r025-20200519 (attached as .config)
compiler: ia64-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 51a8050cee171f0bc5023ef26365e9700ab73994
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
sound/soc/meson/aiu-encoder-i2s.c: In function 'aiu_encoder_i2s_setup_desc':
>> sound/soc/meson/aiu-encoder-i2s.c:75:15: warning: variable 'val' set but not used [-Wunused-but-set-variable]
75 | unsigned int val;
| ^~~
--
sound/soc/meson/aiu-fifo-i2s.c: In function 'aiu_fifo_i2s_trigger':
>> sound/soc/meson/aiu-fifo-i2s.c:49:15: warning: variable 'val' set but not used [-Wunused-but-set-variable]
49 | unsigned int val;
| ^~~
vim +/val +75 sound/soc/meson/aiu-encoder-i2s.c
6ae9ca9ce986bf Jerome Brunet 2020-02-13 69
6ae9ca9ce986bf Jerome Brunet 2020-02-13 70 static int aiu_encoder_i2s_setup_desc(struct snd_soc_component *component,
6ae9ca9ce986bf Jerome Brunet 2020-02-13 71 struct snd_pcm_hw_params *params)
6ae9ca9ce986bf Jerome Brunet 2020-02-13 72 {
6ae9ca9ce986bf Jerome Brunet 2020-02-13 73 /* Always operate in split (classic interleaved) mode */
6ae9ca9ce986bf Jerome Brunet 2020-02-13 74 unsigned int desc = AIU_I2S_SOURCE_DESC_MODE_SPLIT;
6ae9ca9ce986bf Jerome Brunet 2020-02-13 @75 unsigned int val;
6ae9ca9ce986bf Jerome Brunet 2020-02-13 76
6ae9ca9ce986bf Jerome Brunet 2020-02-13 77 /* Reset required to update the pipeline */
6ae9ca9ce986bf Jerome Brunet 2020-02-13 78 snd_soc_component_write(component, AIU_RST_SOFT, AIU_RST_SOFT_I2S_FAST);
51a8050cee171f Kuninori Morimoto 2020-05-11 79 val = snd_soc_component_read(component, AIU_I2S_SYNC);
6ae9ca9ce986bf Jerome Brunet 2020-02-13 80
6ae9ca9ce986bf Jerome Brunet 2020-02-13 81 switch (params_physical_width(params)) {
6ae9ca9ce986bf Jerome Brunet 2020-02-13 82 case 16: /* Nothing to do */
6ae9ca9ce986bf Jerome Brunet 2020-02-13 83 break;
6ae9ca9ce986bf Jerome Brunet 2020-02-13 84
6ae9ca9ce986bf Jerome Brunet 2020-02-13 85 case 32:
6ae9ca9ce986bf Jerome Brunet 2020-02-13 86 desc |= (AIU_I2S_SOURCE_DESC_MODE_24BIT |
6ae9ca9ce986bf Jerome Brunet 2020-02-13 87 AIU_I2S_SOURCE_DESC_MODE_32BIT);
6ae9ca9ce986bf Jerome Brunet 2020-02-13 88 break;
6ae9ca9ce986bf Jerome Brunet 2020-02-13 89
6ae9ca9ce986bf Jerome Brunet 2020-02-13 90 default:
6ae9ca9ce986bf Jerome Brunet 2020-02-13 91 return -EINVAL;
6ae9ca9ce986bf Jerome Brunet 2020-02-13 92 }
6ae9ca9ce986bf Jerome Brunet 2020-02-13 93
6ae9ca9ce986bf Jerome Brunet 2020-02-13 94 switch (params_channels(params)) {
6ae9ca9ce986bf Jerome Brunet 2020-02-13 95 case 2: /* Nothing to do */
6ae9ca9ce986bf Jerome Brunet 2020-02-13 96 break;
6ae9ca9ce986bf Jerome Brunet 2020-02-13 97 case 8:
6ae9ca9ce986bf Jerome Brunet 2020-02-13 98 desc |= AIU_I2S_SOURCE_DESC_MODE_8CH;
6ae9ca9ce986bf Jerome Brunet 2020-02-13 99 break;
6ae9ca9ce986bf Jerome Brunet 2020-02-13 100 default:
6ae9ca9ce986bf Jerome Brunet 2020-02-13 101 return -EINVAL;
6ae9ca9ce986bf Jerome Brunet 2020-02-13 102 }
6ae9ca9ce986bf Jerome Brunet 2020-02-13 103
6ae9ca9ce986bf Jerome Brunet 2020-02-13 104 snd_soc_component_update_bits(component, AIU_I2S_SOURCE_DESC,
6ae9ca9ce986bf Jerome Brunet 2020-02-13 105 AIU_I2S_SOURCE_DESC_MODE_8CH |
6ae9ca9ce986bf Jerome Brunet 2020-02-13 106 AIU_I2S_SOURCE_DESC_MODE_24BIT |
6ae9ca9ce986bf Jerome Brunet 2020-02-13 107 AIU_I2S_SOURCE_DESC_MODE_32BIT |
6ae9ca9ce986bf Jerome Brunet 2020-02-13 108 AIU_I2S_SOURCE_DESC_MODE_SPLIT,
6ae9ca9ce986bf Jerome Brunet 2020-02-13 109 desc);
6ae9ca9ce986bf Jerome Brunet 2020-02-13 110
6ae9ca9ce986bf Jerome Brunet 2020-02-13 111 return 0;
6ae9ca9ce986bf Jerome Brunet 2020-02-13 112 }
6ae9ca9ce986bf Jerome Brunet 2020-02-13 113
:::::: The code at line 75 was first introduced by commit
:::::: 6ae9ca9ce986bffe71fd0fbf9595de8500891b52 ASoC: meson: aiu: add i2s and spdif support
:::::: TO: Jerome Brunet <jbrunet(a)baylibre.com>
:::::: CC: Mark Brown <broonie(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
drivers/tty/vt/vt.c:1210:22: warning: comparison is always false due to limited range of data type
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 642b151f45dd54809ea00ecd3976a56c1ec9b53d
commit: 2717769e204e83e65b8819c5e2ef3e5b6639b270 vt: don't hardcode the mem allocation upper bound
date: 4 weeks ago
config: ia64-defconfig (attached as .config)
compiler: ia64-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 2717769e204e83e65b8819c5e2ef3e5b6639b270
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
drivers/tty/vt/vt.c: In function 'vc_do_resize':
>> drivers/tty/vt/vt.c:1210:22: warning: comparison is always false due to limited range of data type [-Wtype-limits]
1210 | if (new_screen_size > KMALLOC_MAX_SIZE)
| ^
vim +1210 drivers/tty/vt/vt.c
1163
1164 /**
1165 * vc_do_resize - resizing method for the tty
1166 * @tty: tty being resized
1167 * @real_tty: real tty (different to tty if a pty/tty pair)
1168 * @vc: virtual console private data
1169 * @cols: columns
1170 * @lines: lines
1171 *
1172 * Resize a virtual console, clipping according to the actual constraints.
1173 * If the caller passes a tty structure then update the termios winsize
1174 * information and perform any necessary signal handling.
1175 *
1176 * Caller must hold the console semaphore. Takes the termios rwsem and
1177 * ctrl_lock of the tty IFF a tty is passed.
1178 */
1179
1180 static int vc_do_resize(struct tty_struct *tty, struct vc_data *vc,
1181 unsigned int cols, unsigned int lines)
1182 {
1183 unsigned long old_origin, new_origin, new_scr_end, rlth, rrem, err = 0;
1184 unsigned long end;
1185 unsigned int old_rows, old_row_size, first_copied_row;
1186 unsigned int new_cols, new_rows, new_row_size, new_screen_size;
1187 unsigned int user;
1188 unsigned short *newscreen;
1189 struct uni_screen *new_uniscr = NULL;
1190
1191 WARN_CONSOLE_UNLOCKED();
1192
1193 if (!vc)
1194 return -ENXIO;
1195
1196 user = vc->vc_resize_user;
1197 vc->vc_resize_user = 0;
1198
1199 if (cols > VC_RESIZE_MAXCOL || lines > VC_RESIZE_MAXROW)
1200 return -EINVAL;
1201
1202 new_cols = (cols ? cols : vc->vc_cols);
1203 new_rows = (lines ? lines : vc->vc_rows);
1204 new_row_size = new_cols << 1;
1205 new_screen_size = new_row_size * new_rows;
1206
1207 if (new_cols == vc->vc_cols && new_rows == vc->vc_rows)
1208 return 0;
1209
> 1210 if (new_screen_size > KMALLOC_MAX_SIZE)
1211 return -EINVAL;
1212 newscreen = kzalloc(new_screen_size, GFP_USER);
1213 if (!newscreen)
1214 return -ENOMEM;
1215
1216 if (get_vc_uniscr(vc)) {
1217 new_uniscr = vc_uniscr_alloc(new_cols, new_rows);
1218 if (!new_uniscr) {
1219 kfree(newscreen);
1220 return -ENOMEM;
1221 }
1222 }
1223
1224 if (vc_is_sel(vc))
1225 clear_selection();
1226
1227 old_rows = vc->vc_rows;
1228 old_row_size = vc->vc_size_row;
1229
1230 err = resize_screen(vc, new_cols, new_rows, user);
1231 if (err) {
1232 kfree(newscreen);
1233 kfree(new_uniscr);
1234 return err;
1235 }
1236
1237 vc->vc_rows = new_rows;
1238 vc->vc_cols = new_cols;
1239 vc->vc_size_row = new_row_size;
1240 vc->vc_screenbuf_size = new_screen_size;
1241
1242 rlth = min(old_row_size, new_row_size);
1243 rrem = new_row_size - rlth;
1244 old_origin = vc->vc_origin;
1245 new_origin = (long) newscreen;
1246 new_scr_end = new_origin + new_screen_size;
1247
1248 if (vc->vc_y > new_rows) {
1249 if (old_rows - vc->vc_y < new_rows) {
1250 /*
1251 * Cursor near the bottom, copy contents from the
1252 * bottom of buffer
1253 */
1254 first_copied_row = (old_rows - new_rows);
1255 } else {
1256 /*
1257 * Cursor is in no man's land, copy 1/2 screenful
1258 * from the top and bottom of cursor position
1259 */
1260 first_copied_row = (vc->vc_y - new_rows/2);
1261 }
1262 old_origin += first_copied_row * old_row_size;
1263 } else
1264 first_copied_row = 0;
1265 end = old_origin + old_row_size * min(old_rows, new_rows);
1266
1267 vc_uniscr_copy_area(new_uniscr, new_cols, new_rows,
1268 get_vc_uniscr(vc), rlth/2, first_copied_row,
1269 min(old_rows, new_rows));
1270 vc_uniscr_set(vc, new_uniscr);
1271
1272 update_attr(vc);
1273
1274 while (old_origin < end) {
1275 scr_memcpyw((unsigned short *) new_origin,
1276 (unsigned short *) old_origin, rlth);
1277 if (rrem)
1278 scr_memsetw((void *)(new_origin + rlth),
1279 vc->vc_video_erase_char, rrem);
1280 old_origin += old_row_size;
1281 new_origin += new_row_size;
1282 }
1283 if (new_scr_end > new_origin)
1284 scr_memsetw((void *)new_origin, vc->vc_video_erase_char,
1285 new_scr_end - new_origin);
1286 kfree(vc->vc_screenbuf);
1287 vc->vc_screenbuf = newscreen;
1288 vc->vc_screenbuf_size = new_screen_size;
1289 set_origin(vc);
1290
1291 /* do part of a reset_terminal() */
1292 vc->vc_top = 0;
1293 vc->vc_bottom = vc->vc_rows;
1294 gotoxy(vc, vc->vc_x, vc->vc_y);
1295 save_cur(vc);
1296
1297 if (tty) {
1298 /* Rewrite the requested winsize data with the actual
1299 resulting sizes */
1300 struct winsize ws;
1301 memset(&ws, 0, sizeof(ws));
1302 ws.ws_row = vc->vc_rows;
1303 ws.ws_col = vc->vc_cols;
1304 ws.ws_ypixel = vc->vc_scan_lines;
1305 tty_do_resize(tty, &ws);
1306 }
1307
1308 if (con_is_visible(vc))
1309 update_screen(vc);
1310 vt_event_post(VT_EVENT_RESIZE, vc->vc_num, vc->vc_num);
1311 notify_update(vc);
1312 return err;
1313 }
1314
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[RFC PATCH linus] clk: sprd: lpll_gate can be static
by kbuild test robot
Fixes: 0e4b8a2349f3 ("clk: sprd: add clocks support for SC9863A")
Signed-off-by: kbuild test robot <lkp(a)intel.com>
---
sc9863a-clk.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/clk/sprd/sc9863a-clk.c b/drivers/clk/sprd/sc9863a-clk.c
index 2e2dfb2d48fff..446a44d8744ab 100644
--- a/drivers/clk/sprd/sc9863a-clk.c
+++ b/drivers/clk/sprd/sc9863a-clk.c
@@ -27,7 +27,7 @@ SPRD_PLL_SC_GATE_CLK_FW_NAME(mpll0_gate, "mpll0-gate", "ext-26m", 0x94,
0x1000, BIT(0), CLK_IGNORE_UNUSED, 0, 240);
SPRD_PLL_SC_GATE_CLK_FW_NAME(dpll0_gate, "dpll0-gate", "ext-26m", 0x98,
0x1000, BIT(0), 0, 0, 240);
-SPRD_PLL_SC_GATE_CLK_FW_NAME(lpll_gate, "lpll-gate", "ext-26m", 0x9c,
+static SPRD_PLL_SC_GATE_CLK_FW_NAME(lpll_gate, "lpll-gate", "ext-26m", 0x9c,
0x1000, BIT(0), 0, 0, 240);
SPRD_PLL_SC_GATE_CLK_FW_NAME(gpll_gate, "gpll-gate", "ext-26m", 0xa8,
0x1000, BIT(0), 0, 0, 240);
@@ -35,9 +35,9 @@ SPRD_PLL_SC_GATE_CLK_FW_NAME(dpll1_gate, "dpll1-gate", "ext-26m", 0x1dc,
0x1000, BIT(0), 0, 0, 240);
SPRD_PLL_SC_GATE_CLK_FW_NAME(mpll1_gate, "mpll1-gate", "ext-26m", 0x1e0,
0x1000, BIT(0), CLK_IGNORE_UNUSED, 0, 240);
-SPRD_PLL_SC_GATE_CLK_FW_NAME(mpll2_gate, "mpll2-gate", "ext-26m", 0x1e4,
+static SPRD_PLL_SC_GATE_CLK_FW_NAME(mpll2_gate, "mpll2-gate", "ext-26m", 0x1e4,
0x1000, BIT(0), CLK_IGNORE_UNUSED, 0, 240);
-SPRD_PLL_SC_GATE_CLK_FW_NAME(isppll_gate, "isppll-gate", "ext-26m", 0x1e8,
+static SPRD_PLL_SC_GATE_CLK_FW_NAME(isppll_gate, "isppll-gate", "ext-26m", 0x1e8,
0x1000, BIT(0), 0, 0, 240);
static struct sprd_clk_common *sc9863a_pmu_gate_clks[] = {
2 years, 4 months