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: <202209280239.SzC7Plxi-lkp@intel.com>
Date:   Wed, 28 Sep 2022 03:28:15 +0800
From:   kernel test robot <lkp@...el.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Prashant Malani <pmalani@...omium.org>,
        linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-usb@...r.kernel.org
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        Daniel Scally <djrscally@...il.com>,
        Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
        Sakari Ailus <sakari.ailus@...ux.intel.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>
Subject: Re: [PATCH v1 2/5] device property: Constify fwnode connection match
 APIs

Hi Andy,

I love your patch! Yet something to improve:

[auto build test ERROR on driver-core/driver-core-testing]
[cannot apply to usb/usb-testing westeri-thunderbolt/next linus/master v6.0-rc7 next-20220923]
[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/Andy-Shevchenko/device-property-Keep-dev_fwnode-and-dev_fwnode_const-separate/20220927-223109
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git 1da40c2667388dd70306bfd3d4dcb49fd20b50a9
config: hexagon-randconfig-r045-20220927
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 791a7ae1ba3efd6bca96338e10ffde557ba83920)
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/34401a778cc4e8ddd9610bf7f76d8b7e4fff142e
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Andy-Shevchenko/device-property-Keep-dev_fwnode-and-dev_fwnode_const-separate/20220927-223109
        git checkout 34401a778cc4e8ddd9610bf7f76d8b7e4fff142e
        # 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=hexagon SHELL=/bin/bash drivers/usb/typec/

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

All errors (new ones prefixed by >>):

>> drivers/usb/typec/mux.c:84:13: error: incompatible function pointer types passing 'void *(struct fwnode_handle *, const char *, void *)' to parameter of type 'devcon_match_fn_t' (aka 'void *(*)(const struct fwnode_handle *, const char *, void *)') [-Wincompatible-function-pointer-types]
                                                  typec_switch_match,
                                                  ^~~~~~~~~~~~~~~~~~
   include/linux/property.h:457:26: note: passing argument to parameter 'match' here
                                      devcon_match_fn_t match,
                                                        ^
   drivers/usb/typec/mux.c:352:27: error: incompatible function pointer types passing 'void *(struct fwnode_handle *, const char *, void *)' to parameter of type 'devcon_match_fn_t' (aka 'void *(*)(const struct fwnode_handle *, const char *, void *)') [-Wincompatible-function-pointer-types]
                                                  (void *)desc, typec_mux_match,
                                                                ^~~~~~~~~~~~~~~
   include/linux/property.h:457:26: note: passing argument to parameter 'match' here
                                      devcon_match_fn_t match,
                                                        ^
   2 errors generated.


vim +84 drivers/usb/typec/mux.c

