Re: [PATCH v9 04/12] mmc: sdhci-msm: convert to use custom crypto profile

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

 



Hi Eric,

kernel test robot noticed the following build warnings:

[auto build test WARNING on f486c8aa16b8172f63bddc70116a0c897a7f3f02]

url:    https://github.com/intel-lab-lkp/linux/commits/Eric-Biggers/ufs-crypto-add-ufs_hba_from_crypto_profile/20241209-130301
base:   f486c8aa16b8172f63bddc70116a0c897a7f3f02
patch link:    https://lore.kernel.org/r/20241209045530.507833-5-ebiggers%40kernel.org
patch subject: [PATCH v9 04/12] mmc: sdhci-msm: convert to use custom crypto profile
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20241209/202412092047.I2fWyclK-lkp@xxxxxxxxx/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241209/202412092047.I2fWyclK-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412092047.I2fWyclK-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   In file included from drivers/mmc/host/cqhci-crypto.c:8:
   In file included from include/linux/blk-crypto.h:72:
   In file included from include/linux/blk_types.h:10:
   In file included from include/linux/bvec.h:10:
   In file included from include/linux/highmem.h:10:
   In file included from include/linux/mm.h:2223:
   include/linux/vmstat.h:504:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     504 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     505 |                            item];
         |                            ~~~~
   include/linux/vmstat.h:511:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     511 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     512 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     518 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   include/linux/vmstat.h:524:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     524 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     525 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
>> drivers/mmc/host/cqhci-crypto.c:176:6: warning: variable 'num_keyslots' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
     176 |         if (cq_host->ops->uses_custom_crypto_profile)
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/mmc/host/cqhci-crypto.c:230:24: note: uninitialized use occurs here
     230 |         for (slot = 0; slot < num_keyslots; slot++)
         |                               ^~~~~~~~~~~~
   drivers/mmc/host/cqhci-crypto.c:176:2: note: remove the 'if' if its condition is always false
     176 |         if (cq_host->ops->uses_custom_crypto_profile)
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     177 |                 goto profile_initialized;
         |                 ~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/mmc/host/cqhci-crypto.c:166:27: note: initialize the variable 'num_keyslots' to silence this warning
     166 |         unsigned int num_keyslots;
         |                                  ^
         |                                   = 0
   5 warnings generated.


vim +176 drivers/mmc/host/cqhci-crypto.c

   147	
   148	/**
   149	 * cqhci_crypto_init - initialize CQHCI crypto support
   150	 * @cq_host: a cqhci host
   151	 *
   152	 * If the driver previously set MMC_CAP2_CRYPTO and the CQE declares
   153	 * CQHCI_CAP_CS, initialize the crypto support.  This involves reading the
   154	 * crypto capability registers, initializing the blk_crypto_profile, clearing
   155	 * all keyslots, and enabling 128-bit task descriptors.
   156	 *
   157	 * Return: 0 if crypto was initialized or isn't supported; whether
   158	 *	   MMC_CAP2_CRYPTO remains set indicates which one of those cases it is.
   159	 *	   Also can return a negative errno value on unexpected error.
   160	 */
   161	int cqhci_crypto_init(struct cqhci_host *cq_host)
   162	{
   163		struct mmc_host *mmc = cq_host->mmc;
   164		struct device *dev = mmc_dev(mmc);
   165		struct blk_crypto_profile *profile = &mmc->crypto_profile;
   166		unsigned int num_keyslots;
   167		unsigned int cap_idx;
   168		enum blk_crypto_mode_num blk_mode_num;
   169		unsigned int slot;
   170		int err = 0;
   171	
   172		if (!(mmc->caps2 & MMC_CAP2_CRYPTO) ||
   173		    !(cqhci_readl(cq_host, CQHCI_CAP) & CQHCI_CAP_CS))
   174			goto out;
   175	
 > 176		if (cq_host->ops->uses_custom_crypto_profile)

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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux