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] [thread-next>] [day] [month] [year] [list]
Message-ID: <202103300001.PvNjq3um-lkp@intel.com>
Date:   Tue, 30 Mar 2021 00:06:18 +0800
From:   kernel test robot <lkp@...el.com>
To:     Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     kbuild-all@...ts.01.org, Alan Stern <stern@...land.harvard.edu>,
        Benson Leung <bleung@...gle.com>,
        Prashant Malani <pmalani@...omium.org>,
        Guenter Roeck <linux@...ck-us.net>, linux-usb@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 3/6] usb: typec: Port mapping utility

Hi Heikki,

I love your patch! Yet something to improve:

[auto build test ERROR on next-20210326]
[also build test ERROR on v5.12-rc5]
[cannot apply to usb/usb-testing chrome-platform-linux/for-next linus/master v5.12-rc5 v5.12-rc4 v5.12-rc3]
[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/Heikki-Krogerus/usb-Linking-ports-to-their-Type-C-connectors/20210329-164859
base:    931294922e65a23e1aad6398b9ae02df74044679
config: m68k-randconfig-c004-20210329 (attached as .config)
compiler: m68k-linux-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://github.com/0day-ci/linux/commit/e86970d606657b7ce44bbdb80f4d25048bca710f
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Heikki-Krogerus/usb-Linking-ports-to-their-Type-C-connectors/20210329-164859
        git checkout e86970d606657b7ce44bbdb80f4d25048bca710f
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k 

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

All errors (new ones prefixed by >>):

>> drivers/usb/typec/port-mapper.c:156:5: error: redefinition of 'typec_link_port'
     156 | int typec_link_port(struct device *port)
         |     ^~~~~~~~~~~~~~~
   In file included from drivers/usb/typec/port-mapper.c:11:
   include/linux/usb/typec.h:306:19: note: previous definition of 'typec_link_port' was here
     306 | static inline int typec_link_port(struct device *port)
         |                   ^~~~~~~~~~~~~~~
>> drivers/usb/typec/port-mapper.c:215:6: error: redefinition of 'typec_unlink_port'
     215 | void typec_unlink_port(struct device *port)
         |      ^~~~~~~~~~~~~~~~~
   In file included from drivers/usb/typec/port-mapper.c:11:
   include/linux/usb/typec.h:311:20: note: previous definition of 'typec_unlink_port' was here
     311 | static inline void typec_unlink_port(struct device *port) { }
         |                    ^~~~~~~~~~~~~~~~~


vim +/typec_link_port +156 drivers/usb/typec/port-mapper.c

   146	
   147	/**
   148	 * typec_link_port - Link a port to its connector
   149	 * @port: The port device
   150	 *
   151	 * Find the connector of @port and create symlink named "connector" for it.
   152	 * Returns 0 on success, or errno in case of a failure.
   153	 *
   154	 * NOTE. The function increments the reference count of @port on success.
   155	 */
 > 156	int typec_link_port(struct device *port)
   157	{
   158		struct device *connector;
   159		struct port_node *node;
   160		int ret = 0;
   161	
   162		node = create_port_node(port);
   163		if (IS_ERR(node))
   164			return PTR_ERR(node);
   165	
   166		connector = find_connector(node);
   167		if (!connector)
   168			goto remove_node;
   169	
   170		ret = link_port(to_typec_port(connector), node);
   171		if (ret)
   172			goto put_connector;
   173	
   174		return 0;
   175	
   176	put_connector:
   177		put_device(connector);
   178	remove_node:
   179		remove_port_node(node);
   180	
   181		return ret;
   182	}
   183	EXPORT_SYMBOL_GPL(typec_link_port);
   184	
   185	static int port_match_and_unlink(struct device *connector, void *port)
   186	{
   187		struct port_node *node;
   188		struct port_node *tmp;
   189		int ret = 0;
   190	
   191		if (!is_typec_port(connector))
   192			return 0;
   193	
   194		mutex_lock(&to_typec_port(connector)->port_list_lock);
   195		list_for_each_entry_safe(node, tmp, &to_typec_port(connector)->port_list, list) {
   196			ret = node->dev == port;
   197			if (ret) {
   198				unlink_port(to_typec_port(connector), node);
   199				remove_port_node(node);
   200				put_device(connector);
   201				break;
   202			}
   203		}
   204		mutex_unlock(&to_typec_port(connector)->port_list_lock);
   205	
   206		return ret;
   207	}
   208	
   209	/**
   210	 * typec_unlink_port - Unlink port from its connector
   211	 * @port: The port device
   212	 *
   213	 * Removes the symlink "connector" and decrements the reference count of @port.
   214	 */
 > 215	void typec_unlink_port(struct device *port)

---
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" (21630 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