From: kernel test robot <lkp@intel.com>
To: David Howells <dhowells@redhat.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [RFC PATCH] iov_iter: Convert iterate*() to inline funcs
Date: Sat, 12 Aug 2023 11:38:29 +0800 [thread overview]
Message-ID: <202308121101.bFTnfifW-lkp@intel.com> (raw)
In-Reply-To: <3710261.1691764329@warthog.procyon.org.uk>
Hi David,
[This is a private test report for your RFC patch.]
kernel test robot noticed the following build warnings:
[auto build test WARNING on linus/master]
[also build test WARNING on v6.5-rc5]
[cannot apply to hch-configfs/for-next next-20230809]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/David-Howells/iov_iter-Convert-iterate-to-inline-funcs/20230811-224036
base: linus/master
patch link: https://lore.kernel.org/r/3710261.1691764329%40warthog.procyon.org.uk
patch subject: [RFC PATCH] iov_iter: Convert iterate*() to inline funcs
config: hexagon-randconfig-r026-20230812 (https://download.01.org/0day-ci/archive/20230812/202308121101.bFTnfifW-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce: (https://download.01.org/0day-ci/archive/20230812/202308121101.bFTnfifW-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/202308121101.bFTnfifW-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from lib/iov_iter.c:4:
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:13:
In file included from arch/hexagon/include/asm/io.h:334:
include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
547 | val = __raw_readb(PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
560 | 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'
37 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
| ^
In file included from lib/iov_iter.c:4:
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:13:
In file included from arch/hexagon/include/asm/io.h:334:
include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
573 | 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'
35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
| ^
In file included from lib/iov_iter.c:4:
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:13:
In file included from arch/hexagon/include/asm/io.h:334:
include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
584 | __raw_writeb(value, PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
594 | __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
604 | __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
>> lib/iov_iter.c:162:11: warning: comparison of distinct pointer types ('typeof (flen) *' (aka 'unsigned int *') and 'typeof ((1UL << 14) - ((unsigned long)(offset) & ~(~((1 << 14) - 1)))) *' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types]
162 | part = min(flen, PAGE_SIZE - offset_in_page(offset));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:67:19: note: expanded from macro 'min'
67 | #define min(x, y) __careful_cmp(x, y, <)
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:36:24: note: expanded from macro '__careful_cmp'
36 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~~~~~~~
include/linux/minmax.h:26:4: note: expanded from macro '__safe_cmp'
26 | (__typecheck(x, y) && __no_side_effects(x, y))
| ^~~~~~~~~~~~~~~~~
include/linux/minmax.h:20:28: note: expanded from macro '__typecheck'
20 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
| ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
7 warnings generated.
vim +162 lib/iov_iter.c
133
134 static __always_inline
135 size_t iterate_xarray(struct iov_iter *iter, size_t len, void *priv, __wsum *csum,
136 iov_step_f step)
137 {
138 struct folio *folio;
139 size_t progress = 0;
140 loff_t start = iter->xarray_start + iter->iov_offset;
141 pgoff_t index = start / PAGE_SIZE;
142 XA_STATE(xas, iter->xarray, index);
143
144 rcu_read_lock();
145 xas_for_each(&xas, folio, ULONG_MAX) {
146 size_t remain, consumed, offset, part, flen;
147
148 if (xas_retry(&xas, folio))
149 continue;
150 if (WARN_ON(xa_is_value(folio)))
151 break;
152 if (WARN_ON(folio_test_hugetlb(folio)))
153 break;
154
155 offset = offset_in_folio(folio, start);
156 flen = min(folio_size(folio) - offset, len);
157 start += flen;
158
159 while (flen) {
160 void *base = kmap_local_folio(folio, offset);
161
> 162 part = min(flen, PAGE_SIZE - offset_in_page(offset));
163 remain = step(base, progress, part, priv, csum);
164 kunmap_local(base);
165
166 consumed = part - remain;
167 progress += consumed;
168 len -= consumed;
169
170 if (remain || len == 0)
171 goto out;
172 flen -= consumed;
173 offset += consumed;
174 }
175 }
176
177 out:
178 rcu_read_unlock();
179 iter->iov_offset += progress;
180 iter->count -= progress;
181 return progress;
182 }
183
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2023-08-12 3:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-11 14:32 [RFC PATCH] iov_iter: Convert iterate*() to inline funcs David Howells
2023-08-11 16:38 ` Linus Torvalds
2023-08-11 17:07 ` David Howells
2023-08-11 18:08 ` Linus Torvalds
2023-08-14 13:13 ` David Howells
2023-08-12 3:38 ` kernel test robot [this message]
2023-08-14 13:23 ` Matthew Wilcox
2023-08-14 16:46 ` kernel test robot
2023-08-14 16:57 ` kernel test robot
2023-08-15 11:12 ` David Laight
2023-08-15 12:51 ` David Howells
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=202308121101.bFTnfifW-lkp@intel.com \
--to=lkp@intel.com \
--cc=dhowells@redhat.com \
--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 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.