lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202107272246.dkW5kM5b-lkp@intel.com>
Date:   Tue, 27 Jul 2021 22:16:27 +0800
From:   kernel test robot <lkp@...el.com>
To:     Yassine Oudjana <y.oudjana@...tonmail.com>,
        Michael Auchter <michael.auchter@...com>
Cc:     clang-built-linux@...glegroups.com, kbuild-all@...ts.01.org,
        Yassine Oudjana <y.oudjana@...tonmail.com>,
        MyungJoo Ham <myungjoo.ham@...sung.com>,
        Chanwoo Choi <cw00.choi@...sung.com>,
        Rob Herring <robh+dt@...nel.org>, linux-kernel@...r.kernel.org,
        devicetree@...r.kernel.org
Subject: Re: [PATCH v2 2/3] extcon: usbc-tusb320: Add support for TUSB320L

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@...el.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

Download attachment ".config.gz" of type "application/gzip" (35607 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