oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] extcon: usbc-tusb320: unregister typec port on driver removal
       [not found] <20230313130105.4183296-1-alvin@pqrs.dk>
@ 2023-03-13 16:04 ` kernel test robot
  2023-03-13 16:22   ` Alvin Šipraga
  2023-03-14  6:09 ` kernel test robot
  1 sibling, 1 reply; 3+ messages in thread
From: kernel test robot @ 2023-03-13 16:04 UTC (permalink / raw)
  To: Alvin Šipraga, MyungJoo Ham, Chanwoo Choi, Heikki Krogerus,
	Marek Vasut, Alvin Šipraga
  Cc: oe-kbuild-all, linux-usb, stable, linux-kernel

Hi Alvin,

I love your patch! Perhaps something to improve:

[auto build test WARNING on chanwoo-extcon/extcon-next]
[also build test WARNING on linus/master v6.3-rc2 next-20230310]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Alvin-ipraga/extcon-usbc-tusb320-unregister-typec-port-on-driver-removal/20230313-210245
base:   https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon.git extcon-next
patch link:    https://lore.kernel.org/r/20230313130105.4183296-1-alvin%40pqrs.dk
patch subject: [PATCH] extcon: usbc-tusb320: unregister typec port on driver removal
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20230313/202303132335.Qnq7apal-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/intel-lab-lkp/linux/commit/fe414069d19f6d59c7c34f820459f4114e2de136
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Alvin-ipraga/extcon-usbc-tusb320-unregister-typec-port-on-driver-removal/20230313-210245
        git checkout fe414069d19f6d59c7c34f820459f4114e2de136
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 olddefconfig
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303132335.Qnq7apal-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/extcon/extcon-usbc-tusb320.c: In function 'tusb320_typec_probe':
>> drivers/extcon/extcon-usbc-tusb320.c:429:13: warning: statement with no effect [-Wunused-value]
     429 |         priv->connector_fwnode;
         |         ~~~~^~~~~~~~~~~~~~~~~~


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

   379	
   380	static int tusb320_typec_probe(struct i2c_client *client,
   381				       struct tusb320_priv *priv)
   382	{
   383		struct fwnode_handle *connector;
   384		const char *cap_str;
   385		int ret;
   386	
   387		/* The Type-C connector is optional, for backward compatibility. */
   388		connector = device_get_named_child_node(&client->dev, "connector");
   389		if (!connector)
   390			return 0;
   391	
   392		/* Type-C connector found. */
   393		ret = typec_get_fw_cap(&priv->cap, connector);
   394		if (ret)
   395			goto err_put;
   396	
   397		priv->port_type = priv->cap.type;
   398	
   399		/* This goes into register 0x8 field CURRENT_MODE_ADVERTISE */
   400		ret = fwnode_property_read_string(connector, "typec-power-opmode", &cap_str);
   401		if (ret)
   402			goto err_put;
   403	
   404		ret = typec_find_pwr_opmode(cap_str);
   405		if (ret < 0)
   406			goto err_put;
   407	
   408		priv->pwr_opmode = ret;
   409	
   410		/* Initialize the hardware with the devicetree settings. */
   411		ret = tusb320_set_adv_pwr_mode(priv);
   412		if (ret)
   413			goto err_put;
   414	
   415		priv->cap.revision		= USB_TYPEC_REV_1_1;
   416		priv->cap.accessory[0]		= TYPEC_ACCESSORY_AUDIO;
   417		priv->cap.accessory[1]		= TYPEC_ACCESSORY_DEBUG;
   418		priv->cap.orientation_aware	= true;
   419		priv->cap.driver_data		= priv;
   420		priv->cap.ops			= &tusb320_typec_ops;
   421		priv->cap.fwnode		= connector;
   422	
   423		priv->port = typec_register_port(&client->dev, &priv->cap);
   424		if (IS_ERR(priv->port)) {
   425			ret = PTR_ERR(priv->port);
   426			goto err_put;
   427		}
   428	
 > 429		priv->connector_fwnode;
   430	
   431		return 0;
   432	
   433	err_put:
   434		fwnode_handle_put(connector);
   435	
   436		return ret;
   437	}
   438	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] extcon: usbc-tusb320: unregister typec port on driver removal
  2023-03-13 16:04 ` [PATCH] extcon: usbc-tusb320: unregister typec port on driver removal kernel test robot
