From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [hverkuil-media:extron 2/5] drivers/media/cec/usb/extron/extron-cec.c:505:32: sparse: sparse: incorrect type in argument 1 (different base types)
Date: Sun, 21 Feb 2021 18:46:04 +0800 [thread overview]
Message-ID: <202102211802.p7yycJVf-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 6768 bytes --]
tree: git://linuxtv.org/hverkuil/media_tree.git extron
head: 422016350730158ae4ebc101cda485011d6012f0
commit: bb6ec9cae95f065962e2e3c1f809a7fc0cff2bee [2/5] extron-cec: add extron cec driver
config: xtensa-randconfig-s032-20210221 (attached as .config)
compiler: xtensa-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-229-g60c1f270-dirty
git remote add hverkuil-media git://linuxtv.org/hverkuil/media_tree.git
git fetch --no-tags hverkuil-media extron
git checkout bb6ec9cae95f065962e2e3c1f809a7fc0cff2bee
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=xtensa
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
"sparse warnings: (new ones prefixed by >>)"
>> drivers/media/cec/usb/extron/extron-cec.c:505:32: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] size @@ got restricted gfp_t @@
drivers/media/cec/usb/extron/extron-cec.c:505:32: sparse: expected unsigned int [usertype] size
drivers/media/cec/usb/extron/extron-cec.c:505:32: sparse: got restricted gfp_t
>> drivers/media/cec/usb/extron/extron-cec.c:505:44: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected restricted gfp_t [usertype] flags @@ got unsigned int @@
drivers/media/cec/usb/extron/extron-cec.c:505:44: sparse: expected restricted gfp_t [usertype] flags
drivers/media/cec/usb/extron/extron-cec.c:505:44: sparse: got unsigned int
vim +505 drivers/media/cec/usb/extron/extron-cec.c
443
444 static int extron_setup(struct extron *extron, struct serio *serio)
445 {
446 struct extron_port *port;
447 u8 *data = extron->data;
448 unsigned int p, i;
449 int err;
450
451 serio_set_drvdata(serio, extron);
452 for (i = 0; i < 60; i++) {
453 err = extron_send_and_wait(extron, "W3CV", "Vrb3");
454 if (err != -ETIMEDOUT)
455 break;
456 ssleep(1);
457 }
458
459 if (err) {
460 dev_err(extron->dev, "Could not enable Tagged Response\n");
461 return err;
462 }
463
464 err = extron_send_and_wait(extron, "N", "Pno");
465 if (err)
466 return err;
467 dev_info(extron->dev, "Unit part number: %s\n", data + 3);
468 if (strcmp(data + 3, "60-1607-01") &&
469 strcmp(data + 3, "60-1608-01") &&
470 strcmp(data + 3, "60-1609-01")) {
471 dev_err(extron->dev, "Unsupported model\n");
472 return -ENODEV;
473 }
474 /* Up to 6 output ports and one input port */
475 extron->num_out_ports = 2 * (data[9] - '6');
476 extron->num_in_ports = 1;
477 extron->num_ports = extron->num_out_ports + extron->num_in_ports;
478 dev_info(extron->dev, "Unit output ports: %d\n", extron->num_out_ports);
479 dev_info(extron->dev, "Unit input ports: %d\n", extron->num_in_ports);
480
481 err = extron_send_and_wait(extron, "W CN", "Ipn ");
482 if (err)
483 return err;
484 dev_info(extron->dev, "Unit name: %s\n", data + 4);
485
486 err = extron_send_and_wait(extron, "Q", "Ver");
487 if (err)
488 return err;
489 dev_info(extron->dev, "Unit FW Version: %s\n", data + 6);
490
491 err = extron_send_and_wait(extron, "39Q", "Ver39*");
492 if (err)
493 return err;
494 dev_info(extron->dev, "CEC Engine Version: %s\n", data + 6);
495
496 /* Disable CEC */
497 err = extron_send_and_wait(extron, "WI1*0CCEC", "CcecI1*");
498 if (err)
499 return err;
500 err = extron_send_and_wait(extron, "WO0*CCEC", "CcecO0");
501 if (err)
502 return err;
503
504 for (p = 0; p < extron->num_ports; p++) {
> 505 port = kzalloc(GFP_KERNEL, sizeof(*port));
506 if (!port) {
507 err = -ENOMEM;
508 goto free_ports;
509 }
510 mutex_init(&port->lock);
511 INIT_WORK(&port->irq_work, extron_irq_work_handler);
512 spin_lock_init(&port->msg_lock);
513 port->extron = extron;
514 port->is_input = p >= extron->num_out_ports;
515 port->direction = port->is_input ? 'I' : 'O';
516 port->port = 1 + (port->is_input ? p - extron->num_out_ports : p);
517 port->phys_addr = CEC_PHYS_ADDR_INVALID;
518 snprintf(port->name, sizeof(port->name), "%s-%s-%u",
519 dev_name(&serio->dev), port->is_input ? "in" : "out",
520 port->port);
521
522 port->dev = extron->dev;
523 port->adap = cec_allocate_adapter(&extron_cec_adap_ops, port,
524 port->name, CEC_CAP_DEFAULTS, 1);
525 err = PTR_ERR_OR_ZERO(port->adap);
526 if (err < 0) {
527 kfree(port);
528 goto free_ports;
529 }
530 extron->ports[p] = port;
531 }
532
533 /*
534 for (i = 0; i < 60; i++) {
535 err = extron_send_and_wait(extron, "WLS", "Sig");
536 if (err != -ETIMEDOUT)
537 break;
538 msleep(100);
539 }
540 if (err)
541 goto free_ports;
542 dev_info(extron->dev, "%d\n", i);
543 dev_info(extron->dev, "Signal status: %s\n", data + 3);
544 */
545
546 err = extron_send_and_wait(extron, "WI1*20CCEC", "CcecI1*");
547 if (err)
548 goto free_ports;
549
550 err = extron_send_and_wait(extron, "WO20*CCEC", "CcecO20");
551 if (err)
552 goto free_ports;
553
554 /* Set logical addresses to 15 */
555 err = extron_send_and_wait(extron, "WI1*15LCEC", "LcecI1*15");
556 if (err)
557 return err;
558
559 for (p = 0; p < extron->num_out_ports; p++) {
560 char cmd[16];
561 char resp[16];
562
563 snprintf(cmd, sizeof(cmd), "WO%u*15LCEC", p + 1);
564 snprintf(resp, sizeof(resp), "LcecO%u*15", p + 1);
565 err = extron_send_and_wait(extron, cmd, resp);
566 }
567
568 return 0;
569
570 free_ports:
571 while (p--) {
572 struct extron_port *port = extron->ports[p];
573
574 port->disconnected = true;
575 cancel_work_sync(&port->irq_work);
576 cec_delete_adapter(port->adap);
577 extron->ports[p] = NULL;
578 kfree(port);
579 }
580 return err;
581 }
582
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 28583 bytes --]
reply other threads:[~2021-02-21 10:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202102211802.p7yycJVf-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.