All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Tony Lindgren <tony@atomide.com>, Ulf Hansson <ulf.hansson@linaro.org>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	Adrian Hunter <adrian.hunter@intel.com>,
	Chunyan Zhang <zhang.chunyan@linaro.org>,
	Faiz Abbas <faiz_abbas@ti.com>,
	Kishon Vijay Abraham I <kishon@ti.com>,
	Santosh Shilimkar <ssantosh@kernel.org>,
	linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org,
	Rob Herring <robh@kernel.org>,
	devicetree@vger.kernel.org
Subject: Re: [PATCH 2/6] mmc: sdhci-omap: Handle voltages to add support omap4
Date: Tue, 12 Oct 2021 22:16:08 +0800	[thread overview]
Message-ID: <202110122250.Oa6Mymbd-lkp@intel.com> (raw)
In-Reply-To: <20211012103750.38328-3-tony@atomide.com>

[-- Attachment #1: Type: text/plain, Size: 5591 bytes --]

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-sdhci-omap-to-deprecate-omap_hsmmc/20211012-183855
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/86b011af48d7f1cd6e2810dddcdf5d1b5ee819af
        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@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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 27114 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH 2/6] mmc: sdhci-omap: Handle voltages to add support omap4
Date: Tue, 12 Oct 2021 22:16:08 +0800	[thread overview]
Message-ID: <202110122250.Oa6Mymbd-lkp@intel.com> (raw)
In-Reply-To: <20211012103750.38328-3-tony@atomide.com>

[-- Attachment #1: Type: text/plain, Size: 5719 bytes --]

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-sdhci-omap-to-deprecate-omap_hsmmc/20211012-183855
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/86b011af48d7f1cd6e2810dddcdf5d1b5ee819af
        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@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(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 27114 bytes --]

  reply	other threads:[~2021-10-12 14:16 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-12 10:37 [PATCHv3 0/6] More SoCs for sdhci-omap to deprecate omap_hsmmc Tony Lindgren
2021-10-12 10:37 ` [PATCH 1/6] dt-bindings: sdhci-omap: Update binding for legacy SoCs Tony Lindgren
2021-10-12 10:37 ` [PATCH 2/6] mmc: sdhci-omap: Handle voltages to add support omap4 Tony Lindgren
2021-10-12 14:16   ` kernel test robot [this message]
2021-10-12 14:16     ` kernel test robot
2021-10-12 10:37 ` [PATCH 3/6] mmc: sdhci-omap: Add omap_offset to support omap3 and earlier Tony Lindgren
2021-10-12 10:37 ` [PATCH 4/6] mmc: sdhci-omap: Implement PM runtime functions Tony Lindgren
2021-10-12 15:11   ` kernel test robot
2021-10-12 15:11     ` kernel test robot
2021-10-12 15:16   ` Ulf Hansson
2021-10-15  9:34     ` Tony Lindgren
2021-10-12 10:37 ` [PATCH 5/6] sdhci: omap: Enable aggressive PM Tony Lindgren
2021-10-12 14:14   ` Ulf Hansson
2021-10-12 10:37 ` [PATCH 6/6] mmc: sdhci-omap: Configure optional wakeirq Tony Lindgren
2021-10-12 15:02   ` Ulf Hansson
2021-10-15 10:47 [PATCHv4 0/6] More SoCs for sdhci-omap to deprecate omap_hsmmc Tony Lindgren
2021-10-15 10:47 ` [PATCH 2/6] mmc: sdhci-omap: Handle voltages to add support omap4 Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202110122250.Oa6Mymbd-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=adrian.hunter@intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=faiz_abbas@ti.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kishon@ti.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=robh@kernel.org \
    --cc=ssantosh@kernel.org \
    --cc=tony@atomide.com \
    --cc=ulf.hansson@linaro.org \
    --cc=zhang.chunyan@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.