From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH RFC leds + net-next 2/3] leds: trigger: return error value if .activate() failed
Date: Fri, 17 Jul 2020 07:20:49 +0800 [thread overview]
Message-ID: <202007170704.y49Pkcnc%lkp@intel.com> (raw)
In-Reply-To: <20200716171730.13227-3-marek.behun@nic.cz>
[-- Attachment #1: Type: text/plain, Size: 5162 bytes --]
Hi "Marek,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Marek-Beh-n/Add-support-for-LEDs-on-Marvell-PHYs/20200717-012010
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 59632b220f2d61df274ed3a14a204e941051fdad
config: powerpc-randconfig-r005-20200716 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ed6b578040a85977026c93bf4188f996148f3218)
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
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/leds/led-triggers.c:52:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (sysfs_streq(buf, "none")) {
^~~~~~~~~~~~~~~~~~~~~~~~
drivers/leds/led-triggers.c:74:9: note: uninitialized use occurs here
return ret < 0 ? ret : count;
^~~
drivers/leds/led-triggers.c:52:2: note: remove the 'if' if its condition is always false
if (sysfs_streq(buf, "none")) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/leds/led-triggers.c:43:9: note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0
1 warning generated.
vim +52 drivers/leds/led-triggers.c
abf0e9916c9400 Marek Behún 2020-07-16 35
11f70002213774 Akinobu Mita 2019-09-29 36 ssize_t led_trigger_write(struct file *filp, struct kobject *kobj,
11f70002213774 Akinobu Mita 2019-09-29 37 struct bin_attribute *bin_attr, char *buf,
11f70002213774 Akinobu Mita 2019-09-29 38 loff_t pos, size_t count)
c3bc9956ec52fb Richard Purdie 2006-03-31 39 {
11f70002213774 Akinobu Mita 2019-09-29 40 struct device *dev = kobj_to_dev(kobj);
f8a7c6fe14f556 Richard Purdie 2007-07-08 41 struct led_classdev *led_cdev = dev_get_drvdata(dev);
c3bc9956ec52fb Richard Purdie 2006-03-31 42 struct led_trigger *trig;
979669942e8602 Marek Behún 2020-07-16 43 int ret;
acd899e4f3066b Jacek Anaszewski 2014-09-22 44
acd899e4f3066b Jacek Anaszewski 2014-09-22 45 mutex_lock(&led_cdev->led_access);
acd899e4f3066b Jacek Anaszewski 2014-09-22 46
acd899e4f3066b Jacek Anaszewski 2014-09-22 47 if (led_sysfs_is_disabled(led_cdev)) {
acd899e4f3066b Jacek Anaszewski 2014-09-22 48 ret = -EBUSY;
acd899e4f3066b Jacek Anaszewski 2014-09-22 49 goto unlock;
acd899e4f3066b Jacek Anaszewski 2014-09-22 50 }
c3bc9956ec52fb Richard Purdie 2006-03-31 51
7296c33ed12ef1 Heiner Kallweit 2016-03-08 @52 if (sysfs_streq(buf, "none")) {
0013b23d66a276 Németh Márton 2008-03-09 53 led_trigger_remove(led_cdev);
acd899e4f3066b Jacek Anaszewski 2014-09-22 54 goto unlock;
c3bc9956ec52fb Richard Purdie 2006-03-31 55 }
c3bc9956ec52fb Richard Purdie 2006-03-31 56
dc47206e552c08 Richard Purdie 2007-11-10 57 down_read(&triggers_list_lock);
c3bc9956ec52fb Richard Purdie 2006-03-31 58 list_for_each_entry(trig, &trigger_list, next_trig) {
abf0e9916c9400 Marek Behún 2020-07-16 59 if (sysfs_streq(buf, trig->name) && trigger_relevant(led_cdev, trig)) {
dc47206e552c08 Richard Purdie 2007-11-10 60 down_write(&led_cdev->trigger_lock);
979669942e8602 Marek Behún 2020-07-16 61 ret = led_trigger_set(led_cdev, trig);
dc47206e552c08 Richard Purdie 2007-11-10 62 up_write(&led_cdev->trigger_lock);
c3bc9956ec52fb Richard Purdie 2006-03-31 63
dc47206e552c08 Richard Purdie 2007-11-10 64 up_read(&triggers_list_lock);
acd899e4f3066b Jacek Anaszewski 2014-09-22 65 goto unlock;
c3bc9956ec52fb Richard Purdie 2006-03-31 66 }
c3bc9956ec52fb Richard Purdie 2006-03-31 67 }
a3eac76cdf7225 Heiner Kallweit 2016-07-01 68 /* we come here only if buf matches no trigger */
a3eac76cdf7225 Heiner Kallweit 2016-07-01 69 ret = -EINVAL;
dc47206e552c08 Richard Purdie 2007-11-10 70 up_read(&triggers_list_lock);
c3bc9956ec52fb Richard Purdie 2006-03-31 71
acd899e4f3066b Jacek Anaszewski 2014-09-22 72 unlock:
acd899e4f3066b Jacek Anaszewski 2014-09-22 73 mutex_unlock(&led_cdev->led_access);
979669942e8602 Marek Behún 2020-07-16 74 return ret < 0 ? ret : count;
c3bc9956ec52fb Richard Purdie 2006-03-31 75 }
11f70002213774 Akinobu Mita 2019-09-29 76 EXPORT_SYMBOL_GPL(led_trigger_write);
c3bc9956ec52fb Richard Purdie 2006-03-31 77
---
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: 35399 bytes --]
next prev parent reply other threads:[~2020-07-16 23:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-16 17:17 [PATCH RFC leds + net-next 0/3] Add support for LEDs on Marvell PHYs Marek Behún
2020-07-16 17:17 ` [PATCH RFC leds + net-next 1/3] leds: trigger: add support for LED-private device triggers Marek Behún
2020-07-20 11:20 ` Pavel Machek
2020-07-20 19:14 ` Jacek Anaszewski
2020-07-21 20:54 ` Pavel Machek
2020-07-16 17:17 ` [PATCH RFC leds + net-next 2/3] leds: trigger: return error value if .activate() failed Marek Behún
2020-07-16 23:20 ` kernel test robot [this message]
2020-07-20 11:17 ` Pavel Machek
2020-07-16 17:17 ` [PATCH RFC leds + net-next 3/3] net: phy: marvell: add support for PHY LEDs via LED class Marek Behún
2020-07-16 22:16 ` kernel test robot
2020-07-16 17:30 ` [PATCH RFC leds + net-next 0/3] Add support for LEDs on Marvell PHYs Ondřej Jirman
2020-07-16 18:56 ` Andrew Lunn
2020-07-23 12:41 ` Marek Behún
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=202007170704.y49Pkcnc%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.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.