@ 2023-03-13 16:22   ` Alvin Šipraga
  0 siblings, 0 replies; 3+ messages in thread
From: Alvin Šipraga @ 2023-03-13 16:22 UTC (permalink / raw)
  To: kernel test robot
  Cc: Alvin Šipraga, MyungJoo Ham, Chanwoo Choi, Heikki Krogerus,
	Marek Vasut, oe-kbuild-all, linux-usb, stable, linux-kernel

On Tue, Mar 14, 2023 at 12:04:34AM +0800, kernel test robot wrote:
> Hi Alvin,
> 
> I love your patch! Perhaps something to improve:
> 
> [auto build test WARNING on chanwoo-extcon/extcon-next]
> [also build test WARNING on linus/master v6.3-rc2 next-20230310]
> [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#_base_tree_information]
> 
> url:    https://github.com/intel-lab-lkp/linux/commits/Alvin-ipraga/extcon-usbc-tusb320-unregister-typec-port-on-driver-removal/20230313-210245
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon.git extcon-next
> patch link:    https://lore.kernel.org/r/20230313130105.4183296-1-alvin%40pqrs.dk
> patch subject: [PATCH] extcon: usbc-tusb320: unregister typec port on driver removal
> config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20230313/202303132335.Qnq7apal-lkp@intel.com/config)
> compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
> reproduce (this is a W=1 build):
>         # https://github.com/intel-lab-lkp/linux/commit/fe414069d19f6d59c7c34f820459f4114e2de136
>         git remote add linux-review https://github.com/intel-lab-lkp/linux
>         git fetch --no-tags linux-review Alvin-ipraga/extcon-usbc-tusb320-unregister-typec-port-on-driver-removal/20230313-210245
>         git checkout fe414069d19f6d59c7c34f820459f4114e2de136
>         # save the config file
>         mkdir build_dir && cp config build_dir/.config
>         make W=1 O=build_dir ARCH=x86_64 olddefconfig
>         make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/
> 
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@intel.com>
> | Link: https://lore.kernel.org/oe-kbuild-all/202303132335.Qnq7apal-lkp@intel.com/
> 
> All warnings (new ones prefixed by >>):
> 
>    drivers/extcon/extcon-usbc-tusb320.c: In function 'tusb320_typec_probe':
> >> drivers/extcon/extcon-usbc-tusb320.c:429:13: warning: statement with no effect [-Wunused-value]
>      429 |         priv->connector_fwnode;
>          |         ~~~~^~~~~~~~~~~~~~~~~~

Oops, I was on an old test branch when sending this patch... Thank you
kernel test robot. I will send v2 tomorrow to allow for some other
comments first. The only difference in v2 is that this line is corrected
to:

        priv->connector_fwnode = connector;

Kind regards,
Alvin

> 
> 
> vim +429 drivers/extcon/extcon-usbc-tusb320.c
> 
>    379	
>    380	static int tusb320_typec_probe(struct i2c_client *client,
>    381				       struct tusb320_priv *priv)
>    382	{
>    383		struct fwnode_handle *connector;
>    384		const char *cap_str;
>    385		int ret;
>    386	
>    387		/* The Type-C connector is optional, for backward compatibility. */
>    388		connector = device_get_named_child_node(&client->dev, "connector");
>    389		if (!connector)
>    390			return 0;
>    391	
>    392		/* Type-C connector found. */
>    393		ret = typec_get_fw_cap(&priv->cap, connector);
>    394		if (ret)
>    395			goto err_put;
>    396	
>    397		priv->port_type = priv->cap.type;
>    398	
>    399		/* This goes into register 0x8 field CURRENT_MODE_ADVERTISE */
>    400		ret = fwnode_property_read_string(connector, "typec-power-opmode", &cap_str);
>    401		if (ret)
>    402			goto err_put;
>    403	
>    404		ret = typec_find_pwr_opmode(cap_str);
>    405		if (ret < 0)
>    406			goto err_put;
>    407	
>    408		priv->pwr_opmode = ret;
>    409	
>    410		/* Initialize the hardware with the devicetree settings. */
>    411		ret = tusb320_set_adv_pwr_mode(priv);
>    412		if (ret)
>    413			goto err_put;
>    414	
>    415		priv->cap.revision		= USB_TYPEC_REV_1_1;
>    416		priv->cap.accessory[0]		= TYPEC_ACCESSORY_AUDIO;
>    417		priv->cap.accessory[1]		= TYPEC_ACCESSORY_DEBUG;
>    418		priv->cap.orientation_aware	= true;
>    419		priv->cap.driver_data		= priv;
>    420		priv->cap.ops			= &tusb320_typec_ops;
>    421		priv->cap.fwnode		= connector;
>    422	
>    423		priv->port = typec_register_port(&client->dev, &priv->cap);
>    424		if (IS_ERR(priv->port)) {
>    425			ret = PTR_ERR(priv->port);
>    426			goto err_put;
>    427		}
>    428	
>  > 429		priv->connector_fwnode;
>    430	
>    431		return 0;
>    432	
>    433	err_put:
>    434		fwnode_handle_put(connector);
>    435	
>    436		return ret;
>    437	}
>    438	
> 
> -- 
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] extcon: usbc-tusb320: unregister typec port on driver removal
       [not found] <20230313130105.4183296-1-alvin@pqrs.dk>
  2023-03-13 16:04 ` [PATCH] extcon: usbc-tusb320: unregister typec port on driver removal kernel test robot
