From: kernel test robot <lkp@intel.com>
To: Kent Overstreet <kent.overstreet@linux.dev>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Kent Overstreet <kent.overstreet@linux.dev>
Subject: [bcachefs:bcachefs-testing 90/93] fs/bcachefs/thread_with_file.c:375:2: error: expected expression
Date: Fri, 31 May 2024 17:41:19 +0800 [thread overview]
Message-ID: <202405311714.YnZpPqdk-lkp@intel.com> (raw)
tree: https://evilpiepirate.org/git/bcachefs.git bcachefs-testing
head: ce6297d0475422fa2de0db1d4f955633ba70d031
commit: 21091985987e4fcc4580030d896ac35906041d22 [90/93] bcachefs: bch2_stdio_redirect_readline_timeout()
config: hexagon-randconfig-002-20240531 (https://download.01.org/0day-ci/archive/20240531/202405311714.YnZpPqdk-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240531/202405311714.YnZpPqdk-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/202405311714.YnZpPqdk-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from fs/bcachefs/thread_with_file.c:4:
In file included from fs/bcachefs/bcachefs.h:188:
In file included from include/linux/bio.h:10:
In file included from include/linux/blk_types.h:10:
In file included from include/linux/bvec.h:10:
In file included from include/linux/highmem.h:12:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:14:
In file included from arch/hexagon/include/asm/io.h:328:
include/asm-generic/io.h:548:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:561:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
^
In file included from fs/bcachefs/thread_with_file.c:4:
In file included from fs/bcachefs/bcachefs.h:188:
In file included from include/linux/bio.h:10:
In file included from include/linux/blk_types.h:10:
In file included from include/linux/bvec.h:10:
In file included from include/linux/highmem.h:12:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:14:
In file included from arch/hexagon/include/asm/io.h:328:
include/asm-generic/io.h:574:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
^
In file included from fs/bcachefs/thread_with_file.c:4:
In file included from fs/bcachefs/bcachefs.h:188:
In file included from include/linux/bio.h:10:
In file included from include/linux/blk_types.h:10:
In file included from include/linux/bvec.h:10:
In file included from include/linux/highmem.h:12:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:14:
In file included from arch/hexagon/include/asm/io.h:328:
include/asm-generic/io.h:585:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:595:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:605:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
>> fs/bcachefs/thread_with_file.c:375:2: error: expected expression
unsigned long t = timeout != MAX_SCHEDULE_TIMEOUT
^
>> fs/bcachefs/thread_with_file.c:379:2: error: use of undeclared identifier 't'
t = min(t, sysctl_hung_task_timeout_secs * HZ / 2);
^
fs/bcachefs/thread_with_file.c:379:10: error: use of undeclared identifier 't'
t = min(t, sysctl_hung_task_timeout_secs * HZ / 2);
^
fs/bcachefs/thread_with_file.c:381:76: error: use of undeclared identifier 't'
wait_event_timeout(buf->wait, stdio_redirect_has_more_input(stdio, seen), t);
^
fs/bcachefs/thread_with_file.c:381:76: error: use of undeclared identifier 't'
6 warnings and 5 errors generated.
vim +375 fs/bcachefs/thread_with_file.c
366
367 int bch2_stdio_redirect_readline_timeout(struct stdio_redirect *stdio,
368 darray_char *line,
369 unsigned long timeout)
370 {
371 unsigned long until = jiffies + timeout;
372 struct stdio_buf *buf = &stdio->input;
373 size_t seen = 0;
374 again:
> 375 unsigned long t = timeout != MAX_SCHEDULE_TIMEOUT
376 ? max_t(long, until - jiffies, 0)
377 : timeout;
378
> 379 t = min(t, sysctl_hung_task_timeout_secs * HZ / 2);
380
381 wait_event_timeout(buf->wait, stdio_redirect_has_more_input(stdio, seen), t);
382
383 if (stdio->done)
384 return -1;
385
386 spin_lock(&buf->lock);
387 seen = buf->buf.nr;
388 char *n = memchr(buf->buf.data, '\n', seen);
389
390 if (!n && timeout != MAX_SCHEDULE_TIMEOUT && jiffies >= until) {
391 spin_unlock(&buf->lock);
392 return -ETIME;
393 }
394
395 if (!n) {
396 buf->waiting_for_line = true;
397 spin_unlock(&buf->lock);
398 goto again;
399 }
400
401 size_t b = n + 1 - buf->buf.data;
402 if (b > line->size) {
403 spin_unlock(&buf->lock);
404 int ret = darray_resize(line, b);
405 if (ret)
406 return ret;
407 seen = 0;
408 goto again;
409 }
410
411 buf->buf.nr -= b;
412 memcpy(line->data, buf->buf.data, b);
413 memmove(buf->buf.data,
414 buf->buf.data + b,
415 buf->buf.nr);
416 line->nr = b;
417
418 buf->waiting_for_line = false;
419 spin_unlock(&buf->lock);
420
421 wake_up(&buf->wait);
422 return 0;
423 }
424
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-05-31 9:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202405311714.YnZpPqdk-lkp@intel.com \
--to=lkp@intel.com \
--cc=kent.overstreet@linux.dev \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/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