Hi Tony,
I love your patch! Perhaps something to improve:
[auto build test WARNING on next-20211011]
[also build test WARNING on v5.15-rc5]
[cannot apply to robh/for-next linus/master ulf-hansson-mmc-mirror/next v5.15-rc5
v5.15-rc4 v5.15-rc3]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url:
https://github.com/0day-ci/linux/commits/Tony-Lindgren/More-SoCs-for-sdhc...
base: d3134eb5de8546a214c028fb7195e764b89da7d4
config: riscv-randconfig-r042-20211012 (attached as .config)
compiler: clang version 14.0.0 (
https://github.com/llvm/llvm-project
c3dcf39554dbea780d6cb7e12239451ba47a2668)
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
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
#
https://github.com/0day-ci/linux/commit/86b011af48d7f1cd6e2810dddcdf5d1b5...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Tony-Lindgren/More-SoCs-for-sdhci-omap-to-deprecate-omap_hsmmc/20211012-183855
git checkout 86b011af48d7f1cd6e2810dddcdf5d1b5ee819af
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
> drivers/mmc/host/sdhci-omap.c:938:10: warning: implicit
conversion from 'unsigned long' to 'unsigned int' changes value from
18446744073709551615 to 4294967295 [-Wconstant-conversion]
return
~0UL;
~~~~~~ ^~~~
> drivers/mmc/host/sdhci-omap.c:965:29: warning: result of
comparison of constant 18446744073709551615 with expression of type 'unsigned int'
is always false [-Wtautological-constant-out-of-range-compare]
if (pbias
!= ~0UL && vqmmc == ~0UL)
~~~~~ ^ ~~~~
> drivers/mmc/host/sdhci-omap.c:965:12: warning: result of
comparison of constant 18446744073709551615 with expression of type 'unsigned int'
is always true [-Wtautological-constant-out-of-range-compare]
if (pbias
!= ~0UL && vqmmc == ~0UL)
~~~~~ ^ ~~~~
drivers/mmc/host/sdhci-omap.c:967:16: warning: result of comparison of constant
18446744073709551615 with expression of type 'unsigned int' is always false
[-Wtautological-constant-out-of-range-compare]
else if (caps == ~0UL)
~~~~ ^ ~~~~
drivers/mmc/host/sdhci-omap.c:974:12: warning: result of comparison of constant
18446744073709551615 with expression of type 'unsigned int' is always true
[-Wtautological-constant-out-of-range-compare]
if (pbias != ~0UL && (pbias & SDHCI_CAN_VDD_330) &&
~~~~~ ^ ~~~~
5 warnings generated.
vim +938 drivers/mmc/host/sdhci-omap.c
929
930 static unsigned int sdhci_omap_regulator_get_caps(struct device *dev,
931 const char *name)
932 {
933 struct regulator *reg;
934 unsigned int caps = 0;
935
936 reg = regulator_get(dev, name);
937 if (IS_ERR(reg))
938 return ~0UL;
939
940 if (regulator_is_supported_voltage(reg, 1700000, 1950000))
941 caps |= SDHCI_CAN_VDD_180;
942 if (regulator_is_supported_voltage(reg, 2700000, 3150000))
943 caps |= SDHCI_CAN_VDD_300;
944 if (regulator_is_supported_voltage(reg, 3150000, 3600000))
945 caps |= SDHCI_CAN_VDD_330;
946
947 regulator_put(reg);
948
949 return caps;
950 }
951
952 static int sdhci_omap_set_capabilities(struct sdhci_host *host)
953 {
954 struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
955 struct sdhci_omap_host *omap_host = sdhci_pltfm_priv(pltfm_host);
956 struct device *dev = omap_host->dev;
957 const u32 mask = SDHCI_CAN_VDD_180 | SDHCI_CAN_VDD_300 | SDHCI_CAN_VDD_330;
958 unsigned int pbias, vqmmc, caps = 0;
959 u32 reg;
960
961 pbias = sdhci_omap_regulator_get_caps(dev, "pbias");
962 vqmmc = sdhci_omap_regulator_get_caps(dev, "vqmmc");
963 caps = pbias & vqmmc;
964
965 if (pbias != ~0UL && vqmmc == ~0UL)
966 dev_warn(dev, "vqmmc regulator missing for pbias\n");
967 else if (caps == ~0UL)
968 return 0;
969
970 /*
971 * Quirk handling to allow 3.0V vqmmc with a valid 3.3V PBIAS. This is
972 * needed for 3.0V ldo9_reg on omap5 at least.
973 */
974 if (pbias != ~0UL && (pbias & SDHCI_CAN_VDD_330) &&
975 (vqmmc & SDHCI_CAN_VDD_300))
976 caps |= SDHCI_CAN_VDD_330;
977
978 /* voltage capabilities might be set by boot loader, clear it */
979 reg = sdhci_omap_readl(omap_host, SDHCI_OMAP_CAPA);
980 reg &= ~(CAPA_VS18 | CAPA_VS30 | CAPA_VS33);
981
982 if (caps & SDHCI_CAN_VDD_180)
983 reg |= CAPA_VS18;
984
985 if (caps & SDHCI_CAN_VDD_300)
986 reg |= CAPA_VS30;
987
988 if (caps & SDHCI_CAN_VDD_330)
989 reg |= CAPA_VS33;
990
991 sdhci_omap_writel(omap_host, SDHCI_OMAP_CAPA, reg);
992
993 host->caps &= ~mask;
994 host->caps |= caps;
995
996 return 0;
997 }
998
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org