devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Yassine Oudjana <y.oudjana@protonmail.com>,
	Michael Auchter <michael.auchter@ni.com>
Cc: clang-built-linux@googlegroups.com, kbuild-all@lists.01.org,
	Yassine Oudjana <y.oudjana@protonmail.com>,
	MyungJoo Ham <myungjoo.ham@samsung.com>,
	Chanwoo Choi <cw00.choi@samsung.com>,
	Rob Herring <robh+dt@kernel.org>,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2 2/3] extcon: usbc-tusb320: Add support for TUSB320L
Date: Tue, 27 Jul 2021 22:16:27 +0800	[thread overview]
Message-ID: <202107272246.dkW5kM5b-lkp@intel.com> (raw)
In-Reply-To: <W4cbBtSKsvNY8PoUe5j75MtKCqkxYop7f0WBuSsjnM@cp4-web-038.plabs.ch>

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

Hi Yassine,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on chanwoo-extcon/extcon-next]
[also build test WARNING on v5.14-rc3 next-20210726]
[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/Yassine-Oudjana/extcon-usbc-tusb320-Initial-TUSB320L-support/20210727-175921
base:   https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon.git extcon-next
config: riscv-randconfig-r035-20210727 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project c658b472f3e61e1818e1909bf02f3d65470018a5)
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/db60f91ecc2dfa9cc22c6c6c5bfa89665b48cd2d
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Yassine-Oudjana/extcon-usbc-tusb320-Initial-TUSB320L-support/20210727-175921
        git checkout db60f91ecc2dfa9cc22c6c6c5bfa89665b48cd2d
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross 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/extcon/extcon-usbc-tusb320.c:244:15: warning: cast to smaller integer type 'enum tusb320_type' from 'const void *' [-Wvoid-pointer-to-enum-cast]
           priv->type = (enum tusb320_type)match_data;
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   1 warning generated.


vim +244 drivers/extcon/extcon-usbc-tusb320.c

   218	
   219	static int tusb320_extcon_probe(struct i2c_client *client,
   220					const struct i2c_device_id *id)
   221	{
   222		struct tusb320_priv *priv;
   223		const void *match_data;
   224		unsigned int revision;
   225		int ret;
   226	
   227		priv = devm_kzalloc(&client->dev, sizeof(*priv), GFP_KERNEL);
   228		if (!priv)
   229			return -ENOMEM;
   230		priv->dev = &client->dev;
   231	
   232		priv->regmap = devm_regmap_init_i2c(client, &tusb320_regmap_config);
   233		if (IS_ERR(priv->regmap))
   234			return PTR_ERR(priv->regmap);
   235	
   236		ret = tusb320_check_signature(priv);
   237		if (ret)
   238			return ret;
   239	
   240		match_data = device_get_match_data(&client->dev);
   241		if (!match_data)
   242			return -EINVAL;
   243	
 > 244		priv->type = (enum tusb320_type)match_data;
   245	
   246		priv->edev = devm_extcon_dev_allocate(priv->dev, tusb320_extcon_cable);
   247		if (IS_ERR(priv->edev)) {
   248			dev_err(priv->dev, "failed to allocate extcon device\n");
   249			return PTR_ERR(priv->edev);
   250		}
   251	
   252		if(priv->type == TYPE_TUSB320L) {
   253			ret = regmap_read(priv->regmap, TUSB320L_REGA0_REVISION, &revision);
   254	
   255			if(ret)
   256				dev_warn(priv->dev,
   257					"failed to read revision register: %d\n", ret);
   258			else
   259				dev_info(priv->dev, "chip revision %d\n", revision);
   260		}
   261	
   262		ret = devm_extcon_dev_register(priv->dev, priv->edev);
   263		if (ret < 0) {
   264			dev_err(priv->dev, "failed to register extcon device\n");
   265			return ret;
   266		}
   267	
   268		/* Reset chip to its default state */
   269		ret = tusb320_reset(priv);
   270		if(ret)
   271			dev_warn(priv->dev, "failed to reset chip: %d\n", ret);
   272	
   273		extcon_set_property_capability(priv->edev, EXTCON_USB,
   274					       EXTCON_PROP_USB_TYPEC_POLARITY);
   275		extcon_set_property_capability(priv->edev, EXTCON_USB_HOST,
   276					       EXTCON_PROP_USB_TYPEC_POLARITY);
   277	
   278		/* update initial state */
   279		tusb320_irq_handler(client->irq, priv);
   280	
   281		ret = devm_request_threaded_irq(priv->dev, client->irq, NULL,
   282						tusb320_irq_handler,
   283						IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
   284						client->name, priv);
   285	
   286		return ret;
   287	}
   288	

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

      reply	other threads:[~2021-07-27 14:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-27  9:56 [PATCH v2 2/3] extcon: usbc-tusb320: Add support for TUSB320L Yassine Oudjana
2021-07-27 14:16 ` 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=202107272246.dkW5kM5b-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=cw00.choi@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.auchter@ni.com \
    --cc=myungjoo.ham@samsung.com \
    --cc=robh+dt@kernel.org \
    --cc=y.oudjana@protonmail.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).