@ 2023-03-14  6:09 ` kernel test robot
  1 sibling, 0 replies; 3+ messages in thread
From: kernel test robot @ 2023-03-14  6:09 UTC (permalink / raw)
  To: Alvin Šipraga, MyungJoo Ham, Chanwoo Choi, Heikki Krogerus,
	Marek Vasut, Alvin Šipraga
  Cc: llvm, oe-kbuild-all, linux-usb, stable, linux-kernel

Hi Alvin,

I love your patch! Perhaps something to improve:

[auto build test WARNING on chanwoo-extcon/extcon-next]
[also build test WARNING on linus/master v6.3-rc2 next-20230310]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Alvin-ipraga/extcon-usbc-tusb320-unregister-typec-port-on-driver-removal/20230313-210245
base:   https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon.git extcon-next
patch link:    https://lore.kernel.org/r/20230313130105.4183296-1-alvin%40pqrs.dk
patch subject: [PATCH] extcon: usbc-tusb320: unregister typec port on driver removal
config: i386-randconfig-a013-20230313 (https://download.01.org/0day-ci/archive/20230314/202303141316.EltVGG8V-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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
        # https://github.com/intel-lab-lkp/linux/commit/fe414069d19f6d59c7c34f820459f4114e2de136
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Alvin-ipraga/extcon-usbc-tusb320-unregister-typec-port-on-driver-removal/20230313-210245
        git checkout fe414069d19f6d59c7c34f820459f4114e2de136
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/extcon/ drivers/media/common/videobuf2/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303141316.EltVGG8V-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/extcon/extcon-usbc-tusb320.c:429:8: warning: expression result unused [-Wunused-value]
           priv->connector_fwnode;
           ~~~~  ^~~~~~~~~~~~~~~~
   1 warning generated.


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

   379	
   380	static int tusb320_typec_probe(struct i2c_client *client,
   381				       struct tusb320_priv *priv)
   382	{
   383		struct fwnode_handle *connector;
   384		const char *cap_str;
   385		int ret;
   386	
   387		/* The Type-C connector is optional, for backward compatibility. */
   388		connector = device_get_named_child_node(&client->dev, "connector");
   389		if (!connector)
   390			return 0;
   391	
   392		/* Type-C connector found. */
   393		ret = typec_get_fw_cap(&priv->cap, connector);
   394		if (ret)
   395			goto err_put;
   396	
   397		priv->port_type = priv->cap.type;
   398	
   399		/* This goes into register 0x8 field CURRENT_MODE_ADVERTISE */
   400		ret = fwnode_property_read_string(connector, "typec-power-opmode", &cap_str);
   401		if (ret)
   402			goto err_put;
   403	
   404		ret = typec_find_pwr_opmode(cap_str);
   405		if (ret < 0)
   406			goto err_put;
   407	
   408		priv->pwr_opmode = ret;
   409	
   410		/* Initialize the hardware with the devicetree settings. */
   411		ret = tusb320_set_adv_pwr_mode(priv);
   412		if (ret)
   413			goto err_put;
   414	
   415		priv->cap.revision		= USB_TYPEC_REV_1_1;
   416		priv->cap.accessory[0]		= TYPEC_ACCESSORY_AUDIO;
   417		priv->cap.accessory[1]		= TYPEC_ACCESSORY_DEBUG;
   418		priv->cap.orientation_aware	= true;
   419		priv->cap.driver_data		= priv;
   420		priv->cap.ops			= &tusb320_typec_ops;
   421		priv->cap.fwnode		= connector;
   422	
   423		priv->port = typec_register_port(&client->dev, &priv->cap);
   424		if (IS_ERR(priv->port)) {
   425			ret = PTR_ERR(priv->port);
   426			goto err_put;
   427		}
   428	
 > 429		priv->connector_fwnode;
   430	
   431		return 0;
   432	
   433	err_put:
   434		fwnode_handle_put(connector);
   435	
   436		return ret;
   437	}
   438	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-14  6:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20230313130105.4183296-1-alvin@pqrs.dk>
2023-03-13 16:04 ` [PATCH] extcon: usbc-tusb320: unregister typec port on driver removal kernel test robot
2023-03-13 16:22   ` Alvin Šipraga
2023-03-14  6:09 ` kernel test robot

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).