From: kernel test robot <lkp@intel.com>
To: Xianting Tian <xianting.tian@linux.alibaba.com>,
gregkh@linuxfoundation.org, jirislaby@kernel.org,
amit@kernel.org, arnd@arndb.de, osandov@fb.com
Cc: kbuild-all@lists.01.org,
Xianting Tian <xianting.tian@linux.alibaba.com>,
linux-kernel@vger.kernel.org,
virtualization@lists.linux-foundation.org,
clang-built-linux@googlegroups.com,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v7 1/2] tty: hvc: pass DMA capable memory to put_chars()
Date: Wed, 18 Aug 2021 02:24:37 +0800 [thread overview]
Message-ID: <202108180228.9hxTBwSA-lkp@intel.com> (raw)
In-Reply-To: <20210817132300.165014-2-xianting.tian@linux.alibaba.com>
[-- Attachment #1: Type: text/plain, Size: 4844 bytes --]
Hi Xianting,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on tty/tty-testing]
[also build test WARNING on char-misc/char-misc-testing soc/for-next v5.14-rc6 next-20210817]
[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/Xianting-Tian/make-hvc-pass-dma-capable-memory-to-its-backend/20210817-212556
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
config: i386-randconfig-r021-20210816 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 2c6448cdc2f68f8c28fd0bd9404182b81306e6e6)
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/f12c3bee9f2413ed7643d858b40ce2337329fdae
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Xianting-Tian/make-hvc-pass-dma-capable-memory-to-its-backend/20210817-212556
git checkout f12c3bee9f2413ed7643d858b40ce2337329fdae
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386
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 >>):
clang-14: warning: optimization flag '-falign-jumps=0' is not supported [-Wignored-optimization-argument]
In file included from drivers/tty/hvc/hvc_console.c:15:
In file included from include/linux/kbd_kern.h:5:
In file included from include/linux/tty.h:5:
In file included from include/linux/fs.h:6:
In file included from include/linux/wait_bit.h:8:
In file included from include/linux/wait.h:9:
In file included from include/linux/spinlock.h:51:
In file included from include/linux/preempt.h:78:
In file included from arch/x86/include/asm/preempt.h:7:
In file included from include/linux/thread_info.h:60:
arch/x86/include/asm/thread_info.h:172:13: warning: calling '__builtin_frame_address' with a nonzero argument is unsafe [-Wframe-address]
oldframe = __builtin_frame_address(1);
^~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/thread_info.h:174:11: warning: calling '__builtin_frame_address' with a nonzero argument is unsafe [-Wframe-address]
frame = __builtin_frame_address(2);
^~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/tty/hvc/hvc_console.c:160:18: warning: address of array 'hp->c' will always evaluate to 'true' [-Wpointer-bool-conversion]
if (!hp || !hp->c)
~~~~~^
3 warnings generated.
vim +160 drivers/tty/hvc/hvc_console.c
136
137 /*
138 * Console APIs, NOT TTY. These APIs are available immediately when
139 * hvc_console_setup() finds adapters.
140 */
141
142 static void hvc_console_print(struct console *co, const char *b,
143 unsigned count)
144 {
145 char *c;
146 unsigned i = 0, n = 0;
147 int r, donecr = 0, index = co->index;
148 unsigned long flags;
149 struct hvc_struct *hp;
150
151 /* Console access attempt outside of acceptable console range. */
152 if (index >= MAX_NR_HVC_CONSOLES)
153 return;
154
155 /* This console adapter was removed so it is not usable. */
156 if (vtermnos[index] == -1)
157 return;
158
159 hp = cons_hvcs[index];
> 160 if (!hp || !hp->c)
161 return;
162
163 c = hp->c;
164
165 spin_lock_irqsave(&hp->c_lock, flags);
166 while (count > 0 || i > 0) {
167 if (count > 0 && i < sizeof(c)) {
168 if (b[n] == '\n' && !donecr) {
169 c[i++] = '\r';
170 donecr = 1;
171 } else {
172 c[i++] = b[n++];
173 donecr = 0;
174 --count;
175 }
176 } else {
177 r = cons_ops[index]->put_chars(vtermnos[index], c, i);
178 if (r <= 0) {
179 /* throw away characters on error
180 * but spin in case of -EAGAIN */
181 if (r != -EAGAIN) {
182 i = 0;
183 } else {
184 hvc_console_flush(cons_ops[index],
185 vtermnos[index]);
186 }
187 } else if (r > 0) {
188 i -= r;
189 if (i > 0)
190 memmove(c, c+r, i);
191 }
192 }
193 }
194 spin_unlock_irqrestore(&hp->c_lock, flags);
195 hvc_console_flush(cons_ops[index], vtermnos[index]);
196 }
197
---
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: 36668 bytes --]
[-- Attachment #3: Type: text/plain, Size: 183 bytes --]
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
prev parent reply other threads:[~2021-08-17 18:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210817132300.165014-1-xianting.tian@linux.alibaba.com>
[not found] ` <20210817132300.165014-2-xianting.tian@linux.alibaba.com>
2021-08-17 15:48 ` [PATCH v7 1/2] tty: hvc: pass DMA capable memory to put_chars() Greg KH
2021-08-17 18:24 ` kernel test robot [this message]
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=202108180228.9hxTBwSA-lkp@intel.com \
--to=lkp@intel.com \
--cc=amit@kernel.org \
--cc=arnd@arndb.de \
--cc=clang-built-linux@googlegroups.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=osandov@fb.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=xianting.tian@linux.alibaba.com \
/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;
as well as URLs for NNTP newsgroup(s).