[ti:ti-linux-5.4.y 7325/7338] drivers/net/ethernet/ti/prueth_lre.c:244:36: warning: variable 'queue_desc_p' set but not used
by kernel test robot
tree: git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-linux-5.4.y
head: 3cdbcdd591d4a26a51eba81bba6422754950f98d
commit: 7368a2a6ed6136e0a9e331a92505e66efeca24e2 [7325/7338] net: ti: prueth_core: add HSR/PRP firmware specific init functions
config: arm-allyesconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.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 checkout 7368a2a6ed6136e0a9e331a92505e66efeca24e2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
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: In function 'prueth_lre_emac_rx_packets':
>> drivers/net/ethernet/ti/prueth_lre.c:244:36: warning: variable 'queue_desc_p' set but not used [-Wunused-but-set-variable]
244 | struct prueth_queue_desc __iomem *queue_desc_p;
| ^~~~~~~~~~~~
>> drivers/net/ethernet/ti/prueth_lre.c:243:43: warning: variable 'status_o' set but not used [-Wunused-but-set-variable]
243 | u8 overflow_cnt, overflow_cnt_o, status, status_o;
| ^~~~~~~~
>> drivers/net/ethernet/ti/prueth_lre.c:243:35: warning: variable 'status' set but not used [-Wunused-but-set-variable]
243 | u8 overflow_cnt, overflow_cnt_o, status, status_o;
| ^~~~~~
vim +/queue_desc_p +244 drivers/net/ethernet/ti/prueth_lre.c
230
231 static int prueth_lre_emac_rx_packets(struct prueth_emac *emac,
232 int quota, u8 qid1, u8 qid2)
233 {
234 struct prueth *prueth = emac->prueth;
235 void *ocmc_ram = (__force void *)prueth->mem[PRUETH_MEM_OCMC].va;
236 u16 bd_rd_ptr, bd_wr_ptr, update_rd_ptr, bd_rd_ptr_o, bd_wr_ptr_o;
237 void __iomem *shared_ram = prueth->mem[PRUETH_MEM_SHARED_RAM].va;
238 struct prueth_queue_desc __iomem *queue_desc, *queue_desc_o;
239 struct net_device_stats *ndevstats = &emac->ndev->stats;
240 int ret, used = 0, port, port0_q_empty, port1_q_empty;
241 unsigned int emac_max_pktlen = PRUETH_MAX_PKTLEN_LRE;
242 const struct prueth_queue_info *rxqueue, *rxqueue_o;
> 243 u8 overflow_cnt, overflow_cnt_o, status, status_o;
> 244 struct prueth_queue_desc __iomem *queue_desc_p;
245 struct prueth_packet_info pkt_info, pkt_info_o;
246 const struct prueth_queue_info *rxqueue_p;
247 struct prueth_packet_info *pkt_info_p;
248 struct net_device_stats *ndevstats_o;
249 struct net_device_stats *ndevstats_p;
250 u32 rd_buf_desc, rd_buf_desc_o;
251 struct prueth_emac *other_emac;
252 u16 *bd_rd_ptr_p, *bd_wr_ptr_p;
253 struct prueth_emac *emac_p;
254 u32 pkt_ts, pkt_ts_o;
255 u32 iep_wrap;
256
257 other_emac = prueth->emac[(emac->port_id ^ 0x3) - 1];
258 ndevstats_o = &other_emac->ndev->stats;
259
260 /* use the correct wrap value based on ICSSM version */
261 iep_wrap = prueth->fw_offsets->iep_wrap;
262 /* search host queues for packets */
263 queue_desc = emac->rx_queue_descs + qid1;
264 queue_desc_o = other_emac->rx_queue_descs + qid2;
265
266 rxqueue = &sw_queue_infos[PRUETH_PORT_HOST][qid1];
267 rxqueue_o = &sw_queue_infos[PRUETH_PORT_HOST][qid2];
268
269 status = readb(&queue_desc->status);
270 status_o = readb(&queue_desc_o->status);
271
272 overflow_cnt = readb(&queue_desc->overflow_cnt);
273 overflow_cnt_o = readb(&queue_desc_o->overflow_cnt);
274
275 if (overflow_cnt > 0) {
276 emac->ndev->stats.rx_over_errors += overflow_cnt;
277 /* reset to zero */
278 writeb(0, &queue_desc->overflow_cnt);
279 }
280 if (overflow_cnt_o > 0) {
281 other_emac->ndev->stats.rx_over_errors += overflow_cnt_o;
282
283 /* reset to zero */
284 writeb(0, &queue_desc_o->overflow_cnt);
285 }
286
287 bd_rd_ptr = readw(&queue_desc->rd_ptr);
288 bd_wr_ptr = readw(&queue_desc->wr_ptr);
289
290 bd_rd_ptr_o = readw(&queue_desc_o->rd_ptr);
291 bd_wr_ptr_o = readw(&queue_desc_o->wr_ptr);
292
293 port0_q_empty = (bd_rd_ptr == bd_wr_ptr) ? 1 : 0;
294 port1_q_empty = (bd_rd_ptr_o == bd_wr_ptr_o) ? 1 : 0;
295
296 /* while packets are available in this queue */
297 while (!port0_q_empty || !port1_q_empty) {
298 /* get packet info from the read buffer descriptor */
299 rd_buf_desc = readl(shared_ram + bd_rd_ptr);
300 rd_buf_desc_o = readl(shared_ram + bd_rd_ptr_o);
301
302 parse_packet_info(prueth, rd_buf_desc, &pkt_info);
303 parse_packet_info(prueth, rd_buf_desc_o, &pkt_info_o);
304
305 pkt_ts = readl(ocmc_ram + ICSS_LRE_TIMESTAMP_ARRAY_OFFSET +
306 bd_rd_ptr - SRAM_START_OFFSET);
307 pkt_ts_o = readl(ocmc_ram + ICSS_LRE_TIMESTAMP_ARRAY_OFFSET +
308 bd_rd_ptr_o - SRAM_START_OFFSET);
309
310 if (!port0_q_empty && !port1_q_empty) {
311 /* Packets in both port queues */
312 /* Calculate diff b/n timestamps and account for
313 * wraparound
314 */
315 if (pkt_ts > pkt_ts_o)
316 port = (pkt_ts - pkt_ts_o) > (iep_wrap / 2) ?
317 0 : 1;
318 else
319 port = (pkt_ts_o - pkt_ts) > (iep_wrap / 2) ?
320 1 : 0;
321
322 } else if (!port0_q_empty) {
323 /* Packet(s) in port0 queue only */
324 port = 0;
325 } else {
326 /* Packet(s) in port1 queue only */
327 port = 1;
328 }
329
330 /* Select correct data structures for queue/packet selected */
331 if (port == 0) {
332 pkt_info_p = &pkt_info;
333 bd_wr_ptr_p = &bd_wr_ptr;
334 bd_rd_ptr_p = &bd_rd_ptr;
335 emac_p = emac;
336 ndevstats_p = ndevstats;
337 rxqueue_p = rxqueue;
338 queue_desc_p = queue_desc;
339 } else {
340 pkt_info_p = &pkt_info_o;
341 bd_wr_ptr_p = &bd_wr_ptr_o;
342 bd_rd_ptr_p = &bd_rd_ptr_o;
343 emac_p = other_emac;
344 ndevstats_p = ndevstats_o;
345 rxqueue_p = rxqueue_o;
346 queue_desc_p = queue_desc_o;
347 }
348
349 if ((*pkt_info_p).length <= 0) {
350 /* a packet length of zero will cause us to
351 * never move the read pointer ahead, locking
352 * the driver, so we manually have to move it
353 * to the write pointer, discarding all
354 * remaining packets in this queue. This should
355 * never happen.
356 */
357 update_rd_ptr = *bd_wr_ptr_p;
358 ndevstats_p->rx_length_errors++;
359 } else if ((*pkt_info_p).length > emac_max_pktlen) {
360 /* if the packet is too large we skip it but we
361 * still need to move the read pointer ahead
362 * and assume something is wrong with the read
363 * pointer as the firmware should be filtering
364 * these packets
365 */
366 update_rd_ptr = *bd_wr_ptr_p;
367 ndevstats_p->rx_length_errors++;
368 } else {
369 update_rd_ptr = *bd_rd_ptr_p;
370 ret = emac_rx_packet(emac_p, &update_rd_ptr,
371 *pkt_info_p, rxqueue_p);
372 if (ret)
373 return ret;
374
375 used++;
376 }
377
378 /* after reading the buffer descriptor we clear it
379 * to prevent improperly moved read pointer errors
380 * from simply looking like old packets.
381 */
382
383 /* update read pointer in queue descriptor */
384 if (port == 0) {
385 writel(0, shared_ram + bd_rd_ptr);
386 writew(update_rd_ptr, &queue_desc->rd_ptr);
387 bd_rd_ptr = update_rd_ptr;
388 } else {
389 writel(0, shared_ram + bd_rd_ptr_o);
390 writew(update_rd_ptr, &queue_desc_o->rd_ptr);
391 bd_rd_ptr_o = update_rd_ptr;
392 }
393
394 port0_q_empty = (bd_rd_ptr == bd_wr_ptr) ? 1 : 0;
395 port1_q_empty = (bd_rd_ptr_o == bd_wr_ptr_o) ? 1 : 0;
396
397 /* all we have room for? */
398 if (used >= quota)
399 return used;
400 }
401
402 return used;
403 }
404
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
Re: [PATCH bpf-next v2 1/4] bpf: setup socket family and addresses in bpf_prog_test_run_skb
by kernel test robot
Hi Dmitry,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on bpf-next/master]
url: https://github.com/0day-ci/linux/commits/Dmitry-Yakunin/bpf-cgroup-skb-im...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: arm64-randconfig-r005-20200714 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 02946de3802d3bc65bc9f2eb9b8d4969b5a7add8)
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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang 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 errors (new ones prefixed by >>):
net/bpf/test_run.c:120:14: warning: no previous prototype for function 'bpf_fentry_test1' [-Wmissing-prototypes]
int noinline bpf_fentry_test1(int a)
^
net/bpf/test_run.c:120:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test1(int a)
^
static
net/bpf/test_run.c:125:14: warning: no previous prototype for function 'bpf_fentry_test2' [-Wmissing-prototypes]
int noinline bpf_fentry_test2(int a, u64 b)
^
net/bpf/test_run.c:125:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test2(int a, u64 b)
^
static
net/bpf/test_run.c:130:14: warning: no previous prototype for function 'bpf_fentry_test3' [-Wmissing-prototypes]
int noinline bpf_fentry_test3(char a, int b, u64 c)
^
net/bpf/test_run.c:130:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test3(char a, int b, u64 c)
^
static
net/bpf/test_run.c:135:14: warning: no previous prototype for function 'bpf_fentry_test4' [-Wmissing-prototypes]
int noinline bpf_fentry_test4(void *a, char b, int c, u64 d)
^
net/bpf/test_run.c:135:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test4(void *a, char b, int c, u64 d)
^
static
net/bpf/test_run.c:140:14: warning: no previous prototype for function 'bpf_fentry_test5' [-Wmissing-prototypes]
int noinline bpf_fentry_test5(u64 a, void *b, short c, int d, u64 e)
^
net/bpf/test_run.c:140:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test5(u64 a, void *b, short c, int d, u64 e)
^
static
net/bpf/test_run.c:145:14: warning: no previous prototype for function 'bpf_fentry_test6' [-Wmissing-prototypes]
int noinline bpf_fentry_test6(u64 a, void *b, short c, int d, void *e, u64 f)
^
net/bpf/test_run.c:145:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test6(u64 a, void *b, short c, int d, void *e, u64 f)
^
static
net/bpf/test_run.c:154:14: warning: no previous prototype for function 'bpf_fentry_test7' [-Wmissing-prototypes]
int noinline bpf_fentry_test7(struct bpf_fentry_test_t *arg)
^
net/bpf/test_run.c:154:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test7(struct bpf_fentry_test_t *arg)
^
static
net/bpf/test_run.c:159:14: warning: no previous prototype for function 'bpf_fentry_test8' [-Wmissing-prototypes]
int noinline bpf_fentry_test8(struct bpf_fentry_test_t *arg)
^
net/bpf/test_run.c:159:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test8(struct bpf_fentry_test_t *arg)
^
static
net/bpf/test_run.c:164:14: warning: no previous prototype for function 'bpf_modify_return_test' [-Wmissing-prototypes]
int noinline bpf_modify_return_test(int a, int *b)
^
net/bpf/test_run.c:164:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_modify_return_test(int a, int *b)
^
static
>> net/bpf/test_run.c:460:7: error: no member named 'skc_v6_rcv_saddr' in 'struct sock_common'; did you mean 'skc_rcv_saddr'?
sk->sk_v6_rcv_saddr = ipv6_hdr(skb)->saddr;
^
include/net/sock.h:380:37: note: expanded from macro 'sk_v6_rcv_saddr'
#define sk_v6_rcv_saddr __sk_common.skc_v6_rcv_saddr
^
include/net/sock.h:169:11: note: 'skc_rcv_saddr' declared here
__be32 skc_rcv_saddr;
^
>> net/bpf/test_run.c:460:23: error: assigning to '__be32' (aka 'unsigned int') from incompatible type 'struct in6_addr'
sk->sk_v6_rcv_saddr = ipv6_hdr(skb)->saddr;
^ ~~~~~~~~~~~~~~~~~~~~
>> net/bpf/test_run.c:461:7: error: no member named 'skc_v6_daddr' in 'struct sock_common'; did you mean 'skc_daddr'?
sk->sk_v6_daddr = ipv6_hdr(skb)->daddr;
^
include/net/sock.h:379:34: note: expanded from macro 'sk_v6_daddr'
#define sk_v6_daddr __sk_common.skc_v6_daddr
^
include/net/sock.h:168:11: note: 'skc_daddr' declared here
__be32 skc_daddr;
^
net/bpf/test_run.c:461:19: error: assigning to '__be32' (aka 'unsigned int') from incompatible type 'struct in6_addr'
sk->sk_v6_daddr = ipv6_hdr(skb)->daddr;
^ ~~~~~~~~~~~~~~~~~~~~
9 warnings and 4 errors generated.
vim +460 net/bpf/test_run.c
389
390 int bpf_prog_test_run_skb(struct bpf_prog *prog, const union bpf_attr *kattr,
391 union bpf_attr __user *uattr)
392 {
393 bool is_l2 = false, is_direct_pkt_access = false;
394 u32 size = kattr->test.data_size_in;
395 u32 repeat = kattr->test.repeat;
396 struct __sk_buff *ctx = NULL;
397 u32 retval, duration;
398 int hh_len = ETH_HLEN;
399 struct sk_buff *skb;
400 struct sock *sk;
401 void *data;
402 int ret;
403
404 data = bpf_test_init(kattr, size, NET_SKB_PAD + NET_IP_ALIGN,
405 SKB_DATA_ALIGN(sizeof(struct skb_shared_info)));
406 if (IS_ERR(data))
407 return PTR_ERR(data);
408
409 ctx = bpf_ctx_init(kattr, sizeof(struct __sk_buff));
410 if (IS_ERR(ctx)) {
411 kfree(data);
412 return PTR_ERR(ctx);
413 }
414
415 switch (prog->type) {
416 case BPF_PROG_TYPE_SCHED_CLS:
417 case BPF_PROG_TYPE_SCHED_ACT:
418 is_l2 = true;
419 /* fall through */
420 case BPF_PROG_TYPE_LWT_IN:
421 case BPF_PROG_TYPE_LWT_OUT:
422 case BPF_PROG_TYPE_LWT_XMIT:
423 is_direct_pkt_access = true;
424 break;
425 default:
426 break;
427 }
428
429 sk = kzalloc(sizeof(struct sock), GFP_USER);
430 if (!sk) {
431 kfree(data);
432 kfree(ctx);
433 return -ENOMEM;
434 }
435 sock_net_set(sk, current->nsproxy->net_ns);
436 sock_init_data(NULL, sk);
437
438 skb = build_skb(data, 0);
439 if (!skb) {
440 kfree(data);
441 kfree(ctx);
442 kfree(sk);
443 return -ENOMEM;
444 }
445 skb->sk = sk;
446
447 skb_reserve(skb, NET_SKB_PAD + NET_IP_ALIGN);
448 __skb_put(skb, size);
449 skb->protocol = eth_type_trans(skb, current->nsproxy->net_ns->loopback_dev);
450 skb_reset_network_header(skb);
451
452 switch (skb->protocol) {
453 case htons(ETH_P_IP):
454 sk->sk_family = AF_INET;
455 sk->sk_rcv_saddr = ip_hdr(skb)->saddr;
456 sk->sk_daddr = ip_hdr(skb)->daddr;
457 break;
458 case htons(ETH_P_IPV6):
459 sk->sk_family = AF_INET6;
> 460 sk->sk_v6_rcv_saddr = ipv6_hdr(skb)->saddr;
> 461 sk->sk_v6_daddr = ipv6_hdr(skb)->daddr;
462 break;
463 default:
464 break;
465 }
466
467 if (is_l2)
468 __skb_push(skb, hh_len);
469 if (is_direct_pkt_access)
470 bpf_compute_data_pointers(skb);
471 ret = convert___skb_to_skb(skb, ctx);
472 if (ret)
473 goto out;
474 ret = bpf_test_run(prog, skb, repeat, &retval, &duration, false);
475 if (ret)
476 goto out;
477 if (!is_l2) {
478 if (skb_headroom(skb) < hh_len) {
479 int nhead = HH_DATA_ALIGN(hh_len - skb_headroom(skb));
480
481 if (pskb_expand_head(skb, nhead, 0, GFP_USER)) {
482 ret = -ENOMEM;
483 goto out;
484 }
485 }
486 memset(__skb_push(skb, hh_len), 0, hh_len);
487 }
488 convert_skb_to___skb(skb, ctx);
489
490 size = skb->len;
491 /* bpf program can never convert linear skb to non-linear */
492 if (WARN_ON_ONCE(skb_is_nonlinear(skb)))
493 size = skb_headlen(skb);
494 ret = bpf_test_finish(kattr, uattr, skb->data, size, retval, duration);
495 if (!ret)
496 ret = bpf_ctx_finish(kattr, uattr, ctx,
497 sizeof(struct __sk_buff));
498 out:
499 kfree_skb(skb);
500 bpf_sk_storage_free(sk);
501 kfree(sk);
502 kfree(ctx);
503 return ret;
504 }
505
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[RFC PATCH] cifs: smb1: CIFSSMBSetPathInfoFB() can be static
by kernel test robot
Signed-off-by: kernel test robot <lkp(a)intel.com>
---
cifssmb.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index eac525c1be5e9..c4420746fd3a1 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -5914,10 +5914,10 @@ CIFSSMBSetFileDisposition(const unsigned int xid, struct cifs_tcon *tcon,
}
int
-CIFSSMBSetPathInfoFB(const unsigned int xid, struct cifs_tcon *tcon,
- const char *fileName, const FILE_BASIC_INFO *data,
- const struct nls_table *nls_codepage,
- struct cifs_sb_info *cifs_sb)
+static CIFSSMBSetPathInfoFB(const unsigned int xid, struct cifs_tcon *tcon,
+ const char *fileName, const FILE_BASIC_INFO *data,
+ const struct nls_table *nls_codepage,
+ struct cifs_sb_info *cifs_sb)
{
int oplock = 0;
struct cifs_open_parms oparms;
2 years, 2 months
Re: [PATCH v3 1/3] kprobes: Add text_alloc() and text_free()
by kernel test robot
Hi Jarkko,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.8-rc5]
[cannot apply to tip/x86/core tip/perf/core jeyu/modules-next next-20200714]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Jarkko-Sakkinen/kprobes-Remove-M...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git e9919e11e219eaa5e8041b7b1a196839143e9125
config: x86_64-fedora-25 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
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 >>):
arch/x86/kernel/text.c: In function 'get_module_load_offset':
>> arch/x86/kernel/text.c:30:6: error: implicit declaration of function 'get_random_int' [-Werror=implicit-function-declaration]
30 | (get_random_int() % 1024 + 1) * PAGE_SIZE;
| ^~~~~~~~~~~~~~
arch/x86/kernel/text.c: At top level:
arch/x86/kernel/text.c:42:7: warning: no previous prototype for 'text_alloc' [-Wmissing-prototypes]
42 | void *text_alloc(unsigned long size)
| ^~~~~~~~~~
arch/x86/kernel/text.c:62:6: warning: no previous prototype for 'text_free' [-Wmissing-prototypes]
62 | void text_free(void *region)
| ^~~~~~~~~
cc1: some warnings being treated as errors
vim +/get_random_int +30 arch/x86/kernel/text.c
18
19 static unsigned long get_module_load_offset(void)
20 {
21 if (kaslr_enabled()) {
22 mutex_lock(&module_kaslr_mutex);
23 /*
24 * Calculate the module_load_offset the first time this
25 * code is called. Once calculated it stays the same until
26 * reboot.
27 */
28 if (module_load_offset == 0)
29 module_load_offset =
> 30 (get_random_int() % 1024 + 1) * PAGE_SIZE;
31 mutex_unlock(&module_kaslr_mutex);
32 }
33 return module_load_offset;
34 }
35 #else
36 static unsigned long get_module_load_offset(void)
37 {
38 return 0;
39 }
40 #endif
41
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[monstr-microblaze:for-test 218/1134] drivers/media/i2c/adv7511-v4l2.c:2102:63: sparse: sparse: incorrect type in argument 1 (different base types)
by kernel test robot
tree: git://git.monstr.eu/linux-2.6-microblaze for-test
head: 21f70b89dfef52f69ce1413868950cf5baf3868d
commit: ec8cdd50aa613113bb1480b0b103f42eea3f25d9 [218/1134] drivers: media: Customized adv7511 for Xylon LogiCVC (deprecated)
config: i386-randconfig-s002-20200714 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-41-g14e84ffc-dirty
git checkout ec8cdd50aa613113bb1480b0b103f42eea3f25d9
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
drivers/media/i2c/adv7511-v4l2.c:427:16: sparse: sparse: return expression in void function
>> drivers/media/i2c/adv7511-v4l2.c:2102:63: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __be32 const [usertype] *p @@ got unsigned int const [usertype] *[assigned] prop @@
>> drivers/media/i2c/adv7511-v4l2.c:2102:63: sparse: expected restricted __be32 const [usertype] *p
>> drivers/media/i2c/adv7511-v4l2.c:2102:63: sparse: got unsigned int const [usertype] *[assigned] prop
drivers/media/i2c/adv7511-v4l2.c:2106:65: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __be32 const [usertype] *p @@ got unsigned int const [usertype] *[assigned] prop @@
drivers/media/i2c/adv7511-v4l2.c:2106:65: sparse: expected restricted __be32 const [usertype] *p
drivers/media/i2c/adv7511-v4l2.c:2106:65: sparse: got unsigned int const [usertype] *[assigned] prop
drivers/media/i2c/adv7511-v4l2.c:2110:62: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __be32 const [usertype] *p @@ got unsigned int const [usertype] *[assigned] prop @@
drivers/media/i2c/adv7511-v4l2.c:2110:62: sparse: expected restricted __be32 const [usertype] *p
drivers/media/i2c/adv7511-v4l2.c:2110:62: sparse: got unsigned int const [usertype] *[assigned] prop
drivers/media/i2c/adv7511-v4l2.c:2117:55: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __be32 const [usertype] *p @@ got unsigned int const [usertype] *[assigned] prop @@
drivers/media/i2c/adv7511-v4l2.c:2117:55: sparse: expected restricted __be32 const [usertype] *p
drivers/media/i2c/adv7511-v4l2.c:2117:55: sparse: got unsigned int const [usertype] *[assigned] prop
drivers/media/i2c/adv7511-v4l2.c:2121:55: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __be32 const [usertype] *p @@ got unsigned int const [usertype] *[assigned] prop @@
drivers/media/i2c/adv7511-v4l2.c:2121:55: sparse: expected restricted __be32 const [usertype] *p
drivers/media/i2c/adv7511-v4l2.c:2121:55: sparse: got unsigned int const [usertype] *[assigned] prop
drivers/media/i2c/adv7511-v4l2.c:2125:55: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __be32 const [usertype] *p @@ got unsigned int const [usertype] *[assigned] prop @@
drivers/media/i2c/adv7511-v4l2.c:2125:55: sparse: expected restricted __be32 const [usertype] *p
drivers/media/i2c/adv7511-v4l2.c:2125:55: sparse: got unsigned int const [usertype] *[assigned] prop
drivers/media/i2c/adv7511-v4l2.c:2129:55: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __be32 const [usertype] *p @@ got unsigned int const [usertype] *[assigned] prop @@
drivers/media/i2c/adv7511-v4l2.c:2129:55: sparse: expected restricted __be32 const [usertype] *p
drivers/media/i2c/adv7511-v4l2.c:2129:55: sparse: got unsigned int const [usertype] *[assigned] prop
drivers/media/i2c/adv7511-v4l2.c:2133:55: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __be32 const [usertype] *p @@ got unsigned int const [usertype] *[assigned] prop @@
drivers/media/i2c/adv7511-v4l2.c:2133:55: sparse: expected restricted __be32 const [usertype] *p
drivers/media/i2c/adv7511-v4l2.c:2133:55: sparse: got unsigned int const [usertype] *[assigned] prop
drivers/media/i2c/adv7511-v4l2.c:2137:55: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __be32 const [usertype] *p @@ got unsigned int const [usertype] *[assigned] prop @@
drivers/media/i2c/adv7511-v4l2.c:2137:55: sparse: expected restricted __be32 const [usertype] *p
drivers/media/i2c/adv7511-v4l2.c:2137:55: sparse: got unsigned int const [usertype] *[assigned] prop
drivers/media/i2c/adv7511-v4l2.c:2141:55: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __be32 const [usertype] *p @@ got unsigned int const [usertype] *[assigned] prop @@
drivers/media/i2c/adv7511-v4l2.c:2141:55: sparse: expected restricted __be32 const [usertype] *p
drivers/media/i2c/adv7511-v4l2.c:2141:55: sparse: got unsigned int const [usertype] *[assigned] prop
drivers/media/i2c/adv7511-v4l2.c:2151:42: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __be32 const [usertype] *p @@ got unsigned int const [usertype] *[assigned] prop @@
drivers/media/i2c/adv7511-v4l2.c:2151:42: sparse: expected restricted __be32 const [usertype] *p
drivers/media/i2c/adv7511-v4l2.c:2151:42: sparse: got unsigned int const [usertype] *[assigned] prop
drivers/media/i2c/adv7511-v4l2.c:2157:55: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __be32 const [usertype] *p @@ got unsigned int const [usertype] *[assigned] prop @@
drivers/media/i2c/adv7511-v4l2.c:2157:55: sparse: expected restricted __be32 const [usertype] *p
drivers/media/i2c/adv7511-v4l2.c:2157:55: sparse: got unsigned int const [usertype] *[assigned] prop
drivers/media/i2c/adv7511-v4l2.c:2161:55: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __be32 const [usertype] *p @@ got unsigned int const [usertype] *[assigned] prop @@
drivers/media/i2c/adv7511-v4l2.c:2161:55: sparse: expected restricted __be32 const [usertype] *p
drivers/media/i2c/adv7511-v4l2.c:2161:55: sparse: got unsigned int const [usertype] *[assigned] prop
drivers/media/i2c/adv7511-v4l2.c:2165:55: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __be32 const [usertype] *p @@ got unsigned int const [usertype] *[assigned] prop @@
drivers/media/i2c/adv7511-v4l2.c:2165:55: sparse: expected restricted __be32 const [usertype] *p
drivers/media/i2c/adv7511-v4l2.c:2165:55: sparse: got unsigned int const [usertype] *[assigned] prop
drivers/media/i2c/adv7511-v4l2.c:2169:55: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __be32 const [usertype] *p @@ got unsigned int const [usertype] *[assigned] prop @@
drivers/media/i2c/adv7511-v4l2.c:2169:55: sparse: expected restricted __be32 const [usertype] *p
drivers/media/i2c/adv7511-v4l2.c:2169:55: sparse: got unsigned int const [usertype] *[assigned] prop
drivers/media/i2c/adv7511-v4l2.c:2174:63: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __be32 const [usertype] *p @@ got unsigned int const [usertype] *[assigned] prop @@
drivers/media/i2c/adv7511-v4l2.c:2174:63: sparse: expected restricted __be32 const [usertype] *p
drivers/media/i2c/adv7511-v4l2.c:2174:63: sparse: got unsigned int const [usertype] *[assigned] prop
drivers/media/i2c/adv7511-v4l2.c:2181:72: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __be32 const [usertype] *p @@ got unsigned int const [usertype] *[assigned] prop @@
drivers/media/i2c/adv7511-v4l2.c:2181:72: sparse: expected restricted __be32 const [usertype] *p
drivers/media/i2c/adv7511-v4l2.c:2181:72: sparse: got unsigned int const [usertype] *[assigned] prop
drivers/media/i2c/adv7511-v4l2.c:2186:72: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __be32 const [usertype] *p @@ got unsigned int const [usertype] *[assigned] prop @@
drivers/media/i2c/adv7511-v4l2.c:2186:72: sparse: expected restricted __be32 const [usertype] *p
drivers/media/i2c/adv7511-v4l2.c:2186:72: sparse: got unsigned int const [usertype] *[assigned] prop
drivers/media/i2c/adv7511-v4l2.c:2191:72: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __be32 const [usertype] *p @@ got unsigned int const [usertype] *[assigned] prop @@
drivers/media/i2c/adv7511-v4l2.c:2191:72: sparse: expected restricted __be32 const [usertype] *p
drivers/media/i2c/adv7511-v4l2.c:2191:72: sparse: got unsigned int const [usertype] *[assigned] prop
drivers/media/i2c/adv7511-v4l2.c:2196:72: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __be32 const [usertype] *p @@ got unsigned int const [usertype] *[assigned] prop @@
drivers/media/i2c/adv7511-v4l2.c:2196:72: sparse: expected restricted __be32 const [usertype] *p
drivers/media/i2c/adv7511-v4l2.c:2196:72: sparse: got unsigned int const [usertype] *[assigned] prop
drivers/media/i2c/adv7511-v4l2.c:2201:72: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __be32 const [usertype] *p @@ got unsigned int const [usertype] *[assigned] prop @@
drivers/media/i2c/adv7511-v4l2.c:2201:72: sparse: expected restricted __be32 const [usertype] *p
drivers/media/i2c/adv7511-v4l2.c:2201:72: sparse: got unsigned int const [usertype] *[assigned] prop
drivers/media/i2c/adv7511-v4l2.c:2206:72: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __be32 const [usertype] *p @@ got unsigned int const [usertype] *[assigned] prop @@
drivers/media/i2c/adv7511-v4l2.c:2206:72: sparse: expected restricted __be32 const [usertype] *p
drivers/media/i2c/adv7511-v4l2.c:2206:72: sparse: got unsigned int const [usertype] *[assigned] prop
drivers/media/i2c/adv7511-v4l2.c:2211:72: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __be32 const [usertype] *p @@ got unsigned int const [usertype] *[assigned] prop @@
drivers/media/i2c/adv7511-v4l2.c:2211:72: sparse: expected restricted __be32 const [usertype] *p
drivers/media/i2c/adv7511-v4l2.c:2211:72: sparse: got unsigned int const [usertype] *[assigned] prop
drivers/media/i2c/adv7511-v4l2.c:2216:72: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __be32 const [usertype] *p @@ got unsigned int const [usertype] *[assigned] prop @@
drivers/media/i2c/adv7511-v4l2.c:2216:72: sparse: expected restricted __be32 const [usertype] *p
drivers/media/i2c/adv7511-v4l2.c:2216:72: sparse: got unsigned int const [usertype] *[assigned] prop
drivers/media/i2c/adv7511-v4l2.c:2221:72: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __be32 const [usertype] *p @@ got unsigned int const [usertype] *[assigned] prop @@
drivers/media/i2c/adv7511-v4l2.c:2221:72: sparse: expected restricted __be32 const [usertype] *p
drivers/media/i2c/adv7511-v4l2.c:2221:72: sparse: got unsigned int const [usertype] *[assigned] prop
drivers/media/i2c/adv7511-v4l2.c:2226:72: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __be32 const [usertype] *p @@ got unsigned int const [usertype] *[assigned] prop @@
drivers/media/i2c/adv7511-v4l2.c:2226:72: sparse: expected restricted __be32 const [usertype] *p
drivers/media/i2c/adv7511-v4l2.c:2226:72: sparse: got unsigned int const [usertype] *[assigned] prop
drivers/media/i2c/adv7511-v4l2.c:2231:72: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __be32 const [usertype] *p @@ got unsigned int const [usertype] *[assigned] prop @@
drivers/media/i2c/adv7511-v4l2.c:2231:72: sparse: expected restricted __be32 const [usertype] *p
drivers/media/i2c/adv7511-v4l2.c:2231:72: sparse: got unsigned int const [usertype] *[assigned] prop
drivers/media/i2c/adv7511-v4l2.c:2236:72: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __be32 const [usertype] *p @@ got unsigned int const [usertype] *[assigned] prop @@
drivers/media/i2c/adv7511-v4l2.c:2236:72: sparse: expected restricted __be32 const [usertype] *p
drivers/media/i2c/adv7511-v4l2.c:2236:72: sparse: got unsigned int const [usertype] *[assigned] prop
vim +2102 drivers/media/i2c/adv7511-v4l2.c
2086
2087
2088 static void adv7511_get_ofdt_config(struct i2c_client *client,
2089 struct adv7511_state *state)
2090 {
2091 struct device_node *dn = client->dev.of_node;
2092 struct device_node *np;
2093 struct adv7511_config *config = &state->cfg;
2094 u32 const *prop;
2095 int size;
2096 bool vin_loaded, vout_loaded;
2097
2098 vin_loaded = vout_loaded = false;
2099
2100 prop = of_get_property(dn, "edid-addr", &size);
2101 if (prop)
> 2102 state->pdata.i2c_edid = (uint8_t)be32_to_cpup(prop);
2103
2104 prop = of_get_property(dn, "pktmem-addr", &size);
2105 if (prop)
2106 state->pdata.i2c_pktmem = (uint8_t)be32_to_cpup(prop);
2107
2108 prop = of_get_property(dn, "cec-addr", &size);
2109 if (prop)
2110 state->pdata.i2c_cec = (uint8_t)be32_to_cpup(prop);
2111
2112 np = of_find_node_by_name(dn, "video-input");
2113 if (np) {
2114 prop = of_get_property(np, "input-id", &size);
2115 if (prop)
2116 config->in_params.input_id =
2117 (uint8_t)be32_to_cpup(prop);
2118 prop = of_get_property(np, "input-style", &size);
2119 if (prop)
2120 config->in_params.input_style =
2121 (uint8_t)be32_to_cpup(prop);
2122 prop = of_get_property(np, "input-color-depth", &size);
2123 if (prop)
2124 config->in_params.input_color_depth =
2125 (uint8_t)be32_to_cpup(prop);
2126 prop = of_get_property(np, "bit-justification", &size);
2127 if (prop)
2128 config->in_params.bit_justification =
2129 (uint8_t)be32_to_cpup(prop);
2130 prop = of_get_property(np, "hsync-polarity", &size);
2131 if (prop)
2132 config->in_params.hsync_polarity =
2133 (uint8_t)be32_to_cpup(prop);
2134 prop = of_get_property(np, "vsync-polarity", &size);
2135 if (prop)
2136 config->in_params.vsync_polarity =
2137 (uint8_t)be32_to_cpup(prop);
2138 prop = of_get_property(np, "clock-delay", &size);
2139 if (prop)
2140 config->in_params.clock_delay =
2141 (uint8_t)be32_to_cpup(prop);
2142 vin_loaded = true;
2143 } else {
2144 pr_info("No video input configuration, using device default\n");
2145 }
2146
2147 np = of_find_node_by_name(dn, "video-output");
2148 if (np) {
2149 prop = of_get_property(np, "hdmi-mode", &size);
2150 if (prop) {
2151 if (be32_to_cpup(prop) == 1)
2152 config->out_params.hdmi_mode = true;
2153 }
2154 prop = of_get_property(np, "output-format", &size);
2155 if (prop)
2156 config->out_params.output_format =
2157 (uint8_t)be32_to_cpup(prop);
2158 prop = of_get_property(np, "output-color-space", &size);
2159 if (prop)
2160 config->out_params.output_color_space =
2161 (uint8_t)be32_to_cpup(prop);
2162 prop = of_get_property(np, "up-conversion", &size);
2163 if (prop)
2164 config->out_params.up_conversion =
2165 (uint8_t)be32_to_cpup(prop);
2166 prop = of_get_property(np, "csc-enable", &size);
2167 if (prop)
2168 config->out_params.csc_enable =
2169 (uint8_t)be32_to_cpup(prop);
2170 if (config->out_params.csc_enable) {
2171 prop = of_get_property(np, "csc-scaling-factor", &size);
2172 if (prop) {
2173 config->out_params.csc_scaling_factor =
2174 (uint8_t)be32_to_cpup(prop);
2175 }
2176 np = of_find_node_by_name(dn, "csc-coefficients");
2177 if (np) {
2178 prop = of_get_property(np, "a1", &size);
2179 if (prop) {
2180 config->out_params.csc_coeff.a1 =
2181 (uint16_t)be32_to_cpup(prop);
2182 }
2183 prop = of_get_property(np, "a2", &size);
2184 if (prop) {
2185 config->out_params.csc_coeff.a2 =
2186 (uint16_t)be32_to_cpup(prop);
2187 }
2188 prop = of_get_property(np, "a3", &size);
2189 if (prop) {
2190 config->out_params.csc_coeff.a3 =
2191 (uint16_t)be32_to_cpup(prop);
2192 }
2193 prop = of_get_property(np, "a4", &size);
2194 if (prop) {
2195 config->out_params.csc_coeff.a4 =
2196 (uint16_t)be32_to_cpup(prop);
2197 }
2198 prop = of_get_property(np, "b1", &size);
2199 if (prop) {
2200 config->out_params.csc_coeff.b1 =
2201 (uint16_t)be32_to_cpup(prop);
2202 }
2203 prop = of_get_property(np, "b2", &size);
2204 if (prop) {
2205 config->out_params.csc_coeff.b2 =
2206 (uint16_t)be32_to_cpup(prop);
2207 }
2208 prop = of_get_property(np, "b3", &size);
2209 if (prop) {
2210 config->out_params.csc_coeff.b3 =
2211 (uint16_t)be32_to_cpup(prop);
2212 }
2213 prop = of_get_property(np, "b4", &size);
2214 if (prop) {
2215 config->out_params.csc_coeff.b4 =
2216 (uint16_t)be32_to_cpup(prop);
2217 }
2218 prop = of_get_property(np, "c1", &size);
2219 if (prop) {
2220 config->out_params.csc_coeff.c1 =
2221 (uint16_t)be32_to_cpup(prop);
2222 }
2223 prop = of_get_property(np, "c2", &size);
2224 if (prop) {
2225 config->out_params.csc_coeff.c2 =
2226 (uint16_t)be32_to_cpup(prop);
2227 }
2228 prop = of_get_property(np, "c3", &size);
2229 if (prop) {
2230 config->out_params.csc_coeff.c3 =
2231 (uint16_t)be32_to_cpup(prop);
2232 }
2233 prop = of_get_property(np, "c4", &size);
2234 if (prop) {
2235 config->out_params.csc_coeff.c4 =
2236 (uint16_t)be32_to_cpup(prop);
2237 }
2238 } else {
2239 pr_info("No CSC coefficients, using default\n");
2240 }
2241 }
2242 vout_loaded = true;
2243 } else {
2244 pr_info("No video output configuration, using device default\n");
2245 }
2246
2247 if (vin_loaded && vout_loaded)
2248 config->loaded = true;
2249 }
2250
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
Re: [PATCH] hwmon: add fan/pwm driver for corsair h100i platinum
by kernel test robot
Hi jaap,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on hwmon/hwmon-next]
[also build test ERROR on v5.8-rc5 next-20200714]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/jaap-aarts/hwmon-add-fan-pwm-dri...
base: https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
In file included from arch/m68k/include/asm/io_mm.h:25,
from arch/m68k/include/asm/io.h:8,
from include/linux/io.h:13,
from include/linux/irq.h:20,
from include/asm-generic/hardirq.h:13,
from ./arch/m68k/include/generated/asm/hardirq.h:1,
from include/linux/hardirq.h:10,
from include/linux/interrupt.h:11,
from include/linux/usb.h:16,
from drivers/hwmon/asetek_gen6.c:23:
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsb':
arch/m68k/include/asm/raw_io.h:83:7: warning: variable '__w' set but not used [-Wunused-but-set-variable]
83 | ({u8 __w, __v = (b); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:430:3: note: in expansion of macro 'rom_out_8'
430 | rom_out_8(port, *buf++);
| ^~~~~~~~~
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw':
arch/m68k/include/asm/raw_io.h:86:8: warning: variable '__w' set but not used [-Wunused-but-set-variable]
86 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:448:3: note: in expansion of macro 'rom_out_be16'
448 | rom_out_be16(port, *buf++);
| ^~~~~~~~~~~~
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw_swapw':
arch/m68k/include/asm/raw_io.h:90:8: warning: variable '__w' set but not used [-Wunused-but-set-variable]
90 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:466:3: note: in expansion of macro 'rom_out_le16'
466 | rom_out_le16(port, *buf++);
| ^~~~~~~~~~~~
drivers/hwmon/asetek_gen6.c: At top level:
drivers/hwmon/asetek_gen6.c:174:5: warning: no previous prototype for 'set_fan_rpm_curve' [-Wmissing-prototypes]
174 | int set_fan_rpm_curve(struct driver *cdev, struct hwmon_fan_data *fan_data,
| ^~~~~~~~~~~~~~~~~
In file included from include/linux/device.h:15,
from include/linux/usb/ch9.h:36,
from include/linux/usb.h:6,
from drivers/hwmon/asetek_gen6.c:23:
drivers/hwmon/asetek_gen6.c: In function 'set_fan_rpm_curve':
>> drivers/hwmon/asetek_gen6.c:212:12: error: passing argument 1 of '_dev_info' from incompatible pointer type [-Werror=incompatible-pointer-types]
212 | dev_info("[*] Failled setting fan curve %d,%d,%d/%d\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| char *
include/linux/dev_printk.h:110:12: note: in definition of macro 'dev_info'
110 | _dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~
include/linux/dev_printk.h:48:37: note: expected 'const struct device *' but argument is of type 'char *'
48 | void _dev_info(const struct device *dev, const char *fmt, ...);
| ~~~~~~~~~~~~~~~~~~~~~^~~
>> drivers/hwmon/asetek_gen6.c:213:13: warning: passing argument 2 of '_dev_info' makes pointer from integer without a cast [-Wint-conversion]
213 | recv_buf[0], recv_buf[1], recv_buf[2], recv_buf[3]);
| ~~~~~~~~^~~
| |
| char
include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
19 | #define dev_fmt(fmt) fmt
| ^~~
drivers/hwmon/asetek_gen6.c:212:3: note: in expansion of macro 'dev_info'
212 | dev_info("[*] Failled setting fan curve %d,%d,%d/%d\n",
| ^~~~~~~~
include/linux/dev_printk.h:48:54: note: expected 'const char *' but argument is of type 'char'
48 | void _dev_info(const struct device *dev, const char *fmt, ...);
| ~~~~~~~~~~~~^~~
drivers/hwmon/asetek_gen6.c: At top level:
drivers/hwmon/asetek_gen6.c:217:5: warning: no previous prototype for 'set_fan_target_rpm' [-Wmissing-prototypes]
217 | int set_fan_target_rpm(struct driver *cdev, struct hwmon_fan_data *fan_data,
| ^~~~~~~~~~~~~~~~~~
In file included from include/linux/device.h:15,
from include/linux/usb/ch9.h:36,
from include/linux/usb.h:6,
from drivers/hwmon/asetek_gen6.c:23:
drivers/hwmon/asetek_gen6.c: In function 'set_fan_target_rpm':
drivers/hwmon/asetek_gen6.c:246:12: error: passing argument 1 of '_dev_info' from incompatible pointer type [-Werror=incompatible-pointer-types]
246 | dev_info("[*] Failled setting fan rpm %d,%d,%d/%d\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| char *
include/linux/dev_printk.h:110:12: note: in definition of macro 'dev_info'
110 | _dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~
include/linux/dev_printk.h:48:37: note: expected 'const struct device *' but argument is of type 'char *'
48 | void _dev_info(const struct device *dev, const char *fmt, ...);
| ~~~~~~~~~~~~~~~~~~~~~^~~
drivers/hwmon/asetek_gen6.c:247:13: warning: passing argument 2 of '_dev_info' makes pointer from integer without a cast [-Wint-conversion]
247 | recv_buf[0], recv_buf[1], recv_buf[2], recv_buf[3]);
| ~~~~~~~~^~~
| |
| char
include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
19 | #define dev_fmt(fmt) fmt
| ^~~
drivers/hwmon/asetek_gen6.c:246:3: note: in expansion of macro 'dev_info'
246 | dev_info("[*] Failled setting fan rpm %d,%d,%d/%d\n",
| ^~~~~~~~
include/linux/dev_printk.h:48:54: note: expected 'const char *' but argument is of type 'char'
48 | void _dev_info(const struct device *dev, const char *fmt, ...);
| ~~~~~~~~~~~~^~~
drivers/hwmon/asetek_gen6.c: At top level:
drivers/hwmon/asetek_gen6.c:251:6: warning: no previous prototype for 'get_fan_target_rpm' [-Wmissing-prototypes]
251 | void get_fan_target_rpm(struct hwmon_fan_data *fan_data, long *val)
| ^~~~~~~~~~~~~~~~~~
drivers/hwmon/asetek_gen6.c:256:5: warning: no previous prototype for 'get_fan_current_rpm' [-Wmissing-prototypes]
256 | int get_fan_current_rpm(struct driver *cdev, struct hwmon_fan_data *fan_data,
| ^~~~~~~~~~~~~~~~~~~
In file included from include/linux/device.h:15,
from include/linux/usb/ch9.h:36,
from include/linux/usb.h:6,
from drivers/hwmon/asetek_gen6.c:23:
drivers/hwmon/asetek_gen6.c: In function 'get_fan_current_rpm':
drivers/hwmon/asetek_gen6.c:280:12: error: passing argument 1 of '_dev_info' from incompatible pointer type [-Werror=incompatible-pointer-types]
280 | dev_info("[*] Failled retrieving fan rmp %d,%d,%d/%d\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| char *
include/linux/dev_printk.h:110:12: note: in definition of macro 'dev_info'
110 | _dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~
include/linux/dev_printk.h:48:37: note: expected 'const struct device *' but argument is of type 'char *'
48 | void _dev_info(const struct device *dev, const char *fmt, ...);
| ~~~~~~~~~~~~~~~~~~~~~^~~
drivers/hwmon/asetek_gen6.c:281:13: warning: passing argument 2 of '_dev_info' makes pointer from integer without a cast [-Wint-conversion]
281 | recv_buf[0], recv_buf[1], recv_buf[2], recv_buf[3]);
| ~~~~~~~~^~~
| |
| char
include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
19 | #define dev_fmt(fmt) fmt
| ^~~
drivers/hwmon/asetek_gen6.c:280:3: note: in expansion of macro 'dev_info'
280 | dev_info("[*] Failled retrieving fan rmp %d,%d,%d/%d\n",
| ^~~~~~~~
include/linux/dev_printk.h:48:54: note: expected 'const char *' but argument is of type 'char'
48 | void _dev_info(const struct device *dev, const char *fmt, ...);
| ~~~~~~~~~~~~^~~
drivers/hwmon/asetek_gen6.c: At top level:
drivers/hwmon/asetek_gen6.c:287:5: warning: no previous prototype for 'set_fan_target_pwm' [-Wmissing-prototypes]
287 | int set_fan_target_pwm(struct driver *cdev, struct hwmon_fan_data *fan_data,
| ^~~~~~~~~~~~~~~~~~
In file included from include/linux/device.h:15,
from include/linux/usb/ch9.h:36,
from include/linux/usb.h:6,
from drivers/hwmon/asetek_gen6.c:23:
drivers/hwmon/asetek_gen6.c: In function 'set_fan_target_pwm':
drivers/hwmon/asetek_gen6.c:315:12: error: passing argument 1 of '_dev_info' from incompatible pointer type [-Werror=incompatible-pointer-types]
315 | dev_info("[*] Failled setting fan pwm %d,%d,%d/%d\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| char *
include/linux/dev_printk.h:110:12: note: in definition of macro 'dev_info'
110 | _dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~
include/linux/dev_printk.h:48:37: note: expected 'const struct device *' but argument is of type 'char *'
48 | void _dev_info(const struct device *dev, const char *fmt, ...);
| ~~~~~~~~~~~~~~~~~~~~~^~~
drivers/hwmon/asetek_gen6.c:316:13: warning: passing argument 2 of '_dev_info' makes pointer from integer without a cast [-Wint-conversion]
316 | recv_buf[0], recv_buf[1], recv_buf[2], recv_buf[3]);
| ~~~~~~~~^~~
| |
| unsigned char
include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
19 | #define dev_fmt(fmt) fmt
| ^~~
drivers/hwmon/asetek_gen6.c:315:3: note: in expansion of macro 'dev_info'
315 | dev_info("[*] Failled setting fan pwm %d,%d,%d/%d\n",
| ^~~~~~~~
include/linux/dev_printk.h:48:54: note: expected 'const char *' but argument is of type 'unsigned char'
48 | void _dev_info(const struct device *dev, const char *fmt, ...);
| ~~~~~~~~~~~~^~~
drivers/hwmon/asetek_gen6.c: At top level:
drivers/hwmon/asetek_gen6.c:320:9: warning: no previous prototype for 'is_visible_func' [-Wmissing-prototypes]
320 | umode_t is_visible_func(const void *d, enum hwmon_sensor_types type, u32 attr,
| ^~~~~~~~~~~~~~~
drivers/hwmon/asetek_gen6.c:475:5: warning: no previous prototype for 'read_func' [-Wmissing-prototypes]
475 | int read_func(struct device *dev, enum hwmon_sensor_types type, u32 attr,
| ^~~~~~~~~
drivers/hwmon/asetek_gen6.c:556:6: warning: no previous prototype for 'does_fan_exist' [-Wmissing-prototypes]
556 | bool does_fan_exist(struct driver *cdev, int channel)
| ^~~~~~~~~~~~~~
drivers/hwmon/asetek_gen6.c: In function 'does_fan_exist':
drivers/hwmon/asetek_gen6.c:569:16: warning: overflow in conversion from 'int' to 'char' changes value from '600' to '88' [-Woverflow]
569 | send_buf[3] = 600;
| ^~~
drivers/hwmon/asetek_gen6.c: At top level:
drivers/hwmon/asetek_gen6.c:584:5: warning: no previous prototype for 'get_fan_count' [-Wmissing-prototypes]
584 | int get_fan_count(struct driver *dev)
| ^~~~~~~~~~~~~
drivers/hwmon/asetek_gen6.c:593:6: warning: no previous prototype for 'hwmon_init' [-Wmissing-prototypes]
593 | void hwmon_init(struct driver *dev)
| ^~~~~~~~~~
drivers/hwmon/asetek_gen6.c: In function 'hwmon_init':
>> drivers/hwmon/asetek_gen6.c:650:30: error: macro "dev_info" requires 3 arguments, but only 1 given
650 | dev_info("[*] Setup hwmon\n");
| ^
In file included from include/linux/device.h:15,
from include/linux/usb/ch9.h:36,
from include/linux/usb.h:6,
from drivers/hwmon/asetek_gen6.c:23:
include/linux/dev_printk.h:109: note: macro "dev_info" defined here
109 | #define dev_info(dev, fmt, ...) \
|
>> drivers/hwmon/asetek_gen6.c:650:2: error: 'dev_info' undeclared (first use in this function); did you mean '_dev_info'?
650 | dev_info("[*] Setup hwmon\n");
| ^~~~~~~~
| _dev_info
drivers/hwmon/asetek_gen6.c:650:2: note: each undeclared identifier is reported only once for each function it appears in
drivers/hwmon/asetek_gen6.c:596:17: warning: variable 'hwmon_dev' set but not used [-Wunused-but-set-variable]
596 | struct device *hwmon_dev;
| ^~~~~~~~~
drivers/hwmon/asetek_gen6.c: At top level:
drivers/hwmon/asetek_gen6.c:653:6: warning: no previous prototype for 'hwmon_deinit' [-Wmissing-prototypes]
653 | void hwmon_deinit(struct driver *dev)
| ^~~~~~~~~~~~
drivers/hwmon/asetek_gen6.c: In function 'hwmon_deinit':
drivers/hwmon/asetek_gen6.c:656:35: error: macro "dev_info" requires 3 arguments, but only 1 given
656 | dev_info("[*] HWMON DISCONNECT\n");
| ^
In file included from include/linux/device.h:15,
from include/linux/usb/ch9.h:36,
from include/linux/usb.h:6,
from drivers/hwmon/asetek_gen6.c:23:
include/linux/dev_printk.h:109: note: macro "dev_info" defined here
109 | #define dev_info(dev, fmt, ...) \
|
drivers/hwmon/asetek_gen6.c:656:2: error: 'dev_info' undeclared (first use in this function); did you mean '_dev_info'?
656 | dev_info("[*] HWMON DISCONNECT\n");
| ^~~~~~~~
| _dev_info
drivers/hwmon/asetek_gen6.c: At top level:
drivers/hwmon/asetek_gen6.c:670:5: warning: no previous prototype for 'init_device' [-Wmissing-prototypes]
670 | int init_device(struct usb_device *udev)
| ^~~~~~~~~~~
drivers/hwmon/asetek_gen6.c: In function 'init_device':
drivers/hwmon/asetek_gen6.c:678:3: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
678 | ;
| ^
drivers/hwmon/asetek_gen6.c: At top level:
drivers/hwmon/asetek_gen6.c:688:5: warning: no previous prototype for 'deinit_device' [-Wmissing-prototypes]
688 | int deinit_device(struct usb_device *udev)
| ^~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/_dev_info +212 drivers/hwmon/asetek_gen6.c
> 23 #include <linux/usb.h>
24 #include <linux/slab.h>
25 #include <linux/mutex.h>
26 #include <linux/errno.h>
27 #include <linux/hwmon.h>
28 #include <linux/hwmon-sysfs.h>
29
30 struct driver {
31 struct usb_device *udev;
32
33 char *bulk_out_buffer;
34 char *bulk_in_buffer;
35 size_t bulk_out_size;
36 size_t bulk_in_size;
37 char bulk_in_endpointAddr;
38 char bulk_out_endpointAddr;
39
40 struct usb_interface *interface; /* the interface for this device */
41 struct mutex io_mutex; /* synchronize I/O with disconnect */
42 struct semaphore
43 limit_sem; /* limiting the number of writes in progress */
44
45 struct kref kref;
46 };
47
48 struct curve_point {
49 uint8_t temp;
50 uint8_t pwm;
51 };
52
53 struct hwmon_fan_data {
54 char fan_channel;
55 long fan_target;
56 unsigned char fan_pwm_target;
57 long mode;
58 struct curve_point curve[7];
59 };
60
61 struct hwmon_data {
62 struct driver *dev;
63 int channel_count;
64 void **channel_data;
65 };
66
67 struct curve_point quiet_curve[] = {
68 {
69 .temp = 0x1F,
70 .pwm = 0x15,
71 },
72 {
73 .temp = 0x21,
74 .pwm = 0x1E,
75 },
76 {
77 .temp = 0x24,
78 .pwm = 0x25,
79 },
80 {
81 .temp = 0x27,
82 .pwm = 0x2D,
83 },
84 {
85 .temp = 0x29,
86 .pwm = 0x38,
87 },
88 {
89 .temp = 0x2C,
90 .pwm = 0x4A,
91 },
92 {
93 .temp = 0x2F,
94 .pwm = 0x64,
95 },
96 };
97
98 struct curve_point balanced_curve[] = {
99 {
100 .temp = 0x1C,
101 .pwm = 0x15,
102 },
103 {
104 .temp = 0x1E,
105 .pwm = 0x1B,
106 },
107 {
108 .temp = 0x20,
109 .pwm = 0x23,
110 },
111 {
112 .temp = 0x22,
113 .pwm = 0x28,
114 },
115 {
116 .temp = 0x24,
117 .pwm = 0x32,
118 },
119 {
120 .temp = 0x27,
121 .pwm = 0x48,
122 },
123 {
124 .temp = 0x29,
125 .pwm = 0x64,
126 },
127 };
128
129 struct curve_point extreme_curve[] = {
130 {
131 .temp = 0x19,
132 .pwm = 0x28,
133 },
134 {
135 .temp = 0x1B,
136 .pwm = 0x2E,
137 },
138 {
139 .temp = 0x1D,
140 .pwm = 0x37,
141 },
142 {
143 .temp = 0x1E,
144 .pwm = 0x41,
145 },
146 {
147 .temp = 0x1F,
148 .pwm = 0x4C,
149 },
150 {
151 .temp = 0x20,
152 .pwm = 0x56,
153 },
154 {
155 .temp = 0x21,
156 .pwm = 0x64,
157 },
158 };
159
160 #define default_curve quiet_curve
161
162 static const char SUCCESS[2] = { 0x12, 0x34 };
163
164 #define SUCCES_LENGTH 3
165
166 static bool check_succes(char command, char ret[SUCCES_LENGTH])
167 {
168 char success[SUCCES_LENGTH] = { command };
169
170 strncpy(&success[1], SUCCESS, SUCCES_LENGTH - 1);
171 return strncmp(ret, success, SUCCES_LENGTH - 1) == 0;
172 }
173
> 174 int set_fan_rpm_curve(struct driver *cdev, struct hwmon_fan_data *fan_data,
175 struct curve_point point[7])
176 {
177 int retval;
178 int wrote;
179 int sndpipe = usb_sndbulkpipe(cdev->udev, cdev->bulk_out_endpointAddr);
180 int rcvpipe = usb_rcvbulkpipe(cdev->udev, cdev->bulk_in_endpointAddr);
181 char *send_buf = cdev->bulk_out_buffer;
182 char *recv_buf = cdev->bulk_in_buffer;
183
184 memcpy(fan_data->curve, point, sizeof(fan_data->curve));
185
186 send_buf[0] = 0x40;
187 send_buf[1] = fan_data->fan_channel;
188 send_buf[2] = point[0].temp;
189 send_buf[3] = point[1].temp;
190 send_buf[4] = point[2].temp;
191 send_buf[5] = point[3].temp;
192 send_buf[6] = point[4].temp;
193 send_buf[7] = point[5].temp;
194 send_buf[8] = point[6].temp;
195 send_buf[9] = point[0].pwm;
196 send_buf[10] = point[1].pwm;
197 send_buf[11] = point[2].pwm;
198 send_buf[12] = point[3].pwm;
199 send_buf[13] = point[4].pwm;
200 send_buf[14] = point[5].pwm;
201 send_buf[15] = point[6].pwm;
202
203 retval = usb_bulk_msg(cdev->udev, sndpipe, send_buf, 16, &wrote, 100);
204 if (retval != 0)
205 return retval;
206
207 retval = usb_bulk_msg(cdev->udev, rcvpipe, recv_buf, 4, &wrote, 100);
208 if (retval != 0)
209 return retval;
210
211 if (!check_succes(send_buf[0], recv_buf))
> 212 dev_info("[*] Failled setting fan curve %d,%d,%d/%d\n",
> 213 recv_buf[0], recv_buf[1], recv_buf[2], recv_buf[3]);
214 return 0;
215 }
216
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
Re: [PATCH] Drivers: hv: vmbus: Copy packets sent by Hyper-V out of the ring buffer
by kernel test robot
Hi Andres,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on next-20200714]
[cannot apply to mkp-scsi/for-next scsi/for-next linux/master linus/master v5.8-rc5 v5.8-rc4 v5.8-rc3 v5.8-rc5]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Andres-Beltran/Drivers-hv-vmbus-...
base: 5fb3d60423873c969058f16b94bca3ef304a68fb
config: x86_64-rhel (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
# save the attached .config to linux build tree
make W=1 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/storvsc_drv.c: In function 'storvsc_connect_to_vsp':
>> drivers/scsi/storvsc_drv.c:1310:25: warning: variable 'stor_device' set but not used [-Wunused-but-set-variable]
1310 | struct storvsc_device *stor_device;
| ^~~~~~~~~~~
vim +/stor_device +1310 drivers/scsi/storvsc_drv.c
1304
1305 static int storvsc_connect_to_vsp(struct hv_device *device, u32 ring_size,
1306 bool is_fc)
1307 {
1308 struct vmstorage_channel_properties props;
1309 int ret;
> 1310 struct storvsc_device *stor_device;
1311
1312 memset(&props, 0, sizeof(struct vmstorage_channel_properties));
1313 stor_device = get_out_stor_device(device);
1314 device->channel->max_pkt_size = STORVSC_MAX_PKT_SIZE;
1315
1316 /*
1317 * The size of vmbus_requestor is an upper bound on the number of requests
1318 * that can be in-progress at any one time across all channels.
1319 */
1320 device->channel->rqstor_size = scsi_driver.can_queue;
1321
1322 ret = vmbus_open(device->channel,
1323 ring_size,
1324 ring_size,
1325 (void *)&props,
1326 sizeof(struct vmstorage_channel_properties),
1327 storvsc_on_channel_callback, device->channel);
1328
1329 if (ret != 0)
1330 return ret;
1331
1332 ret = storvsc_channel_init(device, is_fc);
1333
1334 return ret;
1335 }
1336
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months