linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: cy_huang <u0084500@gmail.com>,
	lgirdwood@gmail.com, broonie@kernel.org, robh+dt@kernel.org
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	cy_huang@richtek.com, devicetree@vger.kernel.org
Subject: Re: [PATCH v1 1/2] regulator: rtmv20: Adds support for Richtek RTMV20 load switch regulator
Date: Fri, 25 Sep 2020 14:18:45 +0800	[thread overview]
Message-ID: <202009251448.fAk4AWI5%lkp@intel.com> (raw)
In-Reply-To: <1600959891-16606-1-git-send-email-u0084500@gmail.com>

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

Hi cy_huang,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on v5.9-rc6]
[also build test WARNING on next-20200924]
[cannot apply to regulator/for-next]
[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/cy_huang/regulator-rtmv20-Adds-support-for-Richtek-RTMV20-load-switch-regulator/20200924-230631
base:    ba4f184e126b751d1bffad5897f263108befc780
config: m68k-randconfig-s031-20200925 (attached as .config)
compiler: m68k-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
        # apt-get install sparse
        # sparse version: v0.6.2-201-g24bdaac6-dirty
        # https://github.com/0day-ci/linux/commit/98eb1836ead59206f951ad8466fde2faca6472f4
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review cy_huang/regulator-rtmv20-Adds-support-for-Richtek-RTMV20-load-switch-regulator/20200924-230631
        git checkout 98eb1836ead59206f951ad8466fde2faca6472f4
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=m68k 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)

>> drivers/regulator/rtmv20-regulator.c:136:31: sparse: sparse: cast to restricted __be16
>> drivers/regulator/rtmv20-regulator.c:139:29: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [addressable] [assigned] [usertype] tmp @@     got restricted __be16 [usertype] @@
>> drivers/regulator/rtmv20-regulator.c:139:29: sparse:     expected unsigned short [addressable] [assigned] [usertype] tmp
>> drivers/regulator/rtmv20-regulator.c:139:29: sparse:     got restricted __be16 [usertype]

vim +136 drivers/regulator/rtmv20-regulator.c

    96	
    97	static int rtmv20_apply_properties(struct rtmv20_priv *priv)
    98	{
    99		const struct {
   100			int offset;
   101			int len;
   102			unsigned int reg;
   103			unsigned int mask;
   104		} props[] = {
   105			PROP_REG_DECL(ld_pulse_delay, RTMV20_REG_PULSEDELAY, RTMV20_DELAY_MASK),
   106			PROP_REG_DECL(ld_pulse_width, RTMV20_REG_PULSEWIDTH, RTMV20_WIDTH_MASK),
   107			PROP_REG_DECL(fsin1_delay, RTMV20_REG_FSIN1CTRL1, RTMV20_DELAY_MASK),
   108			PROP_REG_DECL(fsin1_width, RTMV20_REG_FSIN1CTRL3, RTMV20_WIDTH2_MASK),
   109			PROP_REG_DECL(fsin2_delay, RTMV20_REG_FSIN2CTRL1, RTMV20_DELAY_MASK),
   110			PROP_REG_DECL(fsin2_width, RTMV20_REG_FSIN2CTRL3, RTMV20_WIDTH2_MASK),
   111			PROP_REG_DECL(es_pulse_width, RTMV20_REG_ESPULSEWIDTH, RTMV20_WIDTH_MASK),
   112			PROP_REG_DECL(es_ld_current, RTMV20_REG_ESLDCTRL1, RTMV20_LDCURR_MASK),
   113			PROP_REG_DECL(lbp_level, RTMV20_REG_LBP, RTMV20_LBPLVL_MASK),
   114			PROP_REG_DECL(lbp_enable, RTMV20_REG_LBP, RTMV20_LBPEN_MASK),
   115			PROP_REG_DECL(strobe_polarity, RTMV20_REG_LDCTRL2, RTMV20_STROBEPOL_MASK),
   116			PROP_REG_DECL(vsync_polarity, RTMV20_REG_LDCTRL2, RTMV20_VSYNPOL_MASK),
   117			PROP_REG_DECL(fsin_enable, RTMV20_REG_ENCTRL, RTMV20_FSINEN_MASK),
   118			PROP_REG_DECL(fsin_output, RTMV20_REG_ENCTRL, RTMV20_FSINOUT_MASK),
   119			PROP_REG_DECL(es_enable, RTMV20_REG_ENCTRL, RTMV20_ESEN_MASK),
   120		};
   121		void *start = &priv->properties;
   122		int i;
   123	
   124		for (i = 0; i < ARRAY_SIZE(props); i++) {
   125			u16 tmp = 0;
   126			u16 *u16p = start + props[i].offset;
   127			u8 *u8p = start + props[i].offset;
   128			int shift = ffs(props[i].mask) - 1, ret;
   129	
   130			switch (props[i].len) {
   131			case RTMV20_2BYTE_ACCES:
   132				ret = regmap_raw_read(priv->regmap, props[i].reg, &tmp, props[i].len);
   133				if (ret)
   134					return ret;
   135	
 > 136				tmp = be16_to_cpu(tmp);
   137				tmp &= ~props[i].mask;
   138				tmp |= (*u16p << shift);
 > 139				tmp = cpu_to_be16(tmp);
   140	
   141				ret = regmap_raw_write(priv->regmap, props[i].reg, &tmp, props[i].len);
   142				break;
   143			case RTMV20_1BYTE_ACCES:
   144				ret = regmap_update_bits(priv->regmap, props[i].reg, props[i].mask,
   145							 *u8p << shift);
   146				break;
   147			default:
   148				return -EINVAL;
   149			}
   150	
   151			if (ret)
   152				return ret;
   153		}
   154	
   155		return 0;
   156	}
   157	

---
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: 20505 bytes --]

      parent reply	other threads:[~2020-09-25  6:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-24 15:04 [PATCH v1 1/2] regulator: rtmv20: Adds support for Richtek RTMV20 load switch regulator cy_huang
2020-09-24 15:04 ` [PATCH v1 2/2] regulator: rtmv20: Add DT-binding document for Richtek RTMV20 cy_huang
2020-09-24 16:23   ` Mark Brown
     [not found]     ` <CADiBU39ShyHNT=NiWz2Y81+wLMJjDqD6aZ0mgzVSxp_rzLZSFQ@mail.gmail.com>
2020-09-25 14:06       ` ChiYuan Huang
2020-09-24 16:11 ` [PATCH v1 1/2] regulator: rtmv20: Adds support for Richtek RTMV20 load switch regulator Mark Brown
     [not found]   ` <CADiBU3_b69g9vZf-J8p2_m5xDjn24XaUHn88foBsQ4MpBN829g@mail.gmail.com>
     [not found]     ` <20200925113224.GB4841@sirena.org.uk>
2020-09-25 14:05       ` ChiYuan Huang
2020-09-25  6:18 ` kernel test robot [this message]

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=202009251448.fAk4AWI5%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=broonie@kernel.org \
    --cc=cy_huang@richtek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=u0084500@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).