From: kbuild test robot <lkp@intel.com>
To: Dmitry Safonov <dima@arista.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCHv3 2/2] serial/sysrq: Add MAGIC_SYSRQ_SERIAL_SEQUENCE
Date: Tue, 3 Mar 2020 12:31:23 +0800 [thread overview]
Message-ID: <202003031201.WdZ9GaGO%lkp@intel.com> (raw)
In-Reply-To: <20200302175135.269397-3-dima@arista.com>
Hi Dmitry,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on tty/tty-testing]
[also build test WARNING on usb/usb-testing linus/master v5.6-rc4 next-20200302]
[cannot apply to linux/master]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Dmitry-Safonov/serial-sysrq-Add-MAGIC_SYSRQ_SERIAL_SEQUENCE/20200303-041809
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
New smatch warnings:
drivers/tty/serial/serial_core.c:3123 uart_try_toggle_sysrq() warn: unsigned '++port->sysrq_seq' is never less than zero.
Old smatch warnings:
drivers/tty/serial/serial_core.c:298 uart_shutdown() error: we previously assumed 'uport' could be null (see line 294)
drivers/tty/serial/serial_core.c:2741 iomem_base_show() warn: argument 4 to %lX specifier is cast from pointer
vim +3123 drivers/tty/serial/serial_core.c
3099
3100 /**
3101 * uart_try_toggle_sysrq - Enables SysRq from serial line
3102 * @port: uart_port structure where char(s) after BREAK met
3103 * @ch: new character in the sequence after received BREAK
3104 *
3105 * Enables magic SysRq when the required sequence is met on port
3106 * (see CONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE).
3107 *
3108 * Returns false if @ch is out of enabling sequence and should be
3109 * handled some other way, true if @ch was consumed.
3110 */
3111 static bool uart_try_toggle_sysrq(struct uart_port *port, unsigned int ch)
3112 {
3113 if (ARRAY_SIZE(sysrq_toggle_seq) <= 1)
3114 return false;
3115
3116 BUILD_BUG_ON(ARRAY_SIZE(sysrq_toggle_seq) >= U8_MAX);
3117 if (sysrq_toggle_seq[port->sysrq_seq] != ch) {
3118 port->sysrq_seq = 0;
3119 return false;
3120 }
3121
3122 /* Without the last \0 */
> 3123 if (++port->sysrq_seq < (ARRAY_SIZE(sysrq_toggle_seq) - 1)) {
3124 port->sysrq = jiffies + SYSRQ_TIMEOUT;
3125 return true;
3126 }
3127
3128 schedule_work(&sysrq_enable_work);
3129
3130 port->sysrq = 0;
3131 return true;
3132 }
3133 #else
3134 static inline bool uart_try_toggle_sysrq(struct uart_port *port, unsigned int ch)
3135 {
3136 return false;
3137 }
3138 #endif
3139
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCHv3 2/2] serial/sysrq: Add MAGIC_SYSRQ_SERIAL_SEQUENCE
Date: Tue, 03 Mar 2020 12:31:23 +0800 [thread overview]
Message-ID: <202003031201.WdZ9GaGO%lkp@intel.com> (raw)
In-Reply-To: <20200302175135.269397-3-dima@arista.com>
[-- Attachment #1: Type: text/plain, Size: 2717 bytes --]
Hi Dmitry,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on tty/tty-testing]
[also build test WARNING on usb/usb-testing linus/master v5.6-rc4 next-20200302]
[cannot apply to linux/master]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Dmitry-Safonov/serial-sysrq-Add-MAGIC_SYSRQ_SERIAL_SEQUENCE/20200303-041809
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
New smatch warnings:
drivers/tty/serial/serial_core.c:3123 uart_try_toggle_sysrq() warn: unsigned '++port->sysrq_seq' is never less than zero.
Old smatch warnings:
drivers/tty/serial/serial_core.c:298 uart_shutdown() error: we previously assumed 'uport' could be null (see line 294)
drivers/tty/serial/serial_core.c:2741 iomem_base_show() warn: argument 4 to %lX specifier is cast from pointer
vim +3123 drivers/tty/serial/serial_core.c
3099
3100 /**
3101 * uart_try_toggle_sysrq - Enables SysRq from serial line
3102 * @port: uart_port structure where char(s) after BREAK met
3103 * @ch: new character in the sequence after received BREAK
3104 *
3105 * Enables magic SysRq when the required sequence is met on port
3106 * (see CONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE).
3107 *
3108 * Returns false if @ch is out of enabling sequence and should be
3109 * handled some other way, true if @ch was consumed.
3110 */
3111 static bool uart_try_toggle_sysrq(struct uart_port *port, unsigned int ch)
3112 {
3113 if (ARRAY_SIZE(sysrq_toggle_seq) <= 1)
3114 return false;
3115
3116 BUILD_BUG_ON(ARRAY_SIZE(sysrq_toggle_seq) >= U8_MAX);
3117 if (sysrq_toggle_seq[port->sysrq_seq] != ch) {
3118 port->sysrq_seq = 0;
3119 return false;
3120 }
3121
3122 /* Without the last \0 */
> 3123 if (++port->sysrq_seq < (ARRAY_SIZE(sysrq_toggle_seq) - 1)) {
3124 port->sysrq = jiffies + SYSRQ_TIMEOUT;
3125 return true;
3126 }
3127
3128 schedule_work(&sysrq_enable_work);
3129
3130 port->sysrq = 0;
3131 return true;
3132 }
3133 #else
3134 static inline bool uart_try_toggle_sysrq(struct uart_port *port, unsigned int ch)
3135 {
3136 return false;
3137 }
3138 #endif
3139
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
next prev parent reply other threads:[~2020-03-03 4:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-02 17:51 [PATCHv3 0/2] serial/sysrq: Add MAGIC_SYSRQ_SERIAL_SEQUENCE Dmitry Safonov
2020-03-02 17:51 ` [PATCHv3 1/2] sysctl/sysrq: Remove __sysrq_enabled copy Dmitry Safonov
2020-04-01 12:22 ` Michael Ellerman
2020-04-01 14:41 ` Dmitry Safonov
2020-03-02 17:51 ` [PATCHv3 2/2] serial/sysrq: Add MAGIC_SYSRQ_SERIAL_SEQUENCE Dmitry Safonov
2020-03-03 4:31 ` kbuild test robot [this message]
2020-03-03 4:31 ` kbuild test robot
2020-03-03 18:06 ` Dmitry Safonov
2020-03-06 12:55 ` Greg Kroah-Hartman
2020-03-06 14:50 ` Dmitry Safonov
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=202003031201.WdZ9GaGO%lkp@intel.com \
--to=lkp@intel.com \
--cc=dima@arista.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.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 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.