All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Kyle Tso <kyletso@google.com>
Cc: kbuild-all@lists.01.org, linux-usb@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>
Subject: [usb:usb-testing 155/155] drivers/platform/chrome/cros_ec_typec.c:778:8: error: 'CABLE_ATYPE' undeclared; did you mean
Date: Wed, 3 Feb 2021 23:19:06 +0800	[thread overview]
Message-ID: <202102032303.xnvdBAo2-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
head:   0e1d6f55a12e47942ce207dfb93e23049b454c9e
commit: 0e1d6f55a12e47942ce207dfb93e23049b454c9e [155/155] usb: pd: Update VDO definitions
config: arm-randconfig-r005-20210202 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
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://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/commit/?id=0e1d6f55a12e47942ce207dfb93e23049b454c9e
        git remote add usb https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
        git fetch --no-tags usb usb-testing
        git checkout 0e1d6f55a12e47942ce207dfb93e23049b454c9e
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm 

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

All errors (new ones prefixed by >>):

   drivers/platform/chrome/cros_ec_typec.c: In function 'cros_typec_handle_sop_prime_disc':
>> drivers/platform/chrome/cros_ec_typec.c:778:8: error: 'CABLE_ATYPE' undeclared (first use in this function); did you mean 'CABLE_CTYPE'?
     778 |   case CABLE_ATYPE:
         |        ^~~~~~~~~~~
         |        CABLE_CTYPE
   drivers/platform/chrome/cros_ec_typec.c:778:8: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/platform/chrome/cros_ec_typec.c:781:8: error: 'CABLE_BTYPE' undeclared (first use in this function); did you mean 'CABLE_CTYPE'?
     781 |   case CABLE_BTYPE:
         |        ^~~~~~~~~~~
         |        CABLE_CTYPE


vim +778 drivers/platform/chrome/cros_ec_typec.c

