From: kernel test robot <lkp@intel.com>
To: Dragan Simic <dsimic@manjaro.org>,
linux-spi@vger.kernel.org, linux-rockchip@lists.infradead.org
Cc: oe-kbuild-all@lists.linux.dev, broonie@kernel.org,
heiko@sntech.de, gregkh@linuxfoundation.org, rafael@kernel.org,
oss@helene.moe, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 4/5] driver core: Add device probe log helper dev_warn_probe()
Date: Sun, 29 Sep 2024 09:39:08 +0800 [thread overview]
Message-ID: <202409290956.jwLrcN1S-lkp@intel.com> (raw)
In-Reply-To: <2fd9a60e0efe906dc7a203cd652c8d0b7f932470.1727496560.git.dsimic@manjaro.org>
Hi Dragan,
kernel test robot noticed the following build warnings:
[auto build test WARNING on rockchip/for-next]
[also build test WARNING on broonie-spi/for-next driver-core/driver-core-testing driver-core/driver-core-next driver-core/driver-core-linus linus/master v6.11 next-20240927]
[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/Dragan-Simic/spi-rockchip-Perform-trivial-code-cleanups/20240928-121548
base: https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git for-next
patch link: https://lore.kernel.org/r/2fd9a60e0efe906dc7a203cd652c8d0b7f932470.1727496560.git.dsimic%40manjaro.org
patch subject: [PATCH v2 4/5] driver core: Add device probe log helper dev_warn_probe()
config: openrisc-allnoconfig (https://download.01.org/0day-ci/archive/20240929/202409290956.jwLrcN1S-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240929/202409290956.jwLrcN1S-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409290956.jwLrcN1S-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/base/core.c: In function 'dev_err_probe':
>> drivers/base/core.c:5055:1: warning: control reaches end of non-void function [-Wreturn-type]
5055 | }
| ^
drivers/base/core.c: In function 'dev_warn_probe':
drivers/base/core.c:5101:1: warning: control reaches end of non-void function [-Wreturn-type]
5101 | }
| ^
vim +5055 drivers/base/core.c
5011
5012 /**
5013 * dev_err_probe - probe error check and log helper
5014 * @dev: the pointer to the struct device
5015 * @err: error value to test
5016 * @fmt: printf-style format string
5017 * @...: arguments as specified in the format string
5018 *
5019 * This helper implements common pattern present in probe functions for error
5020 * checking: print debug or error message depending if the error value is
5021 * -EPROBE_DEFER and propagate error upwards.
5022 * In case of -EPROBE_DEFER it sets also defer probe reason, which can be
5023 * checked later by reading devices_deferred debugfs attribute.
5024 * It replaces the following code sequence::
5025 *
5026 * if (err != -EPROBE_DEFER)
5027 * dev_err(dev, ...);
5028 * else
5029 * dev_dbg(dev, ...);
5030 * return err;
5031 *
5032 * with::
5033 *
5034 * return dev_err_probe(dev, err, ...);
5035 *
5036 * Using this helper in your probe function is totally fine even if @err
5037 * is known to never be -EPROBE_DEFER.
5038 * The benefit compared to a normal dev_err() is the standardized format
5039 * of the error code, which is emitted symbolically (i.e. you get "EAGAIN"
5040 * instead of "-35"), and having the error code returned allows more
5041 * compact error paths.
5042 *
5043 * Returns @err.
5044 */
5045 int dev_err_probe(const struct device *dev, int err, const char *fmt, ...)
5046 {
5047 va_list args;
5048
5049 va_start(args, fmt);
5050
5051 /* Use dev_err() for logging when err doesn't equal -EPROBE_DEFER */
5052 dev_probe_failed(dev, err, true, fmt, args);
5053
5054 va_end(args);
> 5055 }
5056 EXPORT_SYMBOL_GPL(dev_err_probe);
5057
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-09-29 1:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-28 4:12 [PATCH v2 0/5] Add dev_warn_probe() and improve error handling in Rockchip SPI drivers Dragan Simic
2024-09-28 4:12 ` [PATCH v2 1/5] spi: rockchip: Perform trivial code cleanups Dragan Simic
2024-09-28 4:12 ` [PATCH v2 2/5] spi: rockchip-sfc: " Dragan Simic
2024-09-28 4:12 ` [PATCH v2 3/5] spi: rockchip-sfc: Use dev_err_probe() in the probe path Dragan Simic
2024-09-28 4:12 ` [PATCH v2 4/5] driver core: Add device probe log helper dev_warn_probe() Dragan Simic
2024-09-29 1:39 ` kernel test robot [this message]
2024-09-29 2:10 ` kernel test robot
2024-09-29 2:20 ` kernel test robot
2024-09-28 4:12 ` [PATCH v2 5/5] spi: rockchip: Use dev_{err,warn}_probe() in the probe path Dragan Simic
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=202409290956.jwLrcN1S-lkp@intel.com \
--to=lkp@intel.com \
--cc=broonie@kernel.org \
--cc=dsimic@manjaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=heiko@sntech.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oss@helene.moe \
--cc=rafael@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome