From: kernel test robot <lkp@intel.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Jacek Anaszewski" <jacek.anaszewski@gmail.com>,
"Pavel Machek" <pavel@ucw.cz>, "Dan Murphy" <dmurphy@ti.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Jiri Slaby" <jslaby@suse.com>
Cc: kbuild-all@lists.01.org, Johan Hovold <johan@kernel.org>,
linux-leds@vger.kernel.org, linux-serial@vger.kernel.org,
kernel@pengutronix.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v8 3/3] leds: trigger: implement a tty trigger
Date: Mon, 12 Oct 2020 22:16:59 +0800 [thread overview]
Message-ID: <202010122255.mTooYoPh-lkp@intel.com> (raw)
In-Reply-To: <20201012123358.1475928-4-u.kleine-koenig@pengutronix.de>
[-- Attachment #1: Type: text/plain, Size: 3713 bytes --]
Hi "Uwe,
I love your patch! Perhaps something to improve:
[auto build test WARNING on tty/tty-testing]
[also build test WARNING on pavel-linux-leds/for-next linus/master j.anaszewski-leds/for-next v5.9 next-20201012]
[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/Uwe-Kleine-K-nig/leds-trigger-implement-a-tty-trigger/20201012-203510
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
config: ia64-allmodconfig (attached as .config)
compiler: ia64-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/4185c273a8de0340cee6655a363f98c3737665d0
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Uwe-Kleine-K-nig/leds-trigger-implement-a-tty-trigger/20201012-203510
git checkout 4185c273a8de0340cee6655a363f98c3737665d0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
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/trigger/ledtrig-tty.c: In function 'ledtrig_tty_work':
>> drivers/leds/trigger/ledtrig-tty.c:92:7: warning: variable 'firstrun' set but not used [-Wunused-but-set-variable]
92 | bool firstrun = false;
| ^~~~~~~~
vim +/firstrun +92 drivers/leds/trigger/ledtrig-tty.c
85
86 static void ledtrig_tty_work(struct work_struct *work)
87 {
88 struct ledtrig_tty_data *trigger_data =
89 container_of(work, struct ledtrig_tty_data, dwork.work);
90 struct serial_icounter_struct icount;
91 int ret;
> 92 bool firstrun = false;
93
94 mutex_lock(&trigger_data->mutex);
95
96 BUG_ON(!trigger_data->ttyname);
97
98 /* try to get the tty corresponding to $ttyname */
99 if (!trigger_data->tty) {
100 dev_t devno;
101 struct tty_struct *tty;
102 int ret;
103
104 firstrun = true;
105
106 ret = tty_dev_name_to_number(trigger_data->ttyname, &devno);
107 if (ret < 0)
108 /*
109 * A device with this name might appear later, so keep
110 * retrying.
111 */
112 goto out;
113
114 tty = tty_kopen_shared(devno);
115 if (IS_ERR(tty) || !tty)
116 /* What to do? retry or abort */
117 goto out;
118
119 trigger_data->tty = tty;
120 }
121
122 ret = tty_get_icount(trigger_data->tty, &icount);
123 if (ret) {
124 mutex_unlock(&trigger_data->mutex);
125 dev_info(trigger_data->tty->dev, "Failed to get icount, stopped polling\n");
126 mutex_unlock(&trigger_data->mutex);
127 return;
128 }
129
130 if (icount.rx != trigger_data->rx ||
131 icount.tx != trigger_data->tx) {
132 led_set_brightness(trigger_data->led_cdev, LED_ON);
133
134 trigger_data->rx = icount.rx;
135 trigger_data->tx = icount.tx;
136 } else {
137 led_set_brightness(trigger_data->led_cdev, LED_OFF);
138 }
139
140 out:
141 mutex_unlock(&trigger_data->mutex);
142 schedule_delayed_work(&trigger_data->dwork, msecs_to_jiffies(100));
143 }
144
---
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: 61551 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v8 3/3] leds: trigger: implement a tty trigger
Date: Mon, 12 Oct 2020 22:16:59 +0800 [thread overview]
Message-ID: <202010122255.mTooYoPh-lkp@intel.com> (raw)
In-Reply-To: <20201012123358.1475928-4-u.kleine-koenig@pengutronix.de>
[-- Attachment #1: Type: text/plain, Size: 3815 bytes --]
Hi "Uwe,
I love your patch! Perhaps something to improve:
[auto build test WARNING on tty/tty-testing]
[also build test WARNING on pavel-linux-leds/for-next linus/master j.anaszewski-leds/for-next v5.9 next-20201012]
[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/Uwe-Kleine-K-nig/leds-trigger-implement-a-tty-trigger/20201012-203510
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
config: ia64-allmodconfig (attached as .config)
compiler: ia64-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/4185c273a8de0340cee6655a363f98c3737665d0
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Uwe-Kleine-K-nig/leds-trigger-implement-a-tty-trigger/20201012-203510
git checkout 4185c273a8de0340cee6655a363f98c3737665d0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
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/trigger/ledtrig-tty.c: In function 'ledtrig_tty_work':
>> drivers/leds/trigger/ledtrig-tty.c:92:7: warning: variable 'firstrun' set but not used [-Wunused-but-set-variable]
92 | bool firstrun = false;
| ^~~~~~~~
vim +/firstrun +92 drivers/leds/trigger/ledtrig-tty.c
85
86 static void ledtrig_tty_work(struct work_struct *work)
87 {
88 struct ledtrig_tty_data *trigger_data =
89 container_of(work, struct ledtrig_tty_data, dwork.work);
90 struct serial_icounter_struct icount;
91 int ret;
> 92 bool firstrun = false;
93
94 mutex_lock(&trigger_data->mutex);
95
96 BUG_ON(!trigger_data->ttyname);
97
98 /* try to get the tty corresponding to $ttyname */
99 if (!trigger_data->tty) {
100 dev_t devno;
101 struct tty_struct *tty;
102 int ret;
103
104 firstrun = true;
105
106 ret = tty_dev_name_to_number(trigger_data->ttyname, &devno);
107 if (ret < 0)
108 /*
109 * A device with this name might appear later, so keep
110 * retrying.
111 */
112 goto out;
113
114 tty = tty_kopen_shared(devno);
115 if (IS_ERR(tty) || !tty)
116 /* What to do? retry or abort */
117 goto out;
118
119 trigger_data->tty = tty;
120 }
121
122 ret = tty_get_icount(trigger_data->tty, &icount);
123 if (ret) {
124 mutex_unlock(&trigger_data->mutex);
125 dev_info(trigger_data->tty->dev, "Failed to get icount, stopped polling\n");
126 mutex_unlock(&trigger_data->mutex);
127 return;
128 }
129
130 if (icount.rx != trigger_data->rx ||
131 icount.tx != trigger_data->tx) {
132 led_set_brightness(trigger_data->led_cdev, LED_ON);
133
134 trigger_data->rx = icount.rx;
135 trigger_data->tx = icount.tx;
136 } else {
137 led_set_brightness(trigger_data->led_cdev, LED_OFF);
138 }
139
140 out:
141 mutex_unlock(&trigger_data->mutex);
142 schedule_delayed_work(&trigger_data->dwork, msecs_to_jiffies(100));
143 }
144
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 61551 bytes --]
next prev parent reply other threads:[~2020-10-12 14:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-12 12:33 [PATCH v8 0/3] leds: trigger: implement a tty trigger Uwe Kleine-König
2020-10-12 12:33 ` [PATCH v8 1/3] tty: rename tty_kopen() and add new function tty_kopen_shared() Uwe Kleine-König
2020-10-12 12:33 ` [PATCH v8 2/3] tty: new helper function tty_get_icount() Uwe Kleine-König
2020-10-12 12:33 ` [PATCH v8 3/3] leds: trigger: implement a tty trigger Uwe Kleine-König
2020-10-12 14:16 ` kernel test robot [this message]
2020-10-12 14:16 ` kernel test robot
2020-10-13 8:37 ` Uwe Kleine-König
2020-10-13 8:37 ` Uwe Kleine-König
2020-10-15 22:32 ` kernel test robot
2020-10-15 22:32 ` kernel test robot
2020-10-15 22:32 ` [RFC PATCH] leds: trigger: ledtrig_tty can be static kernel test robot
2020-10-15 22:32 ` kernel test robot
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=202010122255.mTooYoPh-lkp@intel.com \
--to=lkp@intel.com \
--cc=dmurphy@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=jacek.anaszewski@gmail.com \
--cc=johan@kernel.org \
--cc=jslaby@suse.com \
--cc=kbuild-all@lists.01.org \
--cc=kernel@pengutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=u.kleine-koenig@pengutronix.de \
/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.