8fab2755191f86 Prashant Malani 2020-11-16  750  
3b3dd1f0dbfe92 Benson Leung    2021-01-28  751  static int cros_typec_handle_sop_prime_disc(struct cros_typec_data *typec, int port_num, u16 pd_revision)
8b46a212ad11f2 Prashant Malani 2020-11-16  752  {
8b46a212ad11f2 Prashant Malani 2020-11-16  753  	struct cros_typec_port *port = typec->ports[port_num];
8b46a212ad11f2 Prashant Malani 2020-11-16  754  	struct ec_response_typec_discovery *disc = port->disc_data;
f4edab68e10119 Prashant Malani 2020-11-16  755  	struct typec_cable_desc c_desc = {};
f4edab68e10119 Prashant Malani 2020-11-16  756  	struct typec_plug_desc p_desc;
8b46a212ad11f2 Prashant Malani 2020-11-16  757  	struct ec_params_typec_discovery req = {
8b46a212ad11f2 Prashant Malani 2020-11-16  758  		.port = port_num,
8b46a212ad11f2 Prashant Malani 2020-11-16  759  		.partner_type = TYPEC_PARTNER_SOP_PRIME,
8b46a212ad11f2 Prashant Malani 2020-11-16  760  	};
72d6e32bd85bd1 Prashant Malani 2020-11-16  761  	u32 cable_plug_type;
8b46a212ad11f2 Prashant Malani 2020-11-16  762  	int ret = 0;
8b46a212ad11f2 Prashant Malani 2020-11-16  763  
8b46a212ad11f2 Prashant Malani 2020-11-16  764  	memset(disc, 0, EC_PROTO2_MAX_RESPONSE_SIZE);
8b46a212ad11f2 Prashant Malani 2020-11-16  765  	ret = cros_typec_ec_command(typec, 0, EC_CMD_TYPEC_DISCOVERY, &req, sizeof(req),
8b46a212ad11f2 Prashant Malani 2020-11-16  766  				    disc, EC_PROTO2_MAX_RESPONSE_SIZE);
8b46a212ad11f2 Prashant Malani 2020-11-16  767  	if (ret < 0) {
8b46a212ad11f2 Prashant Malani 2020-11-16  768  		dev_err(typec->dev, "Failed to get SOP' discovery data for port: %d\n", port_num);
8b46a212ad11f2 Prashant Malani 2020-11-16  769  		goto sop_prime_disc_exit;
8b46a212ad11f2 Prashant Malani 2020-11-16  770  	}
8b46a212ad11f2 Prashant Malani 2020-11-16  771  
8b46a212ad11f2 Prashant Malani 2020-11-16  772  	/* Parse the PD identity data, even if only 0s were returned. */
8b46a212ad11f2 Prashant Malani 2020-11-16  773  	cros_typec_parse_pd_identity(&port->c_identity, disc);
8b46a212ad11f2 Prashant Malani 2020-11-16  774  
72d6e32bd85bd1 Prashant Malani 2020-11-16  775  	if (disc->identity_count != 0) {
72d6e32bd85bd1 Prashant Malani 2020-11-16  776  		cable_plug_type = VDO_TYPEC_CABLE_TYPE(port->c_identity.vdo[0]);
72d6e32bd85bd1 Prashant Malani 2020-11-16  777  		switch (cable_plug_type) {
72d6e32bd85bd1 Prashant Malani 2020-11-16 @778  		case CABLE_ATYPE:
f4edab68e10119 Prashant Malani 2020-11-16  779  			c_desc.type = USB_PLUG_TYPE_A;
72d6e32bd85bd1 Prashant Malani 2020-11-16  780  			break;
72d6e32bd85bd1 Prashant Malani 2020-11-16 @781  		case CABLE_BTYPE:
f4edab68e10119 Prashant Malani 2020-11-16  782  			c_desc.type = USB_PLUG_TYPE_B;
72d6e32bd85bd1 Prashant Malani 2020-11-16  783  			break;
72d6e32bd85bd1 Prashant Malani 2020-11-16  784  		case CABLE_CTYPE:
f4edab68e10119 Prashant Malani 2020-11-16  785  			c_desc.type = USB_PLUG_TYPE_C;
72d6e32bd85bd1 Prashant Malani 2020-11-16  786  			break;
72d6e32bd85bd1 Prashant Malani 2020-11-16  787  		case CABLE_CAPTIVE:
f4edab68e10119 Prashant Malani 2020-11-16  788  			c_desc.type = USB_PLUG_CAPTIVE;
72d6e32bd85bd1 Prashant Malani 2020-11-16  789  			break;
72d6e32bd85bd1 Prashant Malani 2020-11-16  790  		default:
f4edab68e10119 Prashant Malani 2020-11-16  791  			c_desc.type = USB_PLUG_NONE;
72d6e32bd85bd1 Prashant Malani 2020-11-16  792  		}
f4edab68e10119 Prashant Malani 2020-11-16  793  		c_desc.active = PD_IDH_PTYPE(port->c_identity.id_header) == IDH_PTYPE_ACABLE;
72d6e32bd85bd1 Prashant Malani 2020-11-16  794  	}
8b46a212ad11f2 Prashant Malani 2020-11-16  795  
f4edab68e10119 Prashant Malani 2020-11-16  796  	c_desc.identity = &port->c_identity;
3b3dd1f0dbfe92 Benson Leung    2021-01-28  797  	c_desc.pd_revision = pd_revision;
8b46a212ad11f2 Prashant Malani 2020-11-16  798  
f4edab68e10119 Prashant Malani 2020-11-16  799  	port->cable = typec_register_cable(port->port, &c_desc);
8b46a212ad11f2 Prashant Malani 2020-11-16  800  	if (IS_ERR(port->cable)) {
8b46a212ad11f2 Prashant Malani 2020-11-16  801  		ret = PTR_ERR(port->cable);
8b46a212ad11f2 Prashant Malani 2020-11-16  802  		port->cable = NULL;
f4edab68e10119 Prashant Malani 2020-11-16  803  		goto sop_prime_disc_exit;
f4edab68e10119 Prashant Malani 2020-11-16  804  	}
f4edab68e10119 Prashant Malani 2020-11-16  805  
f4edab68e10119 Prashant Malani 2020-11-16  806  	p_desc.index = TYPEC_PLUG_SOP_P;
f4edab68e10119 Prashant Malani 2020-11-16  807  	port->plug = typec_register_plug(port->cable, &p_desc);
f4edab68e10119 Prashant Malani 2020-11-16  808  	if (IS_ERR(port->plug)) {
f4edab68e10119 Prashant Malani 2020-11-16  809  		ret = PTR_ERR(port->plug);
f4edab68e10119 Prashant Malani 2020-11-16  810  		port->plug = NULL;
f4edab68e10119 Prashant Malani 2020-11-16  811  		goto sop_prime_disc_exit;
8b46a212ad11f2 Prashant Malani 2020-11-16  812  	}
8b46a212ad11f2 Prashant Malani 2020-11-16  813  
1563090965421f Prashant Malani 2020-11-16  814  	ret = cros_typec_register_altmodes(typec, port_num, false);
1563090965421f Prashant Malani 2020-11-16  815  	if (ret < 0) {
1563090965421f Prashant Malani 2020-11-16  816  		dev_err(typec->dev, "Failed to register plug altmodes, port: %d\n", port_num);
1563090965421f Prashant Malani 2020-11-16  817  		goto sop_prime_disc_exit;
1563090965421f Prashant Malani 2020-11-16  818  	}
1563090965421f Prashant Malani 2020-11-16  819  
f4edab68e10119 Prashant Malani 2020-11-16  820  	return 0;
f4edab68e10119 Prashant Malani 2020-11-16  821  
8b46a212ad11f2 Prashant Malani 2020-11-16  822  sop_prime_disc_exit:
f4edab68e10119 Prashant Malani 2020-11-16  823  	cros_typec_remove_cable(typec, port_num);
8b46a212ad11f2 Prashant Malani 2020-11-16  824  	return ret;
8b46a212ad11f2 Prashant Malani 2020-11-16  825  }
8b46a212ad11f2 Prashant Malani 2020-11-16  826  

