[mac80211-next:master 9/11] net/wireless/./trace.h:3637:30: warning: implicit conversion from 'enum nl80211_commands' to 'enum nl80211_bss_scan_width'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master
head: f50d2ff8f016b79a2ff4acd5943a1eda40c545d4
commit: 0d2ab3aea50bb02ff0c9c3d53c7b2b4b21cdd59d [9/11] nl80211: add support for BSS coloring
config: arc-randconfig-r043-20210816 (attached as .config)
compiler: arc-elf-gcc (GCC) 11.2.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://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git/c...
git remote add mac80211-next https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git
git fetch --no-tags mac80211-next master
git checkout 0d2ab3aea50bb02ff0c9c3d53c7b2b4b21cdd59d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/trace/define_trace.h:102,
from net/wireless/trace.h:3652,
from net/wireless/trace.c:5:
net/wireless/./trace.h: In function 'trace_event_raw_event_cfg80211_bss_color_notify':
>> net/wireless/./trace.h:3637:30: warning: implicit conversion from 'enum nl80211_commands' to 'enum nl80211_bss_scan_width' [-Wenum-conversion]
3637 | __entry->cmd = cmd;
| ^
include/trace/trace_events.h:721:11: note: in definition of macro 'DECLARE_EVENT_CLASS'
721 | { assign; } \
| ^~~~~~
include/trace/trace_events.h:79:30: note: in expansion of macro 'PARAMS'
79 | PARAMS(assign), \
| ^~~~~~
net/wireless/./trace.h:3624:1: note: in expansion of macro 'TRACE_EVENT'
3624 | TRACE_EVENT(cfg80211_bss_color_notify,
| ^~~~~~~~~~~
net/wireless/./trace.h:3635:9: note: in expansion of macro 'TP_fast_assign'
3635 | TP_fast_assign(
| ^~~~~~~~~~~~~~
vim +3637 net/wireless/./trace.h
3623
3624 TRACE_EVENT(cfg80211_bss_color_notify,
3625 TP_PROTO(struct net_device *netdev,
3626 enum nl80211_commands cmd,
3627 u8 count, u64 color_bitmap),
3628 TP_ARGS(netdev, cmd, count, color_bitmap),
3629 TP_STRUCT__entry(
3630 NETDEV_ENTRY
3631 __field(enum nl80211_bss_scan_width, cmd)
3632 __field(u8, count)
3633 __field(u64, color_bitmap)
3634 ),
3635 TP_fast_assign(
3636 NETDEV_ASSIGN;
> 3637 __entry->cmd = cmd;
3638 __entry->count = count;
3639 __entry->color_bitmap = color_bitmap;
3640 ),
3641 TP_printk(NETDEV_PR_FMT ", cmd: %x, count: %u, bitmap: %llx",
3642 NETDEV_PR_ARG, __entry->cmd, __entry->count,
3643 __entry->color_bitmap)
3644 );
3645
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
Re: [PATCH] fix slab-out-of-bounds Write in betop_probe
by kernel test robot
Hi "F.A.Sulaiman",
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on hid/for-next]
[also build test WARNING on 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/F-A-Sulaiman/fix-slab-out-of-bou...
base: https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git for-next
config: x86_64-randconfig-c007-20210816 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 44d0a99a12ec7ead4d2f5ef649ba05b40f6d463d)
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/8fc4d7961e182bc2992bee548fa3c33b6...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review F-A-Sulaiman/fix-slab-out-of-bounds-Write-in-betop_probe/20210817-041818
git checkout 8fc4d7961e182bc2992bee548fa3c33b628ffadd
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
set_temp_reg(HYST, temp_hyst);
^
drivers/hwmon/asb100.c:443:19: note: expanded from macro 'set_temp_reg'
data->reg[nr] = LM75_TEMP_TO_REG(val); \
^~~~~~~~~~~~~~~~~~~~~
drivers/hwmon/lm75.h:27:14: note: Assuming '__UNIQUE_ID___x271' is <= '__UNIQUE_ID___y272'
int ntemp = clamp_val(temp, LM75_TEMP_MIN, LM75_TEMP_MAX);
^
include/linux/minmax.h:137:32: note: expanded from macro 'clamp_val'
#define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:124:48: note: expanded from macro 'clamp_t'
#define clamp_t(type, val, lo, hi) min_t(type, max_t(type, val, lo), hi)
~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:112:27: note: expanded from macro 'max_t'
#define max_t(type, x, y) __careful_cmp((type)(x), (type)(y), >)
^
note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/minmax.h:104:48: note: expanded from macro 'min_t'
#define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
include/linux/minmax.h:38:14: note: expanded from macro '__careful_cmp'
__cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op))
~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:31:25: note: expanded from macro '__cmp_once'
typeof(x) unique_x = (x); \
^
drivers/hwmon/lm75.h:27:14: note: '?' condition is false
int ntemp = clamp_val(temp, LM75_TEMP_MIN, LM75_TEMP_MAX);
^
include/linux/minmax.h:137:32: note: expanded from macro 'clamp_val'
#define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi)
^
include/linux/minmax.h:124:48: note: expanded from macro 'clamp_t'
#define clamp_t(type, val, lo, hi) min_t(type, max_t(type, val, lo), hi)
^
include/linux/minmax.h:112:27: note: expanded from macro 'max_t'
#define max_t(type, x, y) __careful_cmp((type)(x), (type)(y), >)
^
include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp'
__cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op))
^
include/linux/minmax.h:33:3: note: expanded from macro '__cmp_once'
__cmp(unique_x, unique_y, op); })
^
include/linux/minmax.h:28:26: note: expanded from macro '__cmp'
#define __cmp(x, y, op) ((x) op (y) ? (x) : (y))
^
drivers/hwmon/lm75.h:27:14: note: '__UNIQUE_ID___x273' is < '__UNIQUE_ID___y274'
int ntemp = clamp_val(temp, LM75_TEMP_MIN, LM75_TEMP_MAX);
^
include/linux/minmax.h:137:32: note: expanded from macro 'clamp_val'
#define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:124:36: note: expanded from macro 'clamp_t'
#define clamp_t(type, val, lo, hi) min_t(type, max_t(type, val, lo), hi)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:104:27: note: expanded from macro 'min_t'
#define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp'
__cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:33:3: note: expanded from macro '__cmp_once'
__cmp(unique_x, unique_y, op); })
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:28:26: note: expanded from macro '__cmp'
#define __cmp(x, y, op) ((x) op (y) ? (x) : (y))
^~~
drivers/hwmon/lm75.h:27:14: note: '?' condition is true
int ntemp = clamp_val(temp, LM75_TEMP_MIN, LM75_TEMP_MAX);
^
include/linux/minmax.h:137:32: note: expanded from macro 'clamp_val'
#define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi)
^
include/linux/minmax.h:124:36: note: expanded from macro 'clamp_t'
#define clamp_t(type, val, lo, hi) min_t(type, max_t(type, val, lo), hi)
^
include/linux/minmax.h:104:27: note: expanded from macro 'min_t'
#define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
^
include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp'
__cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op))
^
include/linux/minmax.h:33:3: note: expanded from macro '__cmp_once'
__cmp(unique_x, unique_y, op); })
^
include/linux/minmax.h:28:26: note: expanded from macro '__cmp'
#define __cmp(x, y, op) ((x) op (y) ? (x) : (y))
^
drivers/hwmon/lm75.h:29:12: note: 'ntemp' is < 0
ntemp += (ntemp < 0 ? -250 : 250);
^~~~~
drivers/hwmon/lm75.h:29:12: note: '?' condition is true
drivers/hwmon/lm75.h:30:29: note: The result of the left shift is undefined because the left operand is negative
return (u16)((ntemp / 500) << 7);
~~~~~~~~~~~~~ ^
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
>> drivers/hid/hid-betopff.c:127:2: warning: Value stored to 'dev' is never read [clang-analyzer-deadcode.DeadStores]
dev = hidinput->input;
^ ~~~~~~~~~~~~~~~
drivers/hid/hid-betopff.c:127:2: note: Value stored to 'dev' is never read
dev = hidinput->input;
^ ~~~~~~~~~~~~~~~
Suppressed 4 warnings (3 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
include/linux/hid.h:1007:9: warning: Access to field 'name' results in a dereference of a null pointer (loaded from variable 'input') [clang-analyzer-core.NullDereference]
input->name, c, type);
^
drivers/hid/hid-corsair.c:630:6: note: Assuming the condition is false
if ((usage->hid & HID_USAGE_PAGE) != HID_UP_KEYBOARD)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-corsair.c:630:2: note: Taking false branch
if ((usage->hid & HID_USAGE_PAGE) != HID_UP_KEYBOARD)
^
drivers/hid/hid-corsair.c:634:6: note: 'gkey' is not equal to 0
if (gkey != 0) {
^~~~
drivers/hid/hid-corsair.c:634:2: note: Taking true branch
if (gkey != 0) {
^
drivers/hid/hid-corsair.c:635:3: note: Calling 'hid_map_usage_clear'
hid_map_usage_clear(input, usage, bit, max, EV_KEY,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/hid.h:1035:2: note: Calling 'hid_map_usage'
hid_map_usage(hidinput, usage, bit, max, type, c);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/hid.h:982:2: note: 'input' initialized here
struct input_dev *input = hidinput->input;
^~~~~~~~~~~~~~~~~~~~~~~
include/linux/hid.h:986:2: note: Control jumps to 'case 1:' at line 995
switch (type) {
^
include/linux/hid.h:998:3: note: Execution continues on line 1005
break;
^
include/linux/hid.h:1005:15: note: Assuming 'c' is <= 'limit'
if (unlikely(c > limit || !bmap)) {
^
include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
include/linux/hid.h:1005:15: note: Left side of '||' is false
if (unlikely(c > limit || !bmap)) {
^
include/linux/hid.h:1005:28: note: Assuming 'bmap' is null
if (unlikely(c > limit || !bmap)) {
^
include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
include/linux/hid.h:1005:28: note: Assuming pointer value is null
if (unlikely(c > limit || !bmap)) {
^
include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
include/linux/hid.h:1005:2: note: Taking true branch
if (unlikely(c > limit || !bmap)) {
^
include/linux/hid.h:1006:3: note: Assuming the condition is true
pr_warn_ratelimited("%s: Invalid code %d type %d\n",
^
include/linux/printk.h:574:2: note: expanded from macro 'pr_warn_ratelimited'
printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:557:6: note: expanded from macro 'printk_ratelimited'
if (__ratelimit(&_rs)) \
^~~~~~~~~~~~~~~~~
include/linux/ratelimit_types.h:41:28: note: expanded from macro '__ratelimit'
#define __ratelimit(state) ___ratelimit(state, __func__)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/hid.h:1006:3: note: Taking true branch
pr_warn_ratelimited("%s: Invalid code %d type %d\n",
^
include/linux/printk.h:574:2: note: expanded from macro 'pr_warn_ratelimited'
printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
^
include/linux/printk.h:557:2: note: expanded from macro 'printk_ratelimited'
if (__ratelimit(&_rs)) \
^
include/linux/hid.h:1007:9: note: Access to field 'name' results in a dereference of a null pointer (loaded from variable 'input')
input->name, c, type);
^
include/linux/printk.h:574:49: note: expanded from macro 'pr_warn_ratelimited'
printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~
include/linux/printk.h:558:17: note: expanded from macro 'printk_ratelimited'
printk(fmt, ##__VA_ARGS__); \
^~~~~~~~~~~
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
kernel/static_call.c:275:47: warning: Access to field 'func' results in a dereference of a null pointer (loaded from variable 'key') [clang-analyzer-core.NullDereference]
arch_static_call_transform(site_addr, NULL, key->func,
vim +/dev +127 drivers/hid/hid-betopff.c
114
115 static int betop_probe(struct hid_device *hdev, const struct hid_device_id *id)
116 {
117 struct hid_input *hidinput;
118 struct input_dev *dev;
119 int ret;
120
121 if (list_empty(&hdev->inputs)) {
122 hid_err(hdev, "no inputs found\n");
123 return -ENODEV;
124 }
125
126 hidinput = list_first_entry(&hdev->inputs, struct hid_input, list);
> 127 dev = hidinput->input;
128
129 if (id->driver_data)
130 hdev->quirks |= HID_QUIRK_MULTI_INPUT;
131
132 ret = hid_parse(hdev);
133 if (ret) {
134 hid_err(hdev, "parse failed\n");
135 goto err;
136 }
137
138 ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT & ~HID_CONNECT_FF);
139 if (ret) {
140 hid_err(hdev, "hw start failed\n");
141 goto err;
142 }
143
144 betopff_init(hdev);
145
146 return 0;
147 err:
148 return ret;
149 }
150
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
Re: [PATCH 3/7] block: copy offload support infrastructure
by kernel test robot
Hi SelvaKumar,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on block/for-next]
[also build test WARNING on dm/for-next linus/master v5.14-rc6 next-20210817]
[cannot apply to linux-nvme/for-next]
[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/SelvaKumar-S/block-make-bio_map_...
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: hexagon-randconfig-r013-20210816 (attached as .config)
compiler: clang version 12.0.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/35fc502a7f20a7cd42432cee2777a621c...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review SelvaKumar-S/block-make-bio_map_kern-non-static/20210817-193111
git checkout 35fc502a7f20a7cd42432cee2777a621c40a3bd3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=hexagon
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> block/blk-lib.c:197:5: warning: no previous prototype for function 'blk_copy_offload_submit_bio' [-Wmissing-prototypes]
int blk_copy_offload_submit_bio(struct block_device *bdev,
^
block/blk-lib.c:197:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int blk_copy_offload_submit_bio(struct block_device *bdev,
^
static
>> block/blk-lib.c:250:5: warning: no previous prototype for function 'blk_copy_offload_scc' [-Wmissing-prototypes]
int blk_copy_offload_scc(struct block_device *src_bdev, int nr_srcs,
^
block/blk-lib.c:250:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int blk_copy_offload_scc(struct block_device *src_bdev, int nr_srcs,
^
static
2 warnings generated.
vim +/blk_copy_offload_submit_bio +197 block/blk-lib.c
196
> 197 int blk_copy_offload_submit_bio(struct block_device *bdev,
198 struct blk_copy_payload *payload, int payload_size,
199 struct cio *cio, gfp_t gfp_mask)
200 {
201 struct request_queue *q = bdev_get_queue(bdev);
202 struct bio *bio;
203
204 bio = bio_map_kern(q, payload, payload_size, gfp_mask);
205 if (IS_ERR(bio))
206 return PTR_ERR(bio);
207
208 bio_set_dev(bio, bdev);
209 bio->bi_opf = REQ_OP_COPY | REQ_NOMERGE;
210 bio->bi_iter.bi_sector = payload->dest;
211 bio->bi_end_io = cio_bio_end_io;
212 bio->bi_private = cio;
213 atomic_inc(&cio->refcount);
214 submit_bio(bio);
215
216 return 0;
217 }
218
219 /* Go through all the enrties inside user provided payload, and determine the
220 * maximum number of entries in a payload, based on device's scc-limits.
221 */
222 static inline int blk_max_payload_entries(int nr_srcs, struct range_entry *rlist,
223 int max_nr_srcs, sector_t max_copy_range_sectors, sector_t max_copy_len)
224 {
225 sector_t range_len, copy_len = 0, remaining = 0;
226 int ri = 0, pi = 1, max_pi = 0;
227
228 for (ri = 0; ri < nr_srcs; ri++) {
229 for (remaining = rlist[ri].len; remaining > 0; remaining -= range_len) {
230 range_len = min3(remaining, max_copy_range_sectors,
231 max_copy_len - copy_len);
232 pi++;
233 copy_len += range_len;
234
235 if ((pi == max_nr_srcs) || (copy_len == max_copy_len)) {
236 max_pi = max(max_pi, pi);
237 pi = 1;
238 copy_len = 0;
239 }
240 }
241 }
242
243 return max(max_pi, pi);
244 }
245
246 /*
247 * blk_copy_offload_scc - Use device's native copy offload feature
248 * Go through user provide payload, prepare new payload based on device's copy offload limits.
249 */
> 250 int blk_copy_offload_scc(struct block_device *src_bdev, int nr_srcs,
251 struct range_entry *rlist, struct block_device *dest_bdev,
252 sector_t dest, gfp_t gfp_mask)
253 {
254 struct request_queue *q = bdev_get_queue(dest_bdev);
255 struct cio *cio = NULL;
256 struct blk_copy_payload *payload;
257 sector_t range_len, copy_len = 0, remaining = 0;
258 sector_t src_blk, cdest = dest;
259 sector_t max_copy_range_sectors, max_copy_len;
260 int ri = 0, pi = 0, ret = 0, payload_size, max_pi, max_nr_srcs;
261
262 cio = kzalloc(sizeof(struct cio), GFP_KERNEL);
263 if (!cio)
264 return -ENOMEM;
265 atomic_set(&cio->refcount, 0);
266
267 max_nr_srcs = q->limits.max_copy_nr_ranges;
268 max_copy_range_sectors = q->limits.max_copy_range_sectors;
269 max_copy_len = q->limits.max_copy_sectors;
270
271 max_pi = blk_max_payload_entries(nr_srcs, rlist, max_nr_srcs,
272 max_copy_range_sectors, max_copy_len);
273 payload_size = struct_size(payload, range, max_pi);
274
275 payload = kvmalloc(payload_size, gfp_mask);
276 if (!payload) {
277 ret = -ENOMEM;
278 goto free_cio;
279 }
280 payload->src_bdev = src_bdev;
281
282 for (ri = 0; ri < nr_srcs; ri++) {
283 for (remaining = rlist[ri].len, src_blk = rlist[ri].src; remaining > 0;
284 remaining -= range_len, src_blk += range_len) {
285
286 range_len = min3(remaining, max_copy_range_sectors,
287 max_copy_len - copy_len);
288 payload->range[pi].len = range_len;
289 payload->range[pi].src = src_blk;
290 pi++;
291 copy_len += range_len;
292
293 /* Submit current payload, if crossing device copy limits */
294 if ((pi == max_nr_srcs) || (copy_len == max_copy_len)) {
295 payload->dest = cdest;
296 payload->copy_nr_ranges = pi;
297 ret = blk_copy_offload_submit_bio(dest_bdev, payload,
298 payload_size, cio, gfp_mask);
299 if (ret)
300 goto free_payload;
301
302 /* reset index, length and allocate new payload */
303 pi = 0;
304 cdest += copy_len;
305 copy_len = 0;
306 payload = kvmalloc(payload_size, gfp_mask);
307 if (!payload) {
308 ret = -ENOMEM;
309 goto free_cio;
310 }
311 payload->src_bdev = src_bdev;
312 }
313 }
314 }
315
316 if (pi) {
317 payload->dest = cdest;
318 payload->copy_nr_ranges = pi;
319 ret = blk_copy_offload_submit_bio(dest_bdev, payload, payload_size, cio, gfp_mask);
320 if (ret)
321 goto free_payload;
322 }
323
324 /* Wait for completion of all IO's*/
325 ret = cio_await_completion(cio);
326
327 return ret;
328
329 free_payload:
330 kvfree(payload);
331 free_cio:
332 cio_await_completion(cio);
333 return ret;
334 }
335
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[linux-next:master 285/8516] drivers/gpu/drm/i915/gem/i915_gem_ttm.c:360:55: warning: unused parameter 'bdev'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 9803fb968c8c2e1283f67b3baeb88e0adba435b4
commit: cf3e3e86d77970211e0983130e896ae242601003 [285/8516] drm/i915: Use ttm mmap handling for ttm bo's.
config: i386-randconfig-r021-20210816 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 44d0a99a12ec7ead4d2f5ef649ba05b40f6d463d)
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://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout cf3e3e86d77970211e0983130e896ae242601003
# 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(a)intel.com>
All warnings (new ones prefixed by >>):
^
include/linux/pci.h:2156:71: warning: unused parameter 'probe' [-Wunused-parameter]
static inline void pci_vf_drivers_autoprobe(struct pci_dev *dev, bool probe) { }
^
In file included from drivers/gpu/drm/i915/gem/i915_gem_ttm.c:9:
In file included from drivers/gpu/drm/i915/i915_drv.h:84:
In file included from drivers/gpu/drm/i915/gt/intel_engine.h:17:
In file included from drivers/gpu/drm/i915/gt/intel_gt_types.h:18:
In file included from drivers/gpu/drm/i915/gt/uc/intel_uc.h:9:
drivers/gpu/drm/i915/gt/uc/intel_guc.h:109:59: warning: unused parameter 'guc' [-Wunused-parameter]
static inline u32 intel_guc_ggtt_offset(struct intel_guc *guc,
^
In file included from drivers/gpu/drm/i915/gem/i915_gem_ttm.c:9:
In file included from drivers/gpu/drm/i915/i915_drv.h:84:
In file included from drivers/gpu/drm/i915/gt/intel_engine.h:17:
In file included from drivers/gpu/drm/i915/gt/intel_gt_types.h:18:
In file included from drivers/gpu/drm/i915/gt/uc/intel_uc.h:10:
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.h:24:72: warning: unused parameter 'guc' [-Wunused-parameter]
static inline bool intel_guc_submission_is_supported(struct intel_guc *guc)
^
In file included from drivers/gpu/drm/i915/gem/i915_gem_ttm.c:9:
In file included from drivers/gpu/drm/i915/i915_drv.h:101:
drivers/gpu/drm/i915/i915_gpu_error.h:276:43: warning: unused parameter 'gt' [-Wunused-parameter]
i915_capture_error_state(struct intel_gt *gt, intel_engine_mask_t engine_mask)
^
drivers/gpu/drm/i915/i915_gpu_error.h:276:67: warning: unused parameter 'engine_mask' [-Wunused-parameter]
i915_capture_error_state(struct intel_gt *gt, intel_engine_mask_t engine_mask)
^
drivers/gpu/drm/i915/i915_gpu_error.h:281:50: warning: unused parameter 'i915' [-Wunused-parameter]
i915_gpu_coredump_alloc(struct drm_i915_private *i915, gfp_t gfp)
^
drivers/gpu/drm/i915/i915_gpu_error.h:281:62: warning: unused parameter 'gfp' [-Wunused-parameter]
i915_gpu_coredump_alloc(struct drm_i915_private *i915, gfp_t gfp)
^
drivers/gpu/drm/i915/i915_gpu_error.h:287:42: warning: unused parameter 'gt' [-Wunused-parameter]
intel_gt_coredump_alloc(struct intel_gt *gt, gfp_t gfp)
^
drivers/gpu/drm/i915/i915_gpu_error.h:287:52: warning: unused parameter 'gfp' [-Wunused-parameter]
intel_gt_coredump_alloc(struct intel_gt *gt, gfp_t gfp)
^
drivers/gpu/drm/i915/i915_gpu_error.h:293:53: warning: unused parameter 'engine' [-Wunused-parameter]
intel_engine_coredump_alloc(struct intel_engine_cs *engine, gfp_t gfp)
^
drivers/gpu/drm/i915/i915_gpu_error.h:293:67: warning: unused parameter 'gfp' [-Wunused-parameter]
intel_engine_coredump_alloc(struct intel_engine_cs *engine, gfp_t gfp)
^
drivers/gpu/drm/i915/i915_gpu_error.h:299:65: warning: unused parameter 'ee' [-Wunused-parameter]
intel_engine_coredump_add_request(struct intel_engine_coredump *ee,
^
drivers/gpu/drm/i915/i915_gpu_error.h:300:28: warning: unused parameter 'rq' [-Wunused-parameter]
struct i915_request *rq,
^
drivers/gpu/drm/i915/i915_gpu_error.h:301:13: warning: unused parameter 'gfp' [-Wunused-parameter]
gfp_t gfp)
^
drivers/gpu/drm/i915/i915_gpu_error.h:307:61: warning: unused parameter 'ee' [-Wunused-parameter]
intel_engine_coredump_add_vma(struct intel_engine_coredump *ee,
^
drivers/gpu/drm/i915/i915_gpu_error.h:308:43: warning: unused parameter 'capture' [-Wunused-parameter]
struct intel_engine_capture_vma *capture,
^
drivers/gpu/drm/i915/i915_gpu_error.h:309:36: warning: unused parameter 'compress' [-Wunused-parameter]
struct i915_vma_compress *compress)
^
drivers/gpu/drm/i915/i915_gpu_error.h:314:52: warning: unused parameter 'gt' [-Wunused-parameter]
i915_vma_capture_prepare(struct intel_gt_coredump *gt)
^
drivers/gpu/drm/i915/i915_gpu_error.h:320:51: warning: unused parameter 'gt' [-Wunused-parameter]
i915_vma_capture_finish(struct intel_gt_coredump *gt,
^
drivers/gpu/drm/i915/i915_gpu_error.h:321:30: warning: unused parameter 'compress' [-Wunused-parameter]
struct i915_vma_compress *compress)
^
drivers/gpu/drm/i915/i915_gpu_error.h:326:50: warning: unused parameter 'error' [-Wunused-parameter]
i915_error_state_store(struct i915_gpu_coredump *error)
^
drivers/gpu/drm/i915/i915_gpu_error.h:330:68: warning: unused parameter 'gpu' [-Wunused-parameter]
static inline void i915_gpu_coredump_put(struct i915_gpu_coredump *gpu)
^
drivers/gpu/drm/i915/i915_gpu_error.h:335:49: warning: unused parameter 'i915' [-Wunused-parameter]
i915_first_error_state(struct drm_i915_private *i915)
^
drivers/gpu/drm/i915/i915_gpu_error.h:340:68: warning: unused parameter 'i915' [-Wunused-parameter]
static inline void i915_reset_error_state(struct drm_i915_private *i915)
^
drivers/gpu/drm/i915/i915_gpu_error.h:344:70: warning: unused parameter 'i915' [-Wunused-parameter]
static inline void i915_disable_error_state(struct drm_i915_private *i915,
^
drivers/gpu/drm/i915/i915_gpu_error.h:345:14: warning: unused parameter 'err' [-Wunused-parameter]
int err)
^
drivers/gpu/drm/i915/gem/i915_gem_ttm.c:138:60: warning: unused parameter 'bo' [-Wunused-parameter]
static void i915_ttm_evict_flags(struct ttm_buffer_object *bo,
^
drivers/gpu/drm/i915/gem/i915_gem_ttm.c:285:61: warning: unused parameter 'evict' [-Wunused-parameter]
static int i915_ttm_move(struct ttm_buffer_object *bo, bool evict,
^
drivers/gpu/drm/i915/gem/i915_gem_ttm.c:288:23: warning: unused parameter 'hop' [-Wunused-parameter]
struct ttm_place *hop)
^
>> drivers/gpu/drm/i915/gem/i915_gem_ttm.c:360:55: warning: unused parameter 'bdev' [-Wunused-parameter]
static int i915_ttm_io_mem_reserve(struct ttm_device *bdev, struct ttm_resource *mem)
^
drivers/gpu/drm/i915/gem/i915_gem_ttm.c:437:28: warning: unused parameter 'st' [-Wunused-parameter]
struct sg_table *st)
^
1567 warnings and 1 error generated.
vim +/bdev +360 drivers/gpu/drm/i915/gem/i915_gem_ttm.c
359
> 360 static int i915_ttm_io_mem_reserve(struct ttm_device *bdev, struct ttm_resource *mem)
361 {
362 if (mem->mem_type < I915_PL_LMEM0)
363 return 0;
364
365 mem->bus.caching = ttm_write_combined;
366 mem->bus.is_iomem = true;
367
368 return 0;
369 }
370
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[hare-scsi-devel:eh-rework.v2 6/51] drivers/scsi/qla1280.c:1024:6: warning: variable 'rc' is used uninitialized whenever 'if' condition is false
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git eh-rework.v2
head: 7603e2e1f37e470064b8c865b5d6470137baa79b
commit: 88c5b1c5ddc2129c875bb310a20ed02e5e24e7fd [6/51] qla1280: separate out host reset function from qla1280_error_action()
config: x86_64-randconfig-a015-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://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git/commi...
git remote add hare-scsi-devel https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git
git fetch --no-tags hare-scsi-devel eh-rework.v2
git checkout 88c5b1c5ddc2129c875bb310a20ed02e5e24e7fd
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/scsi/qla1280.c:1024:6: warning: variable 'rc' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (qla1280_abort_isp(ha) != 0) { /* it's dead */
^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/qla1280.c:1032:9: note: uninitialized use occurs here
return rc;
^~
drivers/scsi/qla1280.c:1024:2: note: remove the 'if' if its condition is always true
if (qla1280_abort_isp(ha) != 0) { /* it's dead */
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/qla1280.c:1010:8: note: initialize the variable 'rc' to silence this warning
int rc;
^
= 0
1 warning generated.
vim +1024 drivers/scsi/qla1280.c
1002
1003 /**************************************************************************
1004 * qla1280_adapter_reset
1005 * Reset the specified adapter (both channels)
1006 **************************************************************************/
1007 static int
1008 qla1280_eh_adapter_reset(struct scsi_cmnd *cmd)
1009 {
1010 int rc;
1011 struct Scsi_Host *shost = cmd->device->host;
1012 struct scsi_qla_host *ha = (struct scsi_qla_host *)shost->hostdata;
1013
1014 spin_lock_irq(shost->host_lock);
1015 if (qla1280_verbose) {
1016 printk(KERN_INFO
1017 "scsi(%ld): Issued ADAPTER RESET\n",
1018 ha->host_no);
1019 printk(KERN_INFO "scsi(%ld): I/O processing will "
1020 "continue automatically\n", ha->host_no);
1021 }
1022 ha->flags.reset_active = 1;
1023
> 1024 if (qla1280_abort_isp(ha) != 0) { /* it's dead */
1025 rc = FAILED;
1026 }
1027
1028 ha->flags.reset_active = 0;
1029
1030 spin_unlock_irq(shost->host_lock);
1031
1032 return rc;
1033 }
1034
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
Re: [PATCH] drm/panel-simple: Add Vivax TPC-9150 panel v3
by kernel test robot
Hi Nikola,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on drm-tip/drm-tip drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master v5.14-rc6 next-20210817]
[cannot apply to drm/drm-next]
[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/Nikola-Pavlica/drm-panel-simple-...
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: arm64-randconfig-r025-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
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/0day-ci/linux/commit/b3b8de24d73c21a6e689abb123326d844...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Nikola-Pavlica/drm-panel-simple-Add-Vivax-TPC-9150-panel-v3/20210818-003804
git checkout b3b8de24d73c21a6e689abb123326d84425c877b
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/gpu/drm/panel/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/gpu/drm/panel/panel-simple.c:4386:16: error: use of undeclared identifier 'MEDIA_BUS_FMT_RGB666_1X24'
.bus_format = MEDIA_BUS_FMT_RGB666_1X24,
^
1 error generated.
vim +/MEDIA_BUS_FMT_RGB666_1X24 +4386 drivers/gpu/drm/panel/panel-simple.c
4377
4378 static const struct panel_desc vivax_tpc9150_panel = {
4379 .modes = &vivax_tpc9150_panel_mode,
4380 .num_modes = 1,
4381 .size = {
4382 .width = 200,
4383 .height = 115,
4384 },
4385 .bpc = 6,
> 4386 .bus_format = MEDIA_BUS_FMT_RGB666_1X24,
4387 .bus_flags = DRM_BUS_FLAG_DE_HIGH,
4388 .connector_type = DRM_MODE_CONNECTOR_LVDS,
4389 };
4390
4391
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
Re: [PATCH] drm/panel-simple: Add Vivax TPC-9150 panel v3
by kernel test robot
Hi Nikola,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on drm-tip/drm-tip drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master v5.14-rc6 next-20210817]
[cannot apply to drm/drm-next]
[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/Nikola-Pavlica/drm-panel-simple-...
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: arm-randconfig-r023-20210816 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.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/b3b8de24d73c21a6e689abb123326d844...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Nikola-Pavlica/drm-panel-simple-Add-Vivax-TPC-9150-panel-v3/20210818-003804
git checkout b3b8de24d73c21a6e689abb123326d84425c877b
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash drivers/gpu/drm/panel/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/gpu/drm/panel/panel-simple.c:4386:23: error: 'MEDIA_BUS_FMT_RGB666_1X24' undeclared here (not in a function); did you mean 'MEDIA_BUS_FMT_RGB666_1X18'?
4386 | .bus_format = MEDIA_BUS_FMT_RGB666_1X24,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| MEDIA_BUS_FMT_RGB666_1X18
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for QCOM_SCM
Depends on (ARM || ARM64) && HAVE_ARM_SMCCC
Selected by
- ARM_QCOM_SPM_CPUIDLE && CPU_IDLE && (ARM || ARM64) && (ARCH_QCOM || COMPILE_TEST && !ARM64 && MMU
vim +4386 drivers/gpu/drm/panel/panel-simple.c
4377
4378 static const struct panel_desc vivax_tpc9150_panel = {
4379 .modes = &vivax_tpc9150_panel_mode,
4380 .num_modes = 1,
4381 .size = {
4382 .width = 200,
4383 .height = 115,
4384 },
4385 .bpc = 6,
> 4386 .bus_format = MEDIA_BUS_FMT_RGB666_1X24,
4387 .bus_flags = DRM_BUS_FLAG_DE_HIGH,
4388 .connector_type = DRM_MODE_CONNECTOR_LVDS,
4389 };
4390
4391
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[android-common:android12-5.10-2021-08 7519/10754] userfaultfd.c:373:45: error: expected ')'
by kernel test robot
tree: https://android.googlesource.com/kernel/common android12-5.10-2021-08
head: 62a5f8e3accffd371afdff1652975e80d7dab30e
commit: 357700fcc3b51b66e2a790c5bb036d97916086af [7519/10754] FROMGIT: userfaultfd/selftests: add test exercising minor fault handling
config: i386-randconfig-a012-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
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android12-5.10-2021-08
git checkout 357700fcc3b51b66e2a790c5bb036d97916086af
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=i386 SHELL=/bin/bash -C tools/testing/selftests/vm install
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> userfaultfd.c:373:45: error: expected ')'
"UFFDIO_CONTINUE failed for address 0x%" PRIx64 "\n",
^
userfaultfd.c:372:10: note: to match this '('
fprintf(stderr,
^
>> userfaultfd.c:597:3: error: use of undeclared identifier 'uint8_t'
uint8_t *area;
^
>> userfaultfd.c:597:12: error: use of undeclared identifier 'area'
uint8_t *area;
^
userfaultfd.c:612:3: error: use of undeclared identifier 'area'
area = (uint8_t *)(area_dst +
^
>> userfaultfd.c:612:20: error: expected expression
area = (uint8_t *)(area_dst +
^
userfaultfd.c:612:11: error: use of undeclared identifier 'uint8_t'
area = (uint8_t *)(area_dst +
^
userfaultfd.c:616:4: error: use of undeclared identifier 'area'
area[b] = ~area[b];
^
userfaultfd.c:616:15: error: use of undeclared identifier 'area'
area[b] = ~area[b];
^
>> userfaultfd.c:827:33: error: unknown type name 'uint64_t'
static int userfaultfd_open_ext(uint64_t *features)
^
userfaultfd.c:854:29: error: unknown type name 'uint64_t'
static int userfaultfd_open(uint64_t features)
^
userfaultfd.c:1288:9: error: expected ';' after expression
uint8_t expected_byte;
^
;
userfaultfd.c:1288:2: error: use of undeclared identifier 'uint8_t'
uint8_t expected_byte;
^
userfaultfd.c:1288:10: error: use of undeclared identifier 'expected_byte'
uint8_t expected_byte;
^
userfaultfd.c:1292:10: error: expected ';' after expression
uint64_t features = UFFD_FEATURE_MINOR_HUGETLBFS;
^
;
userfaultfd.c:1292:2: error: use of undeclared identifier 'uint64_t'
uint64_t features = UFFD_FEATURE_MINOR_HUGETLBFS;
^
userfaultfd.c:1292:11: error: use of undeclared identifier 'features'
uint64_t features = UFFD_FEATURE_MINOR_HUGETLBFS;
^
userfaultfd.c:1303:28: error: use of undeclared identifier 'features'
if (userfaultfd_open_ext(&features))
^
userfaultfd.c:1306:8: error: use of undeclared identifier 'features'
if (!(features & UFFD_FEATURE_MINOR_HUGETLBFS)) {
^
userfaultfd.c:1332:44: error: use of undeclared identifier 'uint8_t'
memset(area_dst + (p * page_size), p % ((uint8_t)-1),
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[linux-next:master 3921/8516] include/linux/seq_file.h:247:9: warning: 'strncpy' output may be truncated copying 4 bytes from a string of length 4
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 9803fb968c8c2e1283f67b3baeb88e0adba435b4
commit: e37b3dd063a1a68e28a7cfaf77c84c472112e330 [3921/8516] s390: enable KCSAN
config: s390-randconfig-r044-20210817 (attached as .config)
compiler: s390-linux-gcc (GCC) 11.2.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://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout e37b3dd063a1a68e28a7cfaf77c84c472112e330
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/seq_file_net.h:5,
from include/net/net_namespace.h:179,
from include/linux/inet.h:42,
from fs/ocfs2/super.c:21:
fs/ocfs2/super.c: In function 'ocfs2_show_options':
>> include/linux/seq_file.h:247:9: warning: 'strncpy' output may be truncated copying 4 bytes from a string of length 4 [-Wstringop-truncation]
247 | strncpy(val_buf, value, length); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/ocfs2/super.c:1539:17: note: in expansion of macro 'seq_show_option_n'
1539 | seq_show_option_n(s, "cluster_stack", osb->osb_cluster_stack,
| ^~~~~~~~~~~~~~~~~
vim +/strncpy +247 include/linux/seq_file.h
a068acf2ee7769 Kees Cook 2015-09-04 233
a068acf2ee7769 Kees Cook 2015-09-04 234 /**
a068acf2ee7769 Kees Cook 2015-09-04 235 * seq_show_option_n - display mount options with appropriate escapes
a068acf2ee7769 Kees Cook 2015-09-04 236 * where @value must be a specific length.
a068acf2ee7769 Kees Cook 2015-09-04 237 * @m: the seq_file handle
a068acf2ee7769 Kees Cook 2015-09-04 238 * @name: the mount option name
a068acf2ee7769 Kees Cook 2015-09-04 239 * @value: the mount option name's value, cannot be NULL
a068acf2ee7769 Kees Cook 2015-09-04 240 * @length: the length of @value to display
a068acf2ee7769 Kees Cook 2015-09-04 241 *
a068acf2ee7769 Kees Cook 2015-09-04 242 * This is a macro since this uses "length" to define the size of the
a068acf2ee7769 Kees Cook 2015-09-04 243 * stack buffer.
a068acf2ee7769 Kees Cook 2015-09-04 244 */
a068acf2ee7769 Kees Cook 2015-09-04 245 #define seq_show_option_n(m, name, value, length) { \
a068acf2ee7769 Kees Cook 2015-09-04 246 char val_buf[length + 1]; \
a068acf2ee7769 Kees Cook 2015-09-04 @247 strncpy(val_buf, value, length); \
a068acf2ee7769 Kees Cook 2015-09-04 248 val_buf[length] = '\0'; \
a068acf2ee7769 Kees Cook 2015-09-04 249 seq_show_option(m, name, val_buf); \
a068acf2ee7769 Kees Cook 2015-09-04 250 }
a068acf2ee7769 Kees Cook 2015-09-04 251
:::::: The code at line 247 was first introduced by commit
:::::: a068acf2ee77693e0bf39d6e07139ba704f461c3 fs: create and use seq_show_option for escaping
:::::: TO: Kees Cook <keescook(a)chromium.org>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[ti:ti-rt-linux-5.10.y 6669/6833] drivers/net/ethernet/ti/prueth_lre.c:120:6: warning: no previous prototype for 'pru_spin_lock'
by kernel test robot
Hi Murali,
FYI, the error/warning still remains.
tree: git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-rt-linux-5.10.y
head: ac3657d2050406e974383b1490184f42a06b73cc
commit: d2e8eb5a46ec7216223407be3d3840648f554be0 [6669/6833] net: ti: prueth_core: hsr/prp: add HSR/PRP driver
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 11.2.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
git remote add ti git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git
git fetch --no-tags ti ti-rt-linux-5.10.y
git checkout d2e8eb5a46ec7216223407be3d3840648f554be0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/net/ethernet/ti/prueth_lre.c:120:6: warning: no previous prototype for 'pru_spin_lock' [-Wmissing-prototypes]
120 | void pru_spin_lock(struct node_tbl *nt)
| ^~~~~~~~~~~~~
>> drivers/net/ethernet/ti/prueth_lre.c:267:6: warning: no previous prototype for 'node_table_update_time' [-Wmissing-prototypes]
267 | void node_table_update_time(struct node_tbl *nt)
| ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/ti/prueth_lre.c:470:6: warning: no previous prototype for 'node_table_check_and_remove' [-Wmissing-prototypes]
470 | void node_table_check_and_remove(struct node_tbl *nt, u16 forget_time)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/ti/prueth_lre.c:530:6: warning: no previous prototype for 'pop_queue_process' [-Wmissing-prototypes]
530 | void pop_queue_process(struct prueth *prueth, spinlock_t *lock)
| ^~~~~~~~~~~~~~~~~
drivers/net/ethernet/ti/prueth_lre.c: In function 'prueth_lre_emac_rx_packets':
>> drivers/net/ethernet/ti/prueth_lre.c:706:43: warning: variable 'queue_desc_p' set but not used [-Wunused-but-set-variable]
706 | struct prueth_queue_desc __iomem *queue_desc_p;
| ^~~~~~~~~~~~
>> drivers/net/ethernet/ti/prueth_lre.c:705:50: warning: variable 'status_o' set but not used [-Wunused-but-set-variable]
705 | u8 overflow_cnt, overflow_cnt_o, status, status_o;
| ^~~~~~~~
>> drivers/net/ethernet/ti/prueth_lre.c:705:42: warning: variable 'status' set but not used [-Wunused-but-set-variable]
705 | u8 overflow_cnt, overflow_cnt_o, status, status_o;
| ^~~~~~
vim +/pru_spin_lock +120 drivers/net/ethernet/ti/prueth_lre.c
119
> 120 void pru_spin_lock(struct node_tbl *nt)
121 {
122 while (1) {
123 nt->nt_info->arm_lock = 1;
124 if (!nt->nt_info->fw_lock)
125 break;
126 nt->nt_info->arm_lock = 0;
127 }
128 }
129
130 static inline void pru_spin_unlock(struct node_tbl *nt)
131 {
132 nt->nt_info->arm_lock = 0;
133 }
134
135 int prueth_lre_nt_insert(struct prueth *prueth,
136 u8 *mac, int port, int sv_frame, int proto)
137 {
138 struct nt_queue_t *q = prueth->mac_queue;
139 unsigned long flags;
140 int ret = LRE_OK;
141
142 /* Will encounter a null mac_queue if we are in the middle of
143 * ndo_close. So check and return. Otherwise a kernel crash is
144 * seen when doing ifdown continuously.
145 */
146 if (!q)
147 return ret;
148
149 spin_lock_irqsave(&prueth->nt_lock, flags);
150 if (q->full) {
151 ret = LRE_ERR;
152 } else {
153 memcpy(q->nt_queue[q->wr_ind].mac, mac, ETH_ALEN);
154 q->nt_queue[q->wr_ind].sv_frame = sv_frame;
155 q->nt_queue[q->wr_ind].port_id = port;
156 q->nt_queue[q->wr_ind].proto = proto;
157
158 q->wr_ind++;
159 q->wr_ind &= (PRUETH_MAC_QUEUE_MAX - 1);
160 if (q->wr_ind == q->rd_ind)
161 q->full = true;
162 }
163 spin_unlock_irqrestore(&prueth->nt_lock, flags);
164
165 return ret;
166 }
167
168 static inline bool node_expired(struct node_tbl *nt, u16 node, u16 forget_time)
169 {
170 struct node_tbl_t nt_node = nt->nt_array->node_tbl[node];
171
172 return ((nt_node.time_last_seen_s > forget_time ||
173 nt_node.status & ICSS_LRE_NT_REM_NODE_TYPE_SANAB) &&
174 nt_node.time_last_seen_a > forget_time &&
175 nt_node.time_last_seen_b > forget_time);
176 }
177
178 #define IND_BIN_NO(x) nt->index_array->index_tbl[x].bin_no_entries
179 #define IND_BINOFS(x) nt->index_array->index_tbl[x].bin_offset
180 #define BIN_NODEOFS(x) nt->bin_array->bin_tbl[x].node_tbl_offset
181
182 static void _prueth_lre_init_node_table(struct prueth *prueth)
183 {
184 struct nt_queue_t *q = prueth->mac_queue;
185 struct node_tbl *nt = prueth->nt;
186 int j;
187
188 const struct prueth_fw_offsets *fw_offsets = prueth->fw_offsets;
189
190 nt->nt_array = prueth->mem[fw_offsets->nt_array_loc].va +
191 fw_offsets->nt_array_offset;
192 memset_io(nt->nt_array, 0, sizeof(struct node_tbl_t) *
193 fw_offsets->nt_array_max_entries);
194
195 nt->bin_array = prueth->mem[fw_offsets->bin_array_loc].va +
196 fw_offsets->bin_array_offset;
197 memset_io(nt->bin_array, 0, sizeof(struct bin_tbl_t) *
198 fw_offsets->bin_array_max_entries);
199
200 nt->index_array = prueth->mem[fw_offsets->index_array_loc].va +
201 fw_offsets->index_array_offset;
202 memset_io(nt->index_array, 0, sizeof(struct node_index_tbl_t) *
203 fw_offsets->index_array_max_entries);
204
205 nt->nt_info = prueth->mem[fw_offsets->nt_array_loc].va +
206 fw_offsets->nt_array_offset +
207 (sizeof(struct node_tbl_t) *
208 fw_offsets->nt_array_max_entries);
209 memset_io(nt->nt_info, 0, sizeof(struct node_tbl_info_t));
210
211 nt->nt_lre_cnt =
212 prueth->mem[PRUETH_MEM_SHARED_RAM].va + ICSS_LRE_CNT_NODES;
213 memset_io(nt->nt_lre_cnt, 0, sizeof(struct node_tbl_lre_cnt_t));
214
215 nt->nt_array_max_entries = fw_offsets->nt_array_max_entries;
216 nt->bin_array_max_entries = fw_offsets->bin_array_max_entries;
217 nt->index_array_max_entries = fw_offsets->index_array_max_entries;
218 nt->hash_mask = fw_offsets->hash_mask;
219
220 for (j = 0; j < fw_offsets->index_array_max_entries; j++)
221 IND_BINOFS(j) = fw_offsets->bin_array_max_entries;
222 for (j = 0; j < fw_offsets->bin_array_max_entries; j++)
223 BIN_NODEOFS(j) = fw_offsets->nt_array_max_entries;
224 for (j = 0; j < fw_offsets->nt_array_max_entries; j++)
225 nt->nt_array->node_tbl[j].entry_state = ICSS_LRE_NODE_FREE;
226
227 q->rd_ind = 0;
228 q->wr_ind = 0;
229 q->full = false;
230 }
231
232 static u16 find_free_bin(struct node_tbl *nt)
233 {
234 u16 j;
235
236 for (j = 0; j < nt->bin_array_max_entries; j++)
237 if (BIN_NODEOFS(j) == nt->nt_array_max_entries)
238 break;
239
240 return j;
241 }
242
243 /* find first free node table slot and write it to the next_free_slot */
244 static u16 next_free_slot_update(struct node_tbl *nt)
245 {
246 int j;
247
248 nt->nt_info->next_free_slot = nt->nt_array_max_entries;
249 for (j = 0; j < nt->nt_array_max_entries; j++) {
250 if (nt->nt_array->node_tbl[j].entry_state ==
251 ICSS_LRE_NODE_FREE) {
252 nt->nt_info->next_free_slot = j;
253 break;
254 }
255 }
256
257 return nt->nt_info->next_free_slot;
258 }
259
260 static void inc_time(u16 *t)
261 {
262 *t += 1;
263 if (*t > ICSS_LRE_MAX_FORGET_TIME)
264 *t = ICSS_LRE_MAX_FORGET_TIME;
265 }
266
> 267 void node_table_update_time(struct node_tbl *nt)
268 {
269 int j;
270 u16 ofs;
271 struct nt_array_t *nt_arr = nt->nt_array;
272 struct node_tbl_t *node;
273
274 for (j = 0; j < nt->bin_array_max_entries; j++) {
275 ofs = nt->bin_array->bin_tbl[j].node_tbl_offset;
276 if (ofs < nt->nt_array_max_entries) {
277 node = &nt_arr->node_tbl[ofs];
278 inc_time(&node->time_last_seen_a);
279 inc_time(&node->time_last_seen_b);
280 /* increment time_last_seen_s if nod is not SAN */
281 if ((node->status &
282 ICSS_LRE_NT_REM_NODE_TYPE_SANAB) == 0)
283 inc_time(&node->time_last_seen_s);
284 }
285 }
286 }
287
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month