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: <202208170041.YD73wxno-lkp@intel.com>
Date:   Wed, 17 Aug 2022 01:03:46 +0800
From:   kernel test robot <lkp@...el.com>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org,
        Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        Robin Murphy <robin.murphy@....com>
Subject: Re: [PATCH] driver core: Have dev_err_probe() handle the dev_fmt()
 macro

Hi Christophe,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on driver-core/driver-core-testing]
[also build test WARNING on linus/master v6.0-rc1 next-20220816]
[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/Christophe-JAILLET/driver-core-Have-dev_err_probe-handle-the-dev_fmt-macro/20220816-205843
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git 568035b01cfb107af8d2e4bd2fb9aea22cf5b868
config: arc-randconfig-r043-20220815
compiler: arc-elf-gcc (GCC) 12.1.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/intel-lab-lkp/linux/commit/e48a058abdd5e46816d9ad67363b4139705d4cdb
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Christophe-JAILLET/driver-core-Have-dev_err_probe-handle-the-dev_fmt-macro/20220816-205843
        git checkout e48a058abdd5e46816d9ad67363b4139705d4cdb
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash drivers/base/

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

All warnings (new ones prefixed by >>):

>> drivers/base/core.c:4845: warning: expecting prototype for dev_err_probe(). Prototype was for _dev_err_probe() instead


vim +4845 drivers/base/core.c

97badf873ab60e Rafael J. Wysocki     2015-04-03  4808  
a787e5400a1cee Andrzej Hajda         2020-07-13  4809  /**
a787e5400a1cee Andrzej Hajda         2020-07-13  4810   * dev_err_probe - probe error check and log helper
a787e5400a1cee Andrzej Hajda         2020-07-13  4811   * @dev: the pointer to the struct device
a787e5400a1cee Andrzej Hajda         2020-07-13  4812   * @err: error value to test
a787e5400a1cee Andrzej Hajda         2020-07-13  4813   * @fmt: printf-style format string
a787e5400a1cee Andrzej Hajda         2020-07-13  4814   * @...: arguments as specified in the format string
a787e5400a1cee Andrzej Hajda         2020-07-13  4815   *
a787e5400a1cee Andrzej Hajda         2020-07-13  4816   * This helper implements common pattern present in probe functions for error
a787e5400a1cee Andrzej Hajda         2020-07-13  4817   * checking: print debug or error message depending if the error value is
a787e5400a1cee Andrzej Hajda         2020-07-13  4818   * -EPROBE_DEFER and propagate error upwards.
d090b70ede0237 Andrzej Hajda         2020-07-13  4819   * In case of -EPROBE_DEFER it sets also defer probe reason, which can be
d090b70ede0237 Andrzej Hajda         2020-07-13  4820   * checked later by reading devices_deferred debugfs attribute.
074b3aad307de6 Mauro Carvalho Chehab 2020-09-09  4821   * It replaces code sequence::
074b3aad307de6 Mauro Carvalho Chehab 2020-09-09  4822   *
a787e5400a1cee Andrzej Hajda         2020-07-13  4823   * 	if (err != -EPROBE_DEFER)
a787e5400a1cee Andrzej Hajda         2020-07-13  4824   * 		dev_err(dev, ...);
a787e5400a1cee Andrzej Hajda         2020-07-13  4825   * 	else
a787e5400a1cee Andrzej Hajda         2020-07-13  4826   * 		dev_dbg(dev, ...);
a787e5400a1cee Andrzej Hajda         2020-07-13  4827   * 	return err;
074b3aad307de6 Mauro Carvalho Chehab 2020-09-09  4828   *
074b3aad307de6 Mauro Carvalho Chehab 2020-09-09  4829   * with::
074b3aad307de6 Mauro Carvalho Chehab 2020-09-09  4830   *
a787e5400a1cee Andrzej Hajda         2020-07-13  4831   * 	return dev_err_probe(dev, err, ...);
a787e5400a1cee Andrzej Hajda         2020-07-13  4832   *
e48a058abdd5e4 Christophe JAILLET    2022-08-16  4833   * Just as dev_err() does, dev_err_probe() also takes the dev_fmt() macro into
e48a058abdd5e4 Christophe JAILLET    2022-08-16  4834   * consideration if it is defined.
e48a058abdd5e4 Christophe JAILLET    2022-08-16  4835   *
7065f92255bb24 Douglas Anderson      2021-09-16  4836   * Note that it is deemed acceptable to use this function for error
7065f92255bb24 Douglas Anderson      2021-09-16  4837   * prints during probe even if the @err is known to never be -EPROBE_DEFER.
7065f92255bb24 Douglas Anderson      2021-09-16  4838   * The benefit compared to a normal dev_err() is the standardized format
7065f92255bb24 Douglas Anderson      2021-09-16  4839   * of the error code and the fact that the error code is returned.
7065f92255bb24 Douglas Anderson      2021-09-16  4840   *
a787e5400a1cee Andrzej Hajda         2020-07-13  4841   * Returns @err.
a787e5400a1cee Andrzej Hajda         2020-07-13  4842   *
a787e5400a1cee Andrzej Hajda         2020-07-13  4843   */
e48a058abdd5e4 Christophe JAILLET    2022-08-16  4844  int _dev_err_probe(const struct device *dev, int err, const char *fmt, ...)
a787e5400a1cee Andrzej Hajda         2020-07-13 @4845  {
a787e5400a1cee Andrzej Hajda         2020-07-13  4846  	struct va_format vaf;
a787e5400a1cee Andrzej Hajda         2020-07-13  4847  	va_list args;
a787e5400a1cee Andrzej Hajda         2020-07-13  4848  
a787e5400a1cee Andrzej Hajda         2020-07-13  4849  	va_start(args, fmt);
a787e5400a1cee Andrzej Hajda         2020-07-13  4850  	vaf.fmt = fmt;
a787e5400a1cee Andrzej Hajda         2020-07-13  4851  	vaf.va = &args;
a787e5400a1cee Andrzej Hajda         2020-07-13  4852  
d090b70ede0237 Andrzej Hajda         2020-07-13  4853  	if (err != -EPROBE_DEFER) {
693a8e936590f9 Michał Mirosław       2020-08-28  4854  		dev_err(dev, "error %pe: %pV", ERR_PTR(err), &vaf);
d090b70ede0237 Andrzej Hajda         2020-07-13  4855  	} else {
d090b70ede0237 Andrzej Hajda         2020-07-13  4856  		device_set_deferred_probe_reason(dev, &vaf);
693a8e936590f9 Michał Mirosław       2020-08-28  4857  		dev_dbg(dev, "error %pe: %pV", ERR_PTR(err), &vaf);
d090b70ede0237 Andrzej Hajda         2020-07-13  4858  	}
a787e5400a1cee Andrzej Hajda         2020-07-13  4859  
a787e5400a1cee Andrzej Hajda         2020-07-13  4860  	va_end(args);
a787e5400a1cee Andrzej Hajda         2020-07-13  4861  
a787e5400a1cee Andrzej Hajda         2020-07-13  4862  	return err;
a787e5400a1cee Andrzej Hajda         2020-07-13  4863  }
e48a058abdd5e4 Christophe JAILLET    2022-08-16  4864  EXPORT_SYMBOL_GPL(_dev_err_probe);
a787e5400a1cee Andrzej Hajda         2020-07-13  4865  

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