:::::: The code at line 778 was first introduced by commit
:::::: 72d6e32bd85bd1e5cb5aa467f4eb5d0a69559953 platform/chrome: cros_ec_typec: Store cable plug type

:::::: TO: Prashant Malani <pmalani@chromium.org>
:::::: CC: Benson Leung <bleung@chromium.org>

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

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [usb:usb-testing 155/155] drivers/platform/chrome/cros_ec_typec.c:778:8: error: 'CABLE_ATYPE' undeclared; did you mean
Date: Wed, 03 Feb 2021 23:19:06 +0800	[thread overview]
Message-ID: <202102032303.xnvdBAo2-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
head:   0e1d6f55a12e47942ce207dfb93e23049b454c9e
commit: 0e1d6f55a12e47942ce207dfb93e23049b454c9e [155/155] usb: pd: Update VDO definitions
config: arm-randconfig-r005-20210202 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
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://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/commit/?id=0e1d6f55a12e47942ce207dfb93e23049b454c9e
        git remote add usb https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
        git fetch --no-tags usb usb-testing
        git checkout 0e1d6f55a12e47942ce207dfb93e23049b454c9e
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm 

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

All errors (new ones prefixed by >>):

   drivers/platform/chrome/cros_ec_typec.c: In function 'cros_typec_handle_sop_prime_disc':
>> drivers/platform/chrome/cros_ec_typec.c:778:8: error: 'CABLE_ATYPE' undeclared (first use in this function); did you mean 'CABLE_CTYPE'?
     778 |   case CABLE_ATYPE:
         |        ^~~~~~~~~~~
         |        CABLE_CTYPE
   drivers/platform/chrome/cros_ec_typec.c:778:8: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/platform/chrome/cros_ec_typec.c:781:8: error: 'CABLE_BTYPE' undeclared (first use in this function); did you mean 'CABLE_CTYPE'?
     781 |   case CABLE_BTYPE:
         |        ^~~~~~~~~~~
         |        CABLE_CTYPE


vim +778 drivers/platform/chrome/cros_ec_typec.c