bdecb33af34f79 Heikki Krogerus 2018-03-20   61  
bdecb33af34f79 Heikki Krogerus 2018-03-20   62  /**
d1c6a769cdf466 Heikki Krogerus 2020-03-02   63   * fwnode_typec_switch_get - Find USB Type-C orientation switch
d1c6a769cdf466 Heikki Krogerus 2020-03-02   64   * @fwnode: The caller device node
bdecb33af34f79 Heikki Krogerus 2018-03-20   65   *
bdecb33af34f79 Heikki Krogerus 2018-03-20   66   * Finds a switch linked with @dev. Returns a reference to the switch on
bdecb33af34f79 Heikki Krogerus 2018-03-20   67   * success, NULL if no matching connection was found, or
bdecb33af34f79 Heikki Krogerus 2018-03-20   68   * ERR_PTR(-EPROBE_DEFER) when a connection was found but the switch
bdecb33af34f79 Heikki Krogerus 2018-03-20   69   * has not been enumerated yet.
bdecb33af34f79 Heikki Krogerus 2018-03-20   70   */
d1c6a769cdf466 Heikki Krogerus 2020-03-02   71  struct typec_switch *fwnode_typec_switch_get(struct fwnode_handle *fwnode)
bdecb33af34f79 Heikki Krogerus 2018-03-20   72  {
71793b579ba682 Bjorn Andersson 2022-04-22   73  	struct typec_switch_dev *sw_devs[TYPEC_MUX_MAX_DEVS];
bdecb33af34f79 Heikki Krogerus 2018-03-20   74  	struct typec_switch *sw;
71793b579ba682 Bjorn Andersson 2022-04-22   75  	int count;
71793b579ba682 Bjorn Andersson 2022-04-22   76  	int err;
71793b579ba682 Bjorn Andersson 2022-04-22   77  	int i;
bdecb33af34f79 Heikki Krogerus 2018-03-20   78  
713fd49b430c37 Bjorn Andersson 2022-04-22   79  	sw = kzalloc(sizeof(*sw), GFP_KERNEL);
713fd49b430c37 Bjorn Andersson 2022-04-22   80  	if (!sw)
713fd49b430c37 Bjorn Andersson 2022-04-22   81  		return ERR_PTR(-ENOMEM);
713fd49b430c37 Bjorn Andersson 2022-04-22   82  
71793b579ba682 Bjorn Andersson 2022-04-22   83  	count = fwnode_connection_find_matches(fwnode, "orientation-switch", NULL,
71793b579ba682 Bjorn Andersson 2022-04-22  @84  					       typec_switch_match,
71793b579ba682 Bjorn Andersson 2022-04-22   85  					       (void **)sw_devs,
71793b579ba682 Bjorn Andersson 2022-04-22   86  					       ARRAY_SIZE(sw_devs));
71793b579ba682 Bjorn Andersson 2022-04-22   87  	if (count <= 0) {
713fd49b430c37 Bjorn Andersson 2022-04-22   88  		kfree(sw);
71793b579ba682 Bjorn Andersson 2022-04-22   89  		return NULL;
713fd49b430c37 Bjorn Andersson 2022-04-22   90  	}
713fd49b430c37 Bjorn Andersson 2022-04-22   91  
71793b579ba682 Bjorn Andersson 2022-04-22   92  	for (i = 0; i < count; i++) {
71793b579ba682 Bjorn Andersson 2022-04-22   93  		if (IS_ERR(sw_devs[i])) {
71793b579ba682 Bjorn Andersson 2022-04-22   94  			err = PTR_ERR(sw_devs[i]);
71793b579ba682 Bjorn Andersson 2022-04-22   95  			goto put_sw_devs;
71793b579ba682 Bjorn Andersson 2022-04-22   96  		}
71793b579ba682 Bjorn Andersson 2022-04-22   97  	}
713fd49b430c37 Bjorn Andersson 2022-04-22   98  
71793b579ba682 Bjorn Andersson 2022-04-22   99  	for (i = 0; i < count; i++) {
71793b579ba682 Bjorn Andersson 2022-04-22  100  		WARN_ON(!try_module_get(sw_devs[i]->dev.parent->driver->owner));
71793b579ba682 Bjorn Andersson 2022-04-22  101  		sw->sw_devs[i] = sw_devs[i];
71793b579ba682 Bjorn Andersson 2022-04-22  102  	}
71793b579ba682 Bjorn Andersson 2022-04-22  103  
71793b579ba682 Bjorn Andersson 2022-04-22  104  	sw->num_sw_devs = count;
bdecb33af34f79 Heikki Krogerus 2018-03-20  105  
bdecb33af34f79 Heikki Krogerus 2018-03-20  106  	return sw;
71793b579ba682 Bjorn Andersson 2022-04-22  107  
71793b579ba682 Bjorn Andersson 2022-04-22  108  put_sw_devs:
71793b579ba682 Bjorn Andersson 2022-04-22  109  	for (i = 0; i < count; i++) {
71793b579ba682 Bjorn Andersson 2022-04-22  110  		if (!IS_ERR(sw_devs[i]))
71793b579ba682 Bjorn Andersson 2022-04-22  111  			put_device(&sw_devs[i]->dev);
71793b579ba682 Bjorn Andersson 2022-04-22  112  	}
71793b579ba682 Bjorn Andersson 2022-04-22  113  
71793b579ba682 Bjorn Andersson 2022-04-22  114  	kfree(sw);
71793b579ba682 Bjorn Andersson 2022-04-22  115  
71793b579ba682 Bjorn Andersson 2022-04-22  116  	return ERR_PTR(err);
bdecb33af34f79 Heikki Krogerus 2018-03-20  117  }
d1c6a769cdf466 Heikki Krogerus 2020-03-02  118  EXPORT_SYMBOL_GPL(fwnode_typec_switch_get);
bdecb33af34f79 Heikki Krogerus 2018-03-20  119  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (149416 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