8fab2755191f86 Prashant Malani 2020-11-16  750  
3b3dd1f0dbfe92 Benson Leung    2021-01-28  751  static int cros_typec_handle_sop_prime_disc(struct cros_typec_data *typec, int port_num, u16 pd_revision)
8b46a212ad11f2 Prashant Malani 2020-11-16  752  {
8b46a212ad11f2 Prashant Malani 2020-11-16  753  	struct cros_typec_port *port = typec->ports[port_num];
8b46a212ad11f2 Prashant Malani 2020-11-16  754  	struct ec_response_typec_discovery *disc = port->disc_data;
f4edab68e10119 Prashant Malani 2020-11-16  755  	struct typec_cable_desc c_desc = {};
f4edab68e10119 Prashant Malani 2020-11-16  756  	struct typec_plug_desc p_desc;
8b46a212ad11f2 Prashant Malani 2020-11-16  757  	struct ec_params_typec_discovery req = {
8b46a212ad11f2 Prashant Malani 2020-11-16  758  		.port = port_num,
8b46a212ad11f2 Prashant Malani 2020-11-16  759  		.partner_type = TYPEC_PARTNER_SOP_PRIME,
8b46a212ad11f2 Prashant Malani 2020-11-16  760  	};
72d6e32bd85bd1 Prashant Malani 2020-11-16  761  	u32 cable_plug_type;
8b46a212ad11f2 Prashant Malani 2020-11-16  762  	int ret = 0;
8b46a212ad11f2 Prashant Malani 2020-11-16  763  
8b46a212ad11f2 Prashant Malani 2020-11-16  764  	memset(disc, 0, EC_PROTO2_MAX_RESPONSE_SIZE);
8b46a212ad11f2 Prashant Malani 2020-11-16  765  	ret = cros_typec_ec_command(typec, 0, EC_CMD_TYPEC_DISCOVERY, &req, sizeof(req),
8b46a212ad11f2 Prashant Malani 2020-11-16  766  				    disc, EC_PROTO2_MAX_RESPONSE_SIZE);
8b46a212ad11f2 Prashant Malani 2020-11-16  767  	if (ret < 0) {
8b46a212ad11f2 Prashant Malani 2020-11-16  768  		dev_err(typec->dev, "Failed to get SOP' discovery data for port: %d\n", port_num);
8b46a212ad11f2 Prashant Malani 2020-11-16  769  		goto sop_prime_disc_exit;
8b46a212ad11f2 Prashant Malani 2020-11-16  770  	}
8b46a212ad11f2 Prashant Malani 2020-11-16  771  
8b46a212ad11f2 Prashant Malani 2020-11-16  772  	/* Parse the PD identity data, even if only 0s were returned. */
8b46a212ad11f2 Prashant Malani 2020-11-16  773  	cros_typec_parse_pd_identity(&port->c_identity, disc);
8b46a212ad11f2 Prashant Malani 2020-11-16  774  
72d6e32bd85bd1 Prashant Malani 2020-11-16  775  	if (disc->identity_count != 0) {
72d6e32bd85bd1 Prashant Malani 2020-11-16  776  		cable_plug_type = VDO_TYPEC_CABLE_TYPE(port->c_identity.vdo[0]);
72d6e32bd85bd1 Prashant Malani 2020-11-16  777  		switch (cable_plug_type) {
72d6e32bd85bd1 Prashant Malani 2020-11-16 @778  		case CABLE_ATYPE:
f4edab68e10119 Prashant Malani 2020-11-16  779  			c_desc.type = USB_PLUG_TYPE_A;
72d6e32bd85bd1 Prashant Malani 2020-11-16  780  			break;
72d6e32bd85bd1 Prashant Malani 2020-11-16 @781  		case CABLE_BTYPE:
f4edab68e10119 Prashant Malani 2020-11-16  782  			c_desc.type = USB_PLUG_TYPE_B;
72d6e32bd85bd1 Prashant Malani 2020-11-16  783  			break;
72d6e32bd85bd1 Prashant Malani 2020-11-16  784  		case CABLE_CTYPE:
f4edab68e10119 Prashant Malani 2020-11-16  785  			c_desc.type = USB_PLUG_TYPE_C;
72d6e32bd85bd1 Prashant Malani 2020-11-16  786  			break;
72d6e32bd85bd1 Prashant Malani 2020-11-16  787  		case CABLE_CAPTIVE:
f4edab68e10119 Prashant Malani 2020-11-16  788  			c_desc.type = USB_PLUG_CAPTIVE;
72d6e32bd85bd1 Prashant Malani 2020-11-16  789  			break;
72d6e32bd85bd1 Prashant Malani 2020-11-16  790  		default:
f4edab68e10119 Prashant Malani 2020-11-16  791  			c_desc.type = USB_PLUG_NONE;
72d6e32bd85bd1 Prashant Malani 2020-11-16  792  		}
f4edab68e10119 Prashant Malani 2020-11-16  793  		c_desc.active = PD_IDH_PTYPE(port->c_identity.id_header) == IDH_PTYPE_ACABLE;
72d6e32bd85bd1 Prashant Malani 2020-11-16  794  	}
8b46a212ad11f2 Prashant Malani 2020-11-16  795  
f4edab68e10119 Prashant Malani 2020-11-16  796  	c_desc.identity = &port->c_identity;
3b3dd1f0dbfe92 Benson Leung    2021-01-28  797  	c_desc.pd_revision = pd_revision;
8b46a212ad11f2 Prashant Malani 2020-11-16  798  
f4edab68e10119 Prashant Malani 2020-11-16  799  	port->cable = typec_register_cable(port->port, &c_desc);
8b46a212ad11f2 Prashant Malani 2020-11-16  800  	if (IS_ERR(port->cable)) {
8b46a212ad11f2 Prashant Malani 2020-11-16  801  		ret = PTR_ERR(port->cable);
8b46a212ad11f2 Prashant Malani 2020-11-16  802  		port->cable = NULL;
f4edab68e10119 Prashant Malani 2020-11-16  803  		goto sop_prime_disc_exit;
f4edab68e10119 Prashant Malani 2020-11-16  804  	}
f4edab68e10119 Prashant Malani 2020-11-16  805  
f4edab68e10119 Prashant Malani 2020-11-16  806  	p_desc.index = TYPEC_PLUG_SOP_P;
f4edab68e10119 Prashant Malani 2020-11-16  807  	port->plug = typec_register_plug(port->cable, &p_desc);
f4edab68e10119 Prashant Malani 2020-11-16  808  	if (IS_ERR(port->plug)) {
f4edab68e10119 Prashant Malani 2020-11-16  809  		ret = PTR_ERR(port->plug);
f4edab68e10119 Prashant Malani 2020-11-16  810  		port->plug = NULL;
f4edab68e10119 Prashant Malani 2020-11-16  811  		goto sop_prime_disc_exit;
8b46a212ad11f2 Prashant Malani 2020-11-16  812  	}
8b46a212ad11f2 Prashant Malani 2020-11-16  813  
1563090965421f Prashant Malani 2020-11-16  814  	ret = cros_typec_register_altmodes(typec, port_num, false);
1563090965421f Prashant Malani 2020-11-16  815  	if (ret < 0) {
1563090965421f Prashant Malani 2020-11-16  816  		dev_err(typec->dev, "Failed to register plug altmodes, port: %d\n", port_num);
1563090965421f Prashant Malani 2020-11-16  817  		goto sop_prime_disc_exit;
1563090965421f Prashant Malani 2020-11-16  818  	}
1563090965421f Prashant Malani 2020-11-16  819  
f4edab68e10119 Prashant Malani 2020-11-16  820  	return 0;
f4edab68e10119 Prashant Malani 2020-11-16  821  
8b46a212ad11f2 Prashant Malani 2020-11-16  822  sop_prime_disc_exit:
f4edab68e10119 Prashant Malani 2020-11-16  823  	cros_typec_remove_cable(typec, port_num);
8b46a212ad11f2 Prashant Malani 2020-11-16  824  	return ret;
8b46a212ad11f2 Prashant Malani 2020-11-16  825  }
8b46a212ad11f2 Prashant Malani 2020-11-16  826  

:::::: The code at line 778 was first introduced by commit
:::::: 72d6e32bd85bd1e5cb5aa467f4eb5d0a69559953 platform/chrome: cros_ec_typec: Store cable plug type

:::::: TO: Prashant Malani <pmalani@chromium.org>
:::::: CC: Benson Leung <bleung@chromium.org>

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

             reply	other threads:[~2021-02-03 15:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-03 15:19 kernel test robot [this message]
2021-02-03 15:19 ` [usb:usb-testing 155/155] drivers/platform/chrome/cros_ec_typec.c:778:8: error: 'CABLE_ATYPE' undeclared; did you mean kernel test robot
2021-02-03 15:39 ` Kyle Tso
2021-02-03 16:40   ` Benson Leung
2021-02-03 16:47     ` Kyle Tso
2021-02-03 16:57       ` Benson Leung

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=202102032303.xnvdBAo2-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kyletso@google.com \
    --cc=linux-usb@vger.kernel.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.