[intel-linux-intel-lts:5.4/yocto 8692/9195] drivers/misc/xlink-usb/remote_host/vpu-cdc-acm.c:615:2: warning: ISO C90 forbids mixed declarations and code
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: 87241c08286384feb3ddc57d4cb0daca4be1e384
commit: 09c6f0fc5c85332b93c06fce6a05ae7af0795a89 [8692/9195] xlink-usb: XLink USB Remote and Local Host driver
config: nios2-randconfig-r026-20200811 (attached as .config)
compiler: nios2-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
git checkout 09c6f0fc5c85332b93c06fce6a05ae7af0795a89
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2
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/misc/xlink-usb/remote_host/vpu-cdc-acm.c: In function 'usb_get_device_status_by_id':
>> drivers/misc/xlink-usb/remote_host/vpu-cdc-acm.c:615:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
615 | u32 num = 0;
| ^~~
drivers/misc/xlink-usb/remote_host/vpu-cdc-acm.c: At top level:
>> drivers/misc/xlink-usb/remote_host/vpu-cdc-acm.c:631:5: warning: no previous prototype for 'usb_interrupt' [-Wmissing-prototypes]
631 | int usb_interrupt(struct usb_device *usb_dev, unsigned int pipe,
| ^~~~~~~~~~~~~
drivers/misc/xlink-usb/remote_host/vpu-cdc-acm.c: In function 'usb_interrupt':
>> drivers/misc/xlink-usb/remote_host/vpu-cdc-acm.c:635:28: warning: variable 'ep' set but not used [-Wunused-but-set-variable]
635 | struct usb_host_endpoint *ep;
| ^~
>> drivers/misc/xlink-usb/remote_host/vpu-cdc-acm.c:634:14: warning: variable 'urb' set but not used [-Wunused-but-set-variable]
634 | struct urb *urb;
| ^~~
drivers/misc/xlink-usb/remote_host/vpu-cdc-acm.c: In function 'usb_device_reset':
drivers/misc/xlink-usb/remote_host/vpu-cdc-acm.c:662:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
662 | struct usb_interface *data_interface = acm->data;
| ^~~~~~
drivers/misc/xlink-usb/remote_host/vpu-cdc-acm.c:658:28: warning: variable 'ep' set but not used [-Wunused-but-set-variable]
658 | struct usb_host_endpoint *ep;
| ^~
>> drivers/misc/xlink-usb/remote_host/vpu-cdc-acm.c:653:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
653 | int ret;
| ^~~
drivers/misc/xlink-usb/remote_host/vpu-cdc-acm.c: In function 'vpu_write_host':
drivers/misc/xlink-usb/remote_host/vpu-cdc-acm.c:749:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
749 | int val = ACM_CTRL_DTR | ACM_CTRL_RTS;
| ^~~
drivers/misc/xlink-usb/remote_host/vpu-cdc-acm.c:754:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
754 | int count = len;
| ^~~
drivers/misc/xlink-usb/remote_host/vpu-cdc-acm.c: In function 'vpu_write_reset_host':
drivers/misc/xlink-usb/remote_host/vpu-cdc-acm.c:848:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
848 | const char *buf = 0;
| ^~~~~
drivers/misc/xlink-usb/remote_host/vpu-cdc-acm.c: At top level:
>> drivers/misc/xlink-usb/remote_host/vpu-cdc-acm.c:884:6: warning: no previous prototype for 'vpu_write_swid' [-Wmissing-prototypes]
884 | void vpu_write_swid(struct acm *acm, int *buf, int len)
| ^~~~~~~~~~~~~~
>> drivers/misc/xlink-usb/remote_host/vpu-cdc-acm.c:1013:6: warning: no previous prototype for 'vpu_close_swid' [-Wmissing-prototypes]
1013 | void vpu_close_swid(struct acm *acm, int len)
| ^~~~~~~~~~~~~~
drivers/misc/xlink-usb/remote_host/vpu-cdc-acm.c: In function 'vpu_read_host':
drivers/misc/xlink-usb/remote_host/vpu-cdc-acm.c:1066:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
1066 | struct urb *urb;
| ^~~~~~
drivers/misc/xlink-usb/remote_host/vpu-cdc-acm.c:1096:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
1096 | int val = ACM_CTRL_DTR | ACM_CTRL_RTS;
| ^~~
drivers/misc/xlink-usb/remote_host/vpu-cdc-acm.c: In function 'vpu_acm_probe':
drivers/misc/xlink-usb/remote_host/vpu-cdc-acm.c:1365:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
1365 | struct usb_device *udev = interface_to_usbdev(intf);
| ^~~~~~
>> drivers/misc/xlink-usb/remote_host/vpu-cdc-acm.c:1532:22: warning: passing argument 2 of 'vpu_write_swid' makes pointer from integer without a cast [-Wint-conversion]
1532 | vpu_write_swid(acm, devnum, size);
| ^~~~~~
| |
| int
drivers/misc/xlink-usb/remote_host/vpu-cdc-acm.c:884:43: note: expected 'int *' but argument is of type 'int'
884 | void vpu_write_swid(struct acm *acm, int *buf, int len)
| ~~~~~^~~
drivers/misc/xlink-usb/remote_host/vpu-cdc-acm.c:1534:22: warning: passing argument 2 of 'vpu_write_swid' makes pointer from integer without a cast [-Wint-conversion]
1534 | vpu_write_swid(acm, busnum, size);
| ^~~~~~
| |
| int
drivers/misc/xlink-usb/remote_host/vpu-cdc-acm.c:884:43: note: expected 'int *' but argument is of type 'int'
884 | void vpu_write_swid(struct acm *acm, int *buf, int len)
| ~~~~~^~~
drivers/misc/xlink-usb/remote_host/vpu-cdc-acm.c: In function 'vpu_acm_init':
>> drivers/misc/xlink-usb/remote_host/vpu-cdc-acm.c:1727:6: warning: variable 'retval' set but not used [-Wunused-but-set-variable]
1727 | int retval;
| ^~~~~~
At top level:
drivers/misc/xlink-usb/remote_host/vpu-cdc-acm.c:595:20: warning: 'usb_get_device_by_name' defined but not used [-Wunused-function]
595 | static struct acm *usb_get_device_by_name(const char *name)
| ^~~~~~~~~~~~~~~~~~~~~~
--
drivers/misc/xlink-usb/remote_host/mxlk_interface_host.c: In function 'xlink_usb_write':
>> drivers/misc/xlink-usb/remote_host/mxlk_interface_host.c:40:38: warning: passing argument 2 of 'vpu_close_host' makes integer from pointer without a cast [-Wint-conversion]
40 | return vpu_close_host(sw_device_id, size);
| ^~~~
| |
| size_t * const {aka unsigned int * const}
In file included from drivers/misc/xlink-usb/remote_host/mxlk_interface_host.c:22:
drivers/misc/xlink-usb/remote_host/vpu-cdc-acm.h:59:32: note: expected 'int' but argument is of type 'size_t * const' {aka 'unsigned int * const'}
59 | int vpu_close_host(u32 id, int len);
| ~~~~^~~
vim +615 drivers/misc/xlink-usb/remote_host/vpu-cdc-acm.c
608
609 int usb_get_device_status_by_id(u32 id, uint32_t *status)
610 {
611 struct acm *xdev = usb_get_device_by_id(id);
612
613 if (!xdev)
614 return -ENODEV;
> 615 u32 num = 0;
616
617 mutex_lock(&dev_list_mutex);
618 list_for_each_entry(xdev, &dev_list, list) {
619 *status++ = xdev->status;
620 num++;
621 }
622 mutex_unlock(&dev_list_mutex);
623 return 0;
624 }
625
626 struct api_context {
627 struct completion done;
628 int status;
629 };
630
> 631 int usb_interrupt(struct usb_device *usb_dev, unsigned int pipe,
632 void *data, int len, int *actual_length, int timeout)
633 {
> 634 struct urb *urb;
> 635 struct usb_host_endpoint *ep;
636
637 ep = usb_pipe_endpoint(usb_dev, pipe);
638 urb = usb_alloc_urb(0, GFP_KERNEL);
639 return 0;
640 }
641
642 int usb_connect_device(uint32_t sw_device_id)
643 {
644 struct acm *xdev = usb_get_device_by_id(sw_device_id);
645
646 if (!xdev)
647 return -ENODEV;
648 return 0;
649 }
650
651 int usb_device_reset(u8 cmd)
652 {
> 653 int ret;
654 int index = 0;
655 unsigned int pipe = 1;
656 struct acm *acm = vpu_acm_get_by_minor(index);
657 int actual_len;
658 struct usb_host_endpoint *ep;
659 u8 *buffer_cmd = NULL;
660
661 ep = usb_pipe_endpoint(acm->dev, pipe);
> 662 struct usb_interface *data_interface = acm->data;
663 struct usb_endpoint_descriptor *epwrite = NULL;
664
665 epwrite = &data_interface->cur_altsetting->endpoint[1].desc;
666 buffer_cmd = kzalloc(sizeof(cmd), GFP_KERNEL);
667 if (!buffer_cmd)
668 return -ENOMEM;
669
670 *buffer_cmd = cmd;
671
672 pipe = (pipe & ~(3 << 30)) | (PIPE_INTERRUPT << 30);
673
674 ret = usb_interrupt(acm->dev,
675 usb_sndintpipe(acm->dev, epwrite->bEndpointAddress),
676 buffer_cmd, sizeof(cmd),
677 &actual_len, USB_CTRL_SET_TIMEOUT);
678 kfree(buffer_cmd);
679
680 return 0;
681 }
682 EXPORT_SYMBOL_GPL(usb_device_reset);
683
684 int vpu_write_host(u32 id, const char *buf, size_t *size,
685 unsigned int timeout_ms)
686 {
687 int len = *size;
688 int ret = 0;
689 struct acm *xdev = usb_get_device_by_id(id);
690 struct acm *acm;
691 int index = 0;
692 long jiffies_passed = 0;
693 long jiffies_timeout = (long)msecs_to_jiffies(timeout_ms);
694 int retval = -ENODEV;
695 int i;
696
697 if (!xdev)
698 return -EINVAL;
699
700 acm = vpu_acm_get_by_minor(index);
701 if (!acm)
702 return -EINVAL;
703
704 ret = wait_event_interruptible_timeout(acm->wioctl,
705 acm, jiffies_timeout - jiffies_passed);
706 if (ret == 0)
707 return -ETIME;
708
709 *size = 0;
710 if (len == 0)
711 return -EINVAL;
712
713 mutex_lock(&acm->mutex);
714 if (acm->disconnected)
715 goto disconnected;
716
717 retval = usb_autopm_get_interface(acm->control);
718 if (retval)
719 goto error_get_interface;
720 /*
721 * FIXME: Why do we need this? Allocating 64K of physically contiguous
722 * memory is really nasty...
723 */
724 acm->control->needs_remote_wakeup = 1;
725
726 acm->ctrlurb->dev = acm->dev;
727 retval = usb_submit_urb(acm->ctrlurb, GFP_KERNEL);
728 if (retval) {
729 dev_err(&acm->control->dev,
730 "%s - usb_submit_urb(ctrl irq) failed\n", __func__);
731 goto error_submit_urb;
732 }
733
734 /*
735 * Unthrottle device in case the TTY was closed while throttled.
736 */
737 clear_bit(ACM_THROTTLED, &acm->flags);
738
739 retval = vpu_acm_submit_read_urbs(acm, GFP_KERNEL);
740 if (retval)
741 goto error_submit_read_urbs;
742
743 usb_autopm_put_interface(acm->control);
744
745 mutex_unlock(&acm->mutex);
746
747 vpu_acm_submit_read_urbs(acm, GFP_KERNEL);
748
749 int val = ACM_CTRL_DTR | ACM_CTRL_RTS;
750
751 acm->ctrlout = val;
752 vpu_acm_set_control(acm, val);
753
> 754 int count = len;
755 int stat;
756 unsigned long flags;
757 int wbn;
758 struct acm_wb *wb;
759
760 if (!count)
761 return -EINVAL;
762
763 dev_vdbg(&acm->data->dev, "%d bytes from tty layer\n", count);
764
765 spin_lock_irqsave(&acm->write_lock, flags);
766 wbn = vpu_acm_wb_alloc(acm);
767 if (wbn < 0) {
768 spin_unlock_irqrestore(&acm->write_lock, flags);
769 return -EINVAL;
770 }
771 wb = &acm->wb[wbn];
772
773 if (!acm->dev) {
774 wb->use = 0;
775 spin_unlock_irqrestore(&acm->write_lock, flags);
776 return -EINVAL;
777 }
778
779 count = (count > acm->writesize) ? acm->writesize : count;
780 dev_vdbg(&acm->data->dev, "writing %d bytes\n", count);
781 memcpy(wb->buf, buf, count);
782 wb->len = count;
783 len = count;
784 stat = usb_autopm_get_interface_async(acm->control);
785 if (stat) {
786 wb->use = 0;
787 spin_unlock_irqrestore(&acm->write_lock, flags);
788 return -EINVAL;
789 }
790
791 if (acm->susp_count) {
792 usb_anchor_urb(wb->urb, &acm->delayed);
793 spin_unlock_irqrestore(&acm->write_lock, flags);
794 return -EINVAL;
795 }
796 stat = vpu_acm_start_wb(acm, wb);
797 spin_unlock_irqrestore(&acm->write_lock, flags);
798
799 if (stat < 0)
800 return -EINVAL;
801
802 error_submit_read_urbs:
803 for (i = 0; i < acm->rx_buflimit; i++)
804 usb_kill_urb(acm->read_urbs[i]);
805 usb_kill_urb(acm->ctrlurb);
806 error_submit_urb:
807 usb_autopm_put_interface(acm->control);
808 error_get_interface:
809 disconnected:
810 mutex_unlock(&acm->mutex);
811 *size = len;
812 return 0;
813 }
814 EXPORT_SYMBOL_GPL(vpu_write_host);
815
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[intel-linux-intel-lts:5.4/yocto 39/9195] drivers/trusty/trusty.c:282:9: warning: no previous prototype for function 'trusty_version_show'
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: 87241c08286384feb3ddc57d4cb0daca4be1e384
commit: 7e855c11a2297ad72d2952f075dd82640f3cd70a [39/9195] Modify Google's trusty drivers so as to support Intel platform
config: x86_64-randconfig-r023-20200811 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 4f2ad15db535873dda9bfe248a2771023b64a43c)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout 7e855c11a2297ad72d2952f075dd82640f3cd70a
# 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/trusty/trusty.c:282:9: warning: no previous prototype for function 'trusty_version_show' [-Wmissing-prototypes]
ssize_t trusty_version_show(struct device *dev, struct device_attribute *attr,
^
drivers/trusty/trusty.c:282:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
ssize_t trusty_version_show(struct device *dev, struct device_attribute *attr,
^
static
>> drivers/trusty/trusty.c:439:6: warning: no previous prototype for function 'trusty_dev_release' [-Wmissing-prototypes]
void trusty_dev_release(struct device *dev)
^
drivers/trusty/trusty.c:439:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void trusty_dev_release(struct device *dev)
^
static
2 warnings generated.
--
drivers/trusty/trusty-irq.c:214:13: warning: no previous prototype for function 'trusty_irq_handler' [-Wmissing-prototypes]
irqreturn_t trusty_irq_handler(int irq, void *data)
^
drivers/trusty/trusty-irq.c:214:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
irqreturn_t trusty_irq_handler(int irq, void *data)
^
static
drivers/trusty/trusty-irq.c:282:20: error: use of undeclared identifier 'CPU_TASKS_FROZEN'
switch (action & ~CPU_TASKS_FROZEN) {
^
>> drivers/trusty/trusty-irq.c:394:6: warning: no previous prototype for function 'trusty_irq_eoi' [-Wmissing-prototypes]
void trusty_irq_eoi(struct irq_data *data)
^
drivers/trusty/trusty-irq.c:394:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void trusty_irq_eoi(struct irq_data *data)
^
static
drivers/trusty/trusty-irq.c:637:8: error: implicit declaration of function 'register_hotcpu_notifier' [-Werror,-Wimplicit-function-declaration]
ret = register_hotcpu_notifier(&is->cpu_notifier);
^
drivers/trusty/trusty-irq.c:637:8: note: did you mean 'register_module_notifier'?
include/linux/module.h:662:5: note: 'register_module_notifier' declared here
int register_module_notifier(struct notifier_block *nb);
^
drivers/trusty/trusty-irq.c:642:6: error: assigning to 'int' from incompatible type 'void'
ret = on_each_cpu(trusty_irq_cpu_up, is, 0);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/trusty/trusty-irq.c:651:2: error: implicit declaration of function 'unregister_hotcpu_notifier' [-Werror,-Wimplicit-function-declaration]
unregister_hotcpu_notifier(&is->cpu_notifier);
^
drivers/trusty/trusty-irq.c:651:2: note: did you mean 'register_hotcpu_notifier'?
drivers/trusty/trusty-irq.c:637:8: note: 'register_hotcpu_notifier' declared here
ret = register_hotcpu_notifier(&is->cpu_notifier);
^
drivers/trusty/trusty-irq.c:687:2: error: implicit declaration of function 'unregister_hotcpu_notifier' [-Werror,-Wimplicit-function-declaration]
unregister_hotcpu_notifier(&is->cpu_notifier);
^
drivers/trusty/trusty-irq.c:688:6: error: assigning to 'int' from incompatible type 'void'
ret = on_each_cpu(trusty_irq_cpu_down, is, 1);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/trusty/trusty-irq.c:283:7: error: use of undeclared identifier 'CPU_STARTING'
case CPU_STARTING:
^
drivers/trusty/trusty-irq.c:286:7: error: use of undeclared identifier 'CPU_DYING'
case CPU_DYING:
^
2 warnings and 8 errors generated.
--
drivers/trusty/trusty-virtio.c:323:17: error: no member named 'reserved' in 'struct fw_rsc_vdev_vring'
tvr->vr_descr->reserved = (u32)(pa >> 32);
~~~~~~~~~~~~~ ^
drivers/trusty/trusty-virtio.c:330:47: error: too few arguments to function call, expected 10, have 9
trusty_virtio_notify, callback, name);
^
include/linux/virtio_ring.h:94:19: note: 'vring_new_virtqueue' declared here
struct virtqueue *vring_new_virtqueue(unsigned int index,
^
drivers/trusty/trusty-virtio.c:380:14: error: incompatible function pointer types initializing 'int (*)(struct virtio_device *, unsigned int, struct virtqueue **, vq_callback_t **, const char *const *, const bool *, struct irq_affinity *)' (aka 'int (*)(struct virtio_device *, unsigned int, struct virtqueue **, void (**)(struct virtqueue *), const char *const *, const _Bool *, struct irq_affinity *)') with an expression of type 'int (struct virtio_device *, unsigned int, struct virtqueue **, vq_callback_t **, const char **)' (aka 'int (struct virtio_device *, unsigned int, struct virtqueue **, void (**)(struct virtqueue *), const char **)') [-Werror,-Wincompatible-function-pointer-types]
.find_vqs = trusty_virtio_find_vqs,
^~~~~~~~~~~~~~~~~~~~~~
>> drivers/trusty/trusty-virtio.c:385:6: warning: no previous prototype for function 'virtio_vdev_release' [-Wmissing-prototypes]
void virtio_vdev_release(struct device *dev)
^
drivers/trusty/trusty-virtio.c:385:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void virtio_vdev_release(struct device *dev)
^
static
1 warning and 3 errors generated.
vim +/trusty_version_show +282 drivers/trusty/trusty.c
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 281
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 @282 ssize_t trusty_version_show(struct device *dev, struct device_attribute *attr,
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 283 char *buf)
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 284 {
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 285 struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 286
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 287 return scnprintf(buf, PAGE_SIZE, "%s\n", s->version_str);
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 288 }
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 289
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 290 DEVICE_ATTR(trusty_version, S_IRUSR, trusty_version_show, NULL);
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 291
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 292 const char *trusty_version_str_get(struct device *dev)
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 293 {
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 294 struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 295
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 296 return s->version_str;
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 297 }
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 298 EXPORT_SYMBOL(trusty_version_str_get);
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 299
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 300 static void trusty_init_version(struct trusty_state *s, struct device *dev)
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 301 {
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 302 int ret;
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 303 int i;
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 304 int version_str_len;
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 305
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 306 ret = trusty_fast_call32(dev, SMC_FC_GET_VERSION_STR, -1, 0, 0);
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 307 if (ret <= 0)
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 308 goto err_get_size;
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 309
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 310 version_str_len = ret;
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 311
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 312 s->version_str = kmalloc(version_str_len + 1, GFP_KERNEL);
7e855c11a2297a weideng 2016-10-28 313 if (!s->version_str)
7e855c11a2297a weideng 2016-10-28 314 goto err_get_size;
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 315 for (i = 0; i < version_str_len; i++) {
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 316 ret = trusty_fast_call32(dev, SMC_FC_GET_VERSION_STR, i, 0, 0);
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 317 if (ret < 0)
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 318 goto err_get_char;
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 319 s->version_str[i] = ret;
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 320 }
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 321 s->version_str[i] = '\0';
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 322
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 323 dev_info(dev, "trusty version: %s\n", s->version_str);
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 324
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 325 ret = device_create_file(dev, &dev_attr_trusty_version);
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 326 if (ret)
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 327 goto err_create_file;
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 328 return;
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 329
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 330 err_create_file:
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 331 err_get_char:
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 332 kfree(s->version_str);
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 333 s->version_str = NULL;
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 334 err_get_size:
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 335 dev_err(dev, "failed to get version: %d\n", ret);
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 336 }
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 337
f734a5b21364b1 Arve Hjønnevåg 2015-06-11 338 u32 trusty_get_api_version(struct device *dev)
f734a5b21364b1 Arve Hjønnevåg 2015-06-11 339 {
f734a5b21364b1 Arve Hjønnevåg 2015-06-11 340 struct trusty_state *s = platform_get_drvdata(to_platform_device(dev));
f734a5b21364b1 Arve Hjønnevåg 2015-06-11 341
f734a5b21364b1 Arve Hjønnevåg 2015-06-11 342 return s->api_version;
f734a5b21364b1 Arve Hjønnevåg 2015-06-11 343 }
f734a5b21364b1 Arve Hjønnevåg 2015-06-11 344 EXPORT_SYMBOL(trusty_get_api_version);
f734a5b21364b1 Arve Hjønnevåg 2015-06-11 345
f734a5b21364b1 Arve Hjønnevåg 2015-06-11 346 static int trusty_init_api_version(struct trusty_state *s, struct device *dev)
f734a5b21364b1 Arve Hjønnevåg 2015-06-11 347 {
f734a5b21364b1 Arve Hjønnevåg 2015-06-11 348 u32 api_version;
f734a5b21364b1 Arve Hjønnevåg 2015-06-11 349 api_version = trusty_fast_call32(dev, SMC_FC_API_VERSION,
f734a5b21364b1 Arve Hjønnevåg 2015-06-11 350 TRUSTY_API_VERSION_CURRENT, 0, 0);
f734a5b21364b1 Arve Hjønnevåg 2015-06-11 351 if (api_version == SM_ERR_UNDEFINED_SMC)
f734a5b21364b1 Arve Hjønnevåg 2015-06-11 352 api_version = 0;
f734a5b21364b1 Arve Hjønnevåg 2015-06-11 353
f734a5b21364b1 Arve Hjønnevåg 2015-06-11 354 if (api_version > TRUSTY_API_VERSION_CURRENT) {
f734a5b21364b1 Arve Hjønnevåg 2015-06-11 355 dev_err(dev, "unsupported api version %u > %u\n",
f734a5b21364b1 Arve Hjønnevåg 2015-06-11 356 api_version, TRUSTY_API_VERSION_CURRENT);
f734a5b21364b1 Arve Hjønnevåg 2015-06-11 357 return -EINVAL;
f734a5b21364b1 Arve Hjønnevåg 2015-06-11 358 }
f734a5b21364b1 Arve Hjønnevåg 2015-06-11 359
f734a5b21364b1 Arve Hjønnevåg 2015-06-11 360 dev_info(dev, "selected api version: %u (requested %u)\n",
f734a5b21364b1 Arve Hjønnevåg 2015-06-11 361 api_version, TRUSTY_API_VERSION_CURRENT);
f734a5b21364b1 Arve Hjønnevåg 2015-06-11 362 s->api_version = api_version;
f734a5b21364b1 Arve Hjønnevåg 2015-06-11 363
f734a5b21364b1 Arve Hjønnevåg 2015-06-11 364 return 0;
f734a5b21364b1 Arve Hjønnevåg 2015-06-11 365 }
f734a5b21364b1 Arve Hjønnevåg 2015-06-11 366
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 367 static int trusty_probe(struct platform_device *pdev)
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 368 {
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 369 int ret;
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 370 struct trusty_state *s;
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 371 struct device_node *node = pdev->dev.of_node;
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 372
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 373 if (!node) {
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 374 dev_err(&pdev->dev, "of_node required\n");
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 375 return -EINVAL;
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 376 }
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 377
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 378 s = kzalloc(sizeof(*s), GFP_KERNEL);
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 379 if (!s) {
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 380 ret = -ENOMEM;
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 381 goto err_allocate_state;
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 382 }
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 383 mutex_init(&s->smc_lock);
0bead160edaa03 Arve Hjønnevåg 2016-05-05 384 ATOMIC_INIT_NOTIFIER_HEAD(&s->notifier);
2680cdd3b9cc6b Arve Hjønnevåg 2015-01-23 385 init_completion(&s->cpu_idle_completion);
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 386 platform_set_drvdata(pdev, s);
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 387
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 388 trusty_init_version(s, &pdev->dev);
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 389
f734a5b21364b1 Arve Hjønnevåg 2015-06-11 390 ret = trusty_init_api_version(s, &pdev->dev);
f734a5b21364b1 Arve Hjønnevåg 2015-06-11 391 if (ret < 0)
f734a5b21364b1 Arve Hjønnevåg 2015-06-11 392 goto err_api_version;
f734a5b21364b1 Arve Hjønnevåg 2015-06-11 393
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 394 return 0;
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 395
f734a5b21364b1 Arve Hjønnevåg 2015-06-11 396 err_api_version:
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 397 if (s->version_str) {
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 398 device_remove_file(&pdev->dev, &dev_attr_trusty_version);
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 399 kfree(s->version_str);
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 400 }
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 401 device_for_each_child(&pdev->dev, NULL, trusty_remove_child);
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 402 mutex_destroy(&s->smc_lock);
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 403 kfree(s);
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 404 err_allocate_state:
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 405 return ret;
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 406 }
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 407
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 408 static int trusty_remove(struct platform_device *pdev)
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 409 {
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 410 struct trusty_state *s = platform_get_drvdata(pdev);
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 411
7e855c11a2297a weideng 2016-10-28 412 dev_dbg(&(pdev->dev), "%s() is called\n", __func__);
7e855c11a2297a weideng 2016-10-28 413
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 414 device_for_each_child(&pdev->dev, NULL, trusty_remove_child);
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 415 mutex_destroy(&s->smc_lock);
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 416 if (s->version_str) {
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 417 device_remove_file(&pdev->dev, &dev_attr_trusty_version);
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 418 kfree(s->version_str);
3db108326d2fe8 Arve Hjønnevåg 2014-10-09 419 }
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 420 kfree(s);
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 421 return 0;
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 422 }
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 423
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 424 static const struct of_device_id trusty_of_match[] = {
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 425 { .compatible = "android,trusty-smc-v1", },
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 426 {},
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 427 };
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 428
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 429 static struct platform_driver trusty_driver = {
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 430 .probe = trusty_probe,
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 431 .remove = trusty_remove,
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 432 .driver = {
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 433 .name = "trusty",
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 434 .owner = THIS_MODULE,
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 435 .of_match_table = trusty_of_match,
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 436 },
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 437 };
86d0dcf35966f0 Arve Hjønnevåg 2013-11-18 438
7e855c11a2297a weideng 2016-10-28 @439 void trusty_dev_release(struct device *dev)
7e855c11a2297a weideng 2016-10-28 440 {
7e855c11a2297a weideng 2016-10-28 441 dev_dbg(dev, "%s() is called()\n", __func__);
7e855c11a2297a weideng 2016-10-28 442 return;
7e855c11a2297a weideng 2016-10-28 443 }
7e855c11a2297a weideng 2016-10-28 444
:::::: The code at line 282 was first introduced by commit
:::::: 3db108326d2fe8a24470ecb267fb202ac09f663a trusty: Get version string from trusty
:::::: TO: Arve Hjønnevåg <arve(a)android.com>
:::::: CC: Zhou Furong <furong.zhou(a)intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[f2fs-stable:linux-5.4.y 68/304] fs/f2fs/compress.c:276 lz4_decompress_pages() warn: should '((1) << 12) << dic->log_cluster_size' be a 64 bit
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-stable.git linux-5.4.y
head: 32f28e611d66c134f14ab2a9c4e825899360185c
commit: e0edeff7d744dd471f7264bac4824a8f4e3b613f [68/304] f2fs: support data compression
config: i386-randconfig-m021-20200811 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
smatch warnings:
fs/f2fs/compress.c:276 lz4_decompress_pages() warn: should '((1) << 12) << dic->log_cluster_size' be a 64 bit type?
vim +276 fs/f2fs/compress.c
262
263 static int lz4_decompress_pages(struct decompress_io_ctx *dic)
264 {
265 int ret;
266
267 ret = LZ4_decompress_safe(dic->cbuf->cdata, dic->rbuf,
268 dic->clen, dic->rlen);
269 if (ret < 0) {
270 printk_ratelimited("%sF2FS-fs (%s): lz4 decompress failed, ret:%d\n",
271 KERN_ERR, F2FS_I_SB(dic->inode)->sb->s_id, ret);
272 return -EIO;
273 }
274
275 if (ret != PAGE_SIZE << dic->log_cluster_size) {
> 276 printk_ratelimited("%sF2FS-fs (%s): lz4 invalid rlen:%zu, "
277 "expected:%lu\n", KERN_ERR,
278 F2FS_I_SB(dic->inode)->sb->s_id,
279 dic->rlen,
280 PAGE_SIZE << dic->log_cluster_size);
281 return -EIO;
282 }
283 return 0;
284 }
285
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
include/linux/spinlock_api_smp.h:104:29: sparse: sparse: context imbalance in 'vpe_to_cpuid_lock' - wrong count at exit
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 00e4db51259a5f936fec1424b884f029479d3981
commit: f3a059219bc718ccc3bf3ff894f089b7e9a93139 irqchip/gic-v4.1: Ensure mutual exclusion between vPE affinity change and RD access
date: 5 months ago
config: arm64-randconfig-s032-20200811 (attached as .config)
compiler: aarch64-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.2-168-g9554805c-dirty
git checkout f3a059219bc718ccc3bf3ff894f089b7e9a93139
# 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=arm64
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/irqchip/irq-gic-v3-its.c: note: in included file (through include/linux/spinlock.h, include/linux/radix-tree.h, include/linux/idr.h, ...):
>> include/linux/spinlock_api_smp.h:104:29: sparse: sparse: context imbalance in 'vpe_to_cpuid_lock' - wrong count at exit
drivers/irqchip/irq-gic-v3-its.c:248:13: sparse: sparse: context imbalance in 'vpe_to_cpuid_unlock' - unexpected unlock
vim +/vpe_to_cpuid_lock +104 include/linux/spinlock_api_smp.h
69d0ee7377eef8 Heiko Carstens 2009-08-31 103
9c1721aa4994f6 Thomas Gleixner 2009-12-03 @104 static inline unsigned long __raw_spin_lock_irqsave(raw_spinlock_t *lock)
69d0ee7377eef8 Heiko Carstens 2009-08-31 105 {
69d0ee7377eef8 Heiko Carstens 2009-08-31 106 unsigned long flags;
69d0ee7377eef8 Heiko Carstens 2009-08-31 107
69d0ee7377eef8 Heiko Carstens 2009-08-31 108 local_irq_save(flags);
69d0ee7377eef8 Heiko Carstens 2009-08-31 109 preempt_disable();
69d0ee7377eef8 Heiko Carstens 2009-08-31 110 spin_acquire(&lock->dep_map, 0, 0, _RET_IP_);
69d0ee7377eef8 Heiko Carstens 2009-08-31 111 /*
69d0ee7377eef8 Heiko Carstens 2009-08-31 112 * On lockdep we dont want the hand-coded irq-enable of
9828ea9d75c38f Thomas Gleixner 2009-12-03 113 * do_raw_spin_lock_flags() code, because lockdep assumes
69d0ee7377eef8 Heiko Carstens 2009-08-31 114 * that interrupts are not re-enabled during lock-acquire:
69d0ee7377eef8 Heiko Carstens 2009-08-31 115 */
69d0ee7377eef8 Heiko Carstens 2009-08-31 116 #ifdef CONFIG_LOCKDEP
9828ea9d75c38f Thomas Gleixner 2009-12-03 117 LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock);
69d0ee7377eef8 Heiko Carstens 2009-08-31 118 #else
9828ea9d75c38f Thomas Gleixner 2009-12-03 119 do_raw_spin_lock_flags(lock, &flags);
69d0ee7377eef8 Heiko Carstens 2009-08-31 120 #endif
69d0ee7377eef8 Heiko Carstens 2009-08-31 121 return flags;
69d0ee7377eef8 Heiko Carstens 2009-08-31 122 }
69d0ee7377eef8 Heiko Carstens 2009-08-31 123
:::::: The code at line 104 was first introduced by commit
:::::: 9c1721aa4994f6625decbd915241f3a94ee2fe67 locking: Cleanup the name space completely
:::::: TO: Thomas Gleixner <tglx(a)linutronix.de>
:::::: CC: Thomas Gleixner <tglx(a)linutronix.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[powerpc:next-test 33/34] arch/powerpc/platforms/powermac/smp.c:933:2: error: implicit declaration of function 'low_cpu_offline_self'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next-test
head: 0a2900256840208c4a4248ff5900ae57990d55dc
commit: 7f24f76bc606cbae1b56a8a445a5353594c3cf18 [33/34] powerpc/smp: Move ppc_md.cpu_die() to smp_ops.cpu_offline_self()
config: powerpc-randconfig-r024-20200811 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 4f2ad15db535873dda9bfe248a2771023b64a43c)
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 powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
git checkout 7f24f76bc606cbae1b56a8a445a5353594c3cf18
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
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/powerpc/platforms/powermac/smp.c:419:13: warning: no previous prototype for function 'smp_psurge_take_timebase' [-Wmissing-prototypes]
void __init smp_psurge_take_timebase(void)
^
arch/powerpc/platforms/powermac/smp.c:419:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __init smp_psurge_take_timebase(void)
^
static
arch/powerpc/platforms/powermac/smp.c:435:13: warning: no previous prototype for function 'smp_psurge_give_timebase' [-Wmissing-prototypes]
void __init smp_psurge_give_timebase(void)
^
arch/powerpc/platforms/powermac/smp.c:435:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __init smp_psurge_give_timebase(void)
^
static
>> arch/powerpc/platforms/powermac/smp.c:933:2: error: implicit declaration of function 'low_cpu_offline_self' [-Werror,-Wimplicit-function-declaration]
low_cpu_offline_self();
^
arch/powerpc/platforms/powermac/smp.c:933:2: note: did you mean 'pmac_cpu_offline_self'?
arch/powerpc/platforms/powermac/smp.c:923:13: note: 'pmac_cpu_offline_self' declared here
static void pmac_cpu_offline_self(void)
^
2 warnings and 1 error generated.
vim +/low_cpu_offline_self +933 arch/powerpc/platforms/powermac/smp.c
922
923 static void pmac_cpu_offline_self(void)
924 {
925 int cpu = smp_processor_id();
926
927 local_irq_disable();
928 idle_task_exit();
929 pr_debug("CPU%d offline\n", cpu);
930 generic_set_cpu_dead(cpu);
931 smp_wmb();
932 mb();
> 933 low_cpu_offline_self();
934 }
935
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[intel-linux-intel-lts:5.4/yocto 26/9195] drivers/trusty/trusty-irq.c:172:13: warning: no previous prototype for function 'trusty_irq_handler'
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: 87241c08286384feb3ddc57d4cb0daca4be1e384
commit: 2c840ffbad347c1ba1059dc5b50de9fb26141c06 [26/9195] trusty: Add interrupt support
config: x86_64-randconfig-r023-20200811 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 4f2ad15db535873dda9bfe248a2771023b64a43c)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout 2c840ffbad347c1ba1059dc5b50de9fb26141c06
# 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/trusty/trusty-irq.c:172:13: warning: no previous prototype for function 'trusty_irq_handler' [-Wmissing-prototypes]
irqreturn_t trusty_irq_handler(int irq, void *data)
^
drivers/trusty/trusty-irq.c:172:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
irqreturn_t trusty_irq_handler(int irq, void *data)
^
static
drivers/trusty/trusty-irq.c:238:20: error: use of undeclared identifier 'CPU_TASKS_FROZEN'
switch (action & ~CPU_TASKS_FROZEN) {
^
drivers/trusty/trusty-irq.c:448:8: error: implicit declaration of function 'register_hotcpu_notifier' [-Werror,-Wimplicit-function-declaration]
ret = register_hotcpu_notifier(&is->cpu_notifier);
^
drivers/trusty/trusty-irq.c:448:8: note: did you mean 'register_module_notifier'?
include/linux/module.h:662:5: note: 'register_module_notifier' declared here
int register_module_notifier(struct notifier_block *nb);
^
drivers/trusty/trusty-irq.c:453:6: error: assigning to 'int' from incompatible type 'void'
ret = on_each_cpu(trusty_irq_cpu_up, is, 0);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/trusty/trusty-irq.c:462:2: error: implicit declaration of function 'unregister_hotcpu_notifier' [-Werror,-Wimplicit-function-declaration]
unregister_hotcpu_notifier(&is->cpu_notifier);
^
drivers/trusty/trusty-irq.c:462:2: note: did you mean 'register_hotcpu_notifier'?
drivers/trusty/trusty-irq.c:448:8: note: 'register_hotcpu_notifier' declared here
ret = register_hotcpu_notifier(&is->cpu_notifier);
^
drivers/trusty/trusty-irq.c:496:2: error: implicit declaration of function 'unregister_hotcpu_notifier' [-Werror,-Wimplicit-function-declaration]
unregister_hotcpu_notifier(&is->cpu_notifier);
^
drivers/trusty/trusty-irq.c:497:6: error: assigning to 'int' from incompatible type 'void'
ret = on_each_cpu(trusty_irq_cpu_down, is, 1);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/trusty/trusty-irq.c:239:7: error: use of undeclared identifier 'CPU_STARTING'
case CPU_STARTING:
^
drivers/trusty/trusty-irq.c:242:7: error: use of undeclared identifier 'CPU_DYING'
case CPU_DYING:
^
1 warning and 8 errors generated.
vim +/trusty_irq_handler +172 drivers/trusty/trusty-irq.c
171
> 172 irqreturn_t trusty_irq_handler(int irq, void *data)
173 {
174 struct trusty_irq *trusty_irq = data;
175 struct trusty_irq_state *is = trusty_irq->is;
176 struct trusty_irq_work *trusty_irq_work = this_cpu_ptr(is->irq_work);
177 struct trusty_irq_irqset *irqset;
178
179 dev_dbg(is->dev, "%s: irq %d, percpu %d, cpu %d, enable %d\n",
180 __func__, irq, trusty_irq->irq, smp_processor_id(),
181 trusty_irq->enable);
182
183 if (trusty_irq->percpu) {
184 disable_percpu_irq(irq);
185 irqset = this_cpu_ptr(is->percpu_irqs);
186 } else {
187 disable_irq_nosync(irq);
188 irqset = &is->normal_irqs;
189 }
190
191 spin_lock(&is->normal_irqs_lock);
192 if (trusty_irq->enable) {
193 hlist_del(&trusty_irq->node);
194 hlist_add_head(&trusty_irq->node, &irqset->pending);
195 }
196 spin_unlock(&is->normal_irqs_lock);
197
198 schedule_work_on(raw_smp_processor_id(), &trusty_irq_work->work);
199
200 dev_dbg(is->dev, "%s: irq %d done\n", __func__, irq);
201
202 return IRQ_HANDLED;
203 }
204
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[intel-linux-intel-lts:5.4/yocto 8458/9195] drivers/misc/vpusmm/vpusmm_driver.c:616:11: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'dma_addr_t' {aka 'unsigned int'}
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: 87241c08286384feb3ddc57d4cb0daca4be1e384
commit: 25008f6f07f24ad55251a3f30505723f1c985338 [8458/9195] misc: vpusmm: add alloc/import DMABuf for VPU
config: nios2-randconfig-r026-20200811 (attached as .config)
compiler: nios2-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
git checkout 25008f6f07f24ad55251a3f30505723f1c985338
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2
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/misc/vpusmm/vpusmm_driver.c:406:6: warning: no previous prototype for 'vpusmm_dmabuf_release' [-Wmissing-prototypes]
406 | void vpusmm_dmabuf_release(struct dma_buf *dmabuf)
| ^~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/kernel.h:15,
from include/asm-generic/bug.h:19,
from ./arch/nios2/include/generated/asm/bug.h:1,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from include/asm-generic/current.h:5,
from ./arch/nios2/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from include/linux/uaccess.h:5,
from drivers/misc/vpusmm/vpusmm_driver.c:7:
drivers/misc/vpusmm/vpusmm_driver.c: In function 'vpusmm_session_alloc':
>> drivers/misc/vpusmm/vpusmm_driver.c:616:11: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'dma_addr_t' {aka 'unsigned int'} [-Wformat=]
616 | pr_debug("%s: dma_addr=%llx, phys_addr=%llx allocated from %s\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:283:21: note: in definition of macro 'pr_fmt'
283 | #define pr_fmt(fmt) fmt
| ^~~
include/linux/dynamic_debug.h:143:2: note: in expansion of macro '__dynamic_func_call'
143 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:153:2: note: in expansion of macro '_dynamic_func_call'
153 | _dynamic_func_call(fmt, __dynamic_pr_debug, \
| ^~~~~~~~~~~~~~~~~~
include/linux/printk.h:331:2: note: in expansion of macro 'dynamic_pr_debug'
331 | dynamic_pr_debug(fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~
drivers/misc/vpusmm/vpusmm_driver.c:616:2: note: in expansion of macro 'pr_debug'
616 | pr_debug("%s: dma_addr=%llx, phys_addr=%llx allocated from %s\n",
| ^~~~~~~~
drivers/misc/vpusmm/vpusmm_driver.c:616:28: note: format string is defined here
616 | pr_debug("%s: dma_addr=%llx, phys_addr=%llx allocated from %s\n",
| ~~~^
| |
| long long unsigned int
| %x
In file included from include/linux/kernel.h:15,
from include/asm-generic/bug.h:19,
from ./arch/nios2/include/generated/asm/bug.h:1,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from include/asm-generic/current.h:5,
from ./arch/nios2/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from include/linux/uaccess.h:5,
from drivers/misc/vpusmm/vpusmm_driver.c:7:
>> drivers/misc/vpusmm/vpusmm_driver.c:616:11: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 5 has type 'phys_addr_t' {aka 'unsigned int'} [-Wformat=]
616 | pr_debug("%s: dma_addr=%llx, phys_addr=%llx allocated from %s\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:283:21: note: in definition of macro 'pr_fmt'
283 | #define pr_fmt(fmt) fmt
| ^~~
include/linux/dynamic_debug.h:143:2: note: in expansion of macro '__dynamic_func_call'
143 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:153:2: note: in expansion of macro '_dynamic_func_call'
153 | _dynamic_func_call(fmt, __dynamic_pr_debug, \
| ^~~~~~~~~~~~~~~~~~
include/linux/printk.h:331:2: note: in expansion of macro 'dynamic_pr_debug'
331 | dynamic_pr_debug(fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~
drivers/misc/vpusmm/vpusmm_driver.c:616:2: note: in expansion of macro 'pr_debug'
616 | pr_debug("%s: dma_addr=%llx, phys_addr=%llx allocated from %s\n",
| ^~~~~~~~
drivers/misc/vpusmm/vpusmm_driver.c:616:44: note: format string is defined here
616 | pr_debug("%s: dma_addr=%llx, phys_addr=%llx allocated from %s\n",
| ~~~^
| |
| long long unsigned int
| %x
In file included from include/linux/cdev.h:8,
from drivers/misc/vpusmm/vpusmm_driver.c:12:
drivers/misc/vpusmm/vpusmm_driver.c: In function 'vpusmm_probe':
drivers/misc/vpusmm/vpusmm_driver.c:935:18: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 5 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=]
935 | dev_info(dev, " %s %zuMB %llx~%llx\n", dev_name(mem_dev), mem_size/(1024*1024),
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/device.h:1658:22: note: in definition of macro 'dev_fmt'
1658 | #define dev_fmt(fmt) fmt
| ^~~
drivers/misc/vpusmm/vpusmm_driver.c:935:4: note: in expansion of macro 'dev_info'
935 | dev_info(dev, " %s %zuMB %llx~%llx\n", dev_name(mem_dev), mem_size/(1024*1024),
| ^~~~~~~~
drivers/misc/vpusmm/vpusmm_driver.c:935:32: note: format string is defined here
935 | dev_info(dev, " %s %zuMB %llx~%llx\n", dev_name(mem_dev), mem_size/(1024*1024),
| ~~~^
| |
| long long unsigned int
| %x
In file included from include/linux/cdev.h:8,
from drivers/misc/vpusmm/vpusmm_driver.c:12:
drivers/misc/vpusmm/vpusmm_driver.c:935:18: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 6 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=]
935 | dev_info(dev, " %s %zuMB %llx~%llx\n", dev_name(mem_dev), mem_size/(1024*1024),
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/device.h:1658:22: note: in definition of macro 'dev_fmt'
1658 | #define dev_fmt(fmt) fmt
| ^~~
drivers/misc/vpusmm/vpusmm_driver.c:935:4: note: in expansion of macro 'dev_info'
935 | dev_info(dev, " %s %zuMB %llx~%llx\n", dev_name(mem_dev), mem_size/(1024*1024),
| ^~~~~~~~
drivers/misc/vpusmm/vpusmm_driver.c:935:37: note: format string is defined here
935 | dev_info(dev, " %s %zuMB %llx~%llx\n", dev_name(mem_dev), mem_size/(1024*1024),
| ~~~^
| |
| long long unsigned int
| %x
vim +616 drivers/misc/vpusmm/vpusmm_driver.c
534
535 /* allocate dma buffer suitable for VPU access.
536 * export as DMABuf fd
537 * sess will hold additional refcount to the dmabuf
538 * on request of passing it to VPU side for processing
539 */
540 static long vpusmm_session_alloc(struct vpusmm_session *sess, struct vpusmm_args_alloc *arg)
541 {
542 int retval = 0;
543 size_t buffer_size = arg->size;
544 struct vpusmm_device *dev = sess->dev;
545 struct dma_buf *dmabuf = NULL;
546 const int flags = O_RDWR | O_CLOEXEC;
547 phys_addr_t phys_addr;
548 struct dma_buf_export_info exp_info = {
549 .exp_name = KBUILD_MODNAME, /*white lie for debug */
550 .owner = THIS_MODULE,
551 .ops = &vpusmm_dmabuf_ops,
552 .size = buffer_size,
553 .flags = flags
554 };
555 struct vpusmm_buffer *buff = NULL;
556
557 // only allocate from the first rmem, user-space API unchanged
558 if (dev->rmem_cnt <= 0) {
559 retval = -ENODEV;
560 goto failed;
561 }
562
563 buff = kzalloc(sizeof(*buff), GFP_KERNEL);
564 if (buff == NULL) {
565 retval = -ENOMEM;
566 goto failed;
567 }
568
569 buff->dev = dev->mem_dev[0];
570 buff->size = buffer_size;
571
572 buff->dma_attrs = 0;
573
574 if (arg->force_physical_contiguous)
575 buff->dma_attrs |= DMA_ATTR_FORCE_CONTIGUOUS;
576
577 if (arg->cachable)
578 buff->dma_attrs |= DMA_ATTR_NON_CONSISTENT;
579 else
580 buff->dma_attrs |= DMA_ATTR_WRITE_COMBINE;
581
582 // we need Kernel mapping to support dmabuf op vmap
583 buff->dma_attrs &= ~DMA_ATTR_NO_KERNEL_MAPPING;
584
585 buff->cookie = dma_alloc_attrs(
586 dev->mem_dev[0],
587 buff->size,
588 &buff->dma_addr,
589 GFP_KERNEL | GFP_DMA,
590 buff->dma_attrs);
591 if (buff->cookie == NULL) {
592 pr_info("[VPUSMM]:dma_alloc_attrs failed: size=%zu\n", buff->size);
593 retval = -ENOMEM;
594 goto failed;
595 }
596
597 phys_addr = dma_to_phys(dev->mem_dev[0], buff->dma_addr);
598
599 //export the buffer as DMABuf
600 exp_info.priv = buff;
601 dmabuf = dma_buf_export(&exp_info);
602 if (IS_ERR(dmabuf)) {
603 retval = PTR_ERR(dmabuf);
604 dmabuf = NULL;
605 goto failed;
606 }
607
608 retval = dma_buf_fd(dmabuf, flags);
609 if (retval < 0) {
610 goto failed;
611 } else {
612 arg->fd = retval;
613 retval = 0;
614 }
615
> 616 pr_debug("%s: dma_addr=%llx, phys_addr=%llx allocated from %s\n",
617 __func__, buff->dma_addr, phys_addr, dev_name(dev->dev));
618
619 return 0;
620 failed:
621 pr_err("%s failed with %d\n", __func__, retval);
622
623 if (dmabuf) {
624 // this will finally release underlying buff
625 dma_buf_put(dmabuf);
626 } else if (buff) {
627 if (buff->cookie)
628 dma_free_attrs(dev->mem_dev[0], buff->size, buff->cookie, buff->dma_addr, buff->dma_attrs);
629 kfree(buff);
630 }
631 return retval;
632 }
633
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[intel-linux-intel-lts:5.4/yocto 8378/9195] drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:993:47: sparse: sparse: incorrect type in assignment (different base types)
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: 87241c08286384feb3ddc57d4cb0daca4be1e384
commit: beacc09a3cf774f4c9f3010b2098a15c1a883320 [8378/9195] dmaengine: dw-axi-dma: support cyclic mode
config: x86_64-randconfig-s021-20200811 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-168-g9554805c-dirty
git checkout beacc09a3cf774f4c9f3010b2098a15c1a883320
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
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/dma/dw-axi-dmac/dw-axi-dmac-platform.c:993:47: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] block_ts_lo @@ got unsigned long @@
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:993:47: sparse: expected restricted __le32 [usertype] block_ts_lo
>> drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:993:47: sparse: got unsigned long
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1068:55: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] block_ts_lo @@ got unsigned long @@
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1068:55: sparse: expected restricted __le32 [usertype] block_ts_lo
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1068:55: sparse: got unsigned long
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1070:55: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] block_ts_lo @@ got unsigned long @@
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1070:55: sparse: expected restricted __le32 [usertype] block_ts_lo
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1070:55: sparse: got unsigned long
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1169:59: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned int [usertype] irq_mask @@ got restricted __le32 [usertype] status_lo @@
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1169:59: sparse: expected unsigned int [usertype] irq_mask
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1169:59: sparse: got restricted __le32 [usertype] status_lo
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1170:42: sparse: sparse: invalid assignment: |=
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1170:42: sparse: left side has type restricted __le32
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1170:42: sparse: right side has type unsigned long
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1111:22: sparse: sparse: context imbalance in 'axi_chan_handle_err' - different lock contexts for basic block
vim +993 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
912
913 static struct dma_async_tx_descriptor *
914 dw_chan_prep_dma_cyclic(struct dma_chan *dchan, dma_addr_t buf_addr,
915 size_t buf_len, size_t period_len,
916 enum dma_transfer_direction direction,
917 unsigned long flags)
918 {
919 struct axi_dma_chan *chan = dchan_to_axi_dma_chan(dchan);
920 struct axi_dma_desc *first = NULL, *prev = NULL;
921 unsigned int reg_width;
922 unsigned int mem_width;
923 unsigned int data_width = BIT(chan->chip->dw->hdata->m_data_width);
924 dma_addr_t reg;
925 u32 reg_value = 0;
926 unsigned int i = 0;
927 u32 ctllo, ctlhi;
928 size_t total_len = 0;
929 size_t block_ts, max_block_ts;
930 u8 lms = 0; // Select AXI0 master for LLI fetching
931 u32 offset;
932
933 if (unlikely(!is_slave_direction(direction)))
934 return NULL;
935
936 chan->direction = direction;
937 chan->cyclic = 0x1;
938
939 max_block_ts = chan->chip->dw->hdata->block_size[chan->id];
940
941 axi_set_hw_channel(chan->chip, chan->hw_hs_num);
942
943 switch (direction) {
944 case DMA_MEM_TO_DEV:
945 reg_width = __ffs(chan->slave_config.dst_addr_width);
946
947 chan->reg_width = reg_width;
948 if (reg_width == DWAXIDMAC_TRANS_WIDTH_16) {
949 offset = DMAC_APB_HALFWORD_WR_CH_EN;
950 reg_value = axi_dma_apb_ioread32(chan->chip, offset);
951 reg_value |= 0x1 << chan->id;
952 axi_dma_apb_iowrite32(chan->chip,
953 DMAC_APB_HALFWORD_WR_CH_EN, reg_value);
954 } else if (reg_width == DWAXIDMAC_TRANS_WIDTH_8) {
955 offset = DMAC_APB_BYTE_WR_CH_EN;
956 reg_value = axi_dma_apb_ioread32(chan->chip, offset);
957 reg_value |= 0x1 << chan->id;
958 axi_dma_apb_iowrite32(chan->chip, offset, reg_value);
959 }
960 reg = chan->slave_config.dst_addr;
961
962 ctllo = axi_dma_prepare_ctllo(chan) |
963 reg_width << CH_CTL_L_DST_WIDTH_POS |
964 DWAXIDMAC_CH_CTL_L_NOINC << CH_CTL_L_DST_INC_POS |
965 DWAXIDMAC_CH_CTL_L_INC << CH_CTL_L_SRC_INC_POS;
966
967 for (i = 0; i < buf_len / period_len; i++) {
968 struct axi_dma_desc *desc;
969 size_t xfer_len;
970 u32 mem, len;
971
972 mem_width = __ffs(data_width | mem | len);
973 if (mem_width > DWAXIDMAC_TRANS_WIDTH_32)
974 mem_width = DWAXIDMAC_TRANS_WIDTH_32;
975
976 xfer_len = period_len;
977 block_ts = period_len;
978
979 desc = axi_desc_get(chan);
980 if (unlikely(!desc))
981 goto err_desc_get;
982
983 if (block_ts > max_block_ts) {
984 block_ts = max_block_ts;
985 xfer_len = max_block_ts << mem_width;
986 }
987
988 ctlhi = axi_dma_prepare_ctlhi(chan);
989
990 ctllo |= mem_width << CH_CTL_L_SRC_WIDTH_POS;
991 write_desc_sar(desc, buf_addr + i * period_len);
992 write_desc_dar(desc, reg);
> 993 desc->lli.block_ts_lo = period_len / 4;
994 desc->lli.ctl_hi = cpu_to_le32(ctlhi);
995 desc->lli.ctl_lo = cpu_to_le32(ctllo);
996
997 set_desc_src_master(desc);
998 set_desc_src_master(desc);
999
1000 // Manage transfer list (xfer_list)
1001 if (!first) {
1002 first = desc;
1003 } else {
1004 write_desc_llp(prev, desc->vd.tx.phys | lms);
1005 list_add_tail(&desc->xfer_list,
1006 &first->xfer_list);
1007 }
1008 prev = desc;
1009 if (i == ((buf_len / period_len) - 1))
1010 write_desc_llp(prev, first->vd.tx.phys | lms);
1011
1012 total_len += xfer_len;
1013
1014 set_desc_last(desc);
1015 }
1016 break;
1017 case DMA_DEV_TO_MEM:
1018 reg_width = __ffs(chan->slave_config.src_addr_width);
1019
1020 chan->reg_width = reg_width;
1021 if (reg_width == DWAXIDMAC_TRANS_WIDTH_16) {
1022 offset = DMAC_APB_HALFWORD_WR_CH_EN;
1023 reg_value = axi_dma_apb_ioread32(chan->chip, offset);
1024 reg_value |= 0x1 << chan->id;
1025 axi_dma_apb_iowrite32(chan->chip, offset, reg_value);
1026 } else if (reg_width == DWAXIDMAC_TRANS_WIDTH_8) {
1027 offset = DMAC_APB_BYTE_WR_CH_EN;
1028 reg_value = axi_dma_apb_ioread32(chan->chip, offset);
1029 reg_value |= 0x1 << chan->id;
1030 axi_dma_apb_iowrite32(chan->chip, offset, reg_value);
1031 }
1032 reg = chan->slave_config.src_addr;
1033 if (reg_width > DWAXIDMAC_TRANS_WIDTH_32)
1034 reg_width = DWAXIDMAC_TRANS_WIDTH_32;
1035 ctllo = axi_dma_prepare_ctllo(chan) |
1036 reg_width << CH_CTL_L_SRC_WIDTH_POS |
1037 DWAXIDMAC_CH_CTL_L_INC << CH_CTL_L_DST_INC_POS |
1038 // Workaround
1039 DWAXIDMAC_CH_CTL_L_NOINC << CH_CTL_L_SRC_INC_POS;
1040
1041 for (i = 0; i < buf_len / period_len; i++) {
1042 struct axi_dma_desc *desc;
1043 size_t xfer_len;
1044 u32 mem, len;
1045
1046 desc = axi_desc_get(chan);
1047 if (unlikely(!desc))
1048 goto err_desc_get;
1049
1050 xfer_len = len;
1051 block_ts = xfer_len >> reg_width;
1052 if (block_ts > max_block_ts) {
1053 block_ts = max_block_ts;
1054 xfer_len = max_block_ts << reg_width;
1055 }
1056 xfer_len = period_len;
1057 block_ts = period_len;
1058 mem_width = __ffs(data_width | mem | xfer_len);
1059 if (mem_width > DWAXIDMAC_TRANS_WIDTH_32)
1060 mem_width = DWAXIDMAC_TRANS_WIDTH_32;
1061
1062 ctlhi = axi_dma_prepare_ctlhi(chan);
1063 ctllo |= mem_width << CH_CTL_L_DST_WIDTH_POS;
1064
1065 write_desc_sar(desc, reg);
1066 write_desc_dar(desc, buf_addr + i * period_len);
1067 if (reg_width == DWAXIDMAC_TRANS_WIDTH_16)
1068 desc->lli.block_ts_lo = period_len / 2;
1069 else if (reg_width >= DWAXIDMAC_TRANS_WIDTH_32)
1070 desc->lli.block_ts_lo = period_len / 4;
1071 desc->lli.ctl_hi = cpu_to_le32(ctlhi);
1072 desc->lli.ctl_lo = cpu_to_le32(ctllo);
1073
1074 set_desc_src_master(desc);
1075 set_desc_src_master(desc);
1076
1077 // Manage transfer list (xfer_list)
1078 if (!first) {
1079 first = desc;
1080 } else {
1081 write_desc_llp(prev, desc->vd.tx.phys | lms);
1082 list_add_tail(&desc->xfer_list,
1083 &first->xfer_list);
1084 }
1085 prev = desc;
1086 if (i == ((buf_len / period_len) - 1))
1087 write_desc_llp(prev, first->vd.tx.phys | lms);
1088
1089 total_len += xfer_len;
1090
1091 // TODO: check if needed
1092 set_desc_last(desc);
1093 }
1094 break;
1095 default:
1096 return NULL;
1097 }
1098
1099 if (unlikely(!first))
1100 return NULL;
1101
1102 return vchan_tx_prep(&chan->vc, &first->vd, flags);
1103
1104 err_desc_get:
1105 if (first)
1106 axi_desc_put(first);
1107
1108 return NULL;
1109 }
1110
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[intel-linux-intel-lts:5.4/yocto 8544/9195] drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6666:25: error: 'struct dev_pm_info' has no member named 'runtime_auto'
by kernel test robot
Hi Yoong,
FYI, the error/warning still remains.
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: 87241c08286384feb3ddc57d4cb0daca4be1e384
commit: c2dececf73bb98860d5f4fb8b2f4d3462460831f [8544/9195] net: stmmac: enable runtime power management support
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
git checkout c2dececf73bb98860d5f4fb8b2f4d3462460831f
# 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 errors (new ones prefixed by >>):
from include/linux/clk.h:12,
from drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:17:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
In file included from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from include/asm-generic/preempt.h:5,
from ./arch/m68k/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from arch/m68k/include/asm/irqflags.h:6,
from include/linux/irqflags.h:16,
from arch/m68k/include/asm/atomic.h:6,
from include/linux/atomic.h:7,
from include/linux/mutex.h:18,
from include/linux/notifier.h:14,
from include/linux/clk.h:14,
from drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:17:
include/linux/dma-mapping.h: In function 'dma_map_resource':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/asm-generic/bug.h:139:27: note: in definition of macro 'WARN_ON_ONCE'
139 | int __ret_warn_once = !!(condition); \
| ^~~~~~~~~
arch/m68k/include/asm/page_mm.h:170:25: note: in expansion of macro 'virt_addr_valid'
170 | #define pfn_valid(pfn) virt_addr_valid(pfn_to_virt(pfn))
| ^~~~~~~~~~~~~~~
include/linux/dma-mapping.h:355:19: note: in expansion of macro 'pfn_valid'
355 | if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
| ^~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: In function 'stmmac_hwtstamp_set':
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:585:7: warning: variable 'xmac' set but not used [-Wunused-but-set-variable]
585 | bool xmac;
| ^~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: At top level:
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1445:6: warning: no previous prototype for 'stmmac_alloc_rx_buffers' [-Wmissing-prototypes]
1445 | bool stmmac_alloc_rx_buffers(struct stmmac_rx_queue *rx_q, u32 count)
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: In function 'stmmac_alloc_rx_buffers':
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1471:13: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
1471 | while (--i >= 0)
| ^~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: In function 'init_dma_rx_desc_rings':
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1579:15: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
1579 | while (queue >= 0) {
| ^~
In file included from include/linux/printk.h:327,
from include/linux/kernel.h:15,
from include/linux/clk.h:13,
from drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:17:
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: In function 'stmmac_rx':
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:4731:27: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 6 has type 'dma_addr_t' {aka 'unsigned int'} [-Wformat=]
4731 | netdev_dbg(priv->dev, "\tdesc: %p [entry %d] buff=0x%llx\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4732 | p, entry, buf->addr);
| ~~~~~~~~~
| |
| dma_addr_t {aka unsigned int}
include/linux/dynamic_debug.h:125:15: note: in definition of macro '__dynamic_func_call'
125 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:161:2: note: in expansion of macro '_dynamic_func_call'
161 | _dynamic_func_call(fmt, __dynamic_netdev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/netdevice.h:4759:2: note: in expansion of macro 'dynamic_netdev_dbg'
4759 | dynamic_netdev_dbg(__dev, format, ##args); \
| ^~~~~~~~~~~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:4731:5: note: in expansion of macro 'netdev_dbg'
4731 | netdev_dbg(priv->dev, "\tdesc: %p [entry %d] buff=0x%llx\n",
| ^~~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:4731:60: note: format string is defined here
4731 | netdev_dbg(priv->dev, "\tdesc: %p [entry %d] buff=0x%llx\n",
| ~~~^
| |
| long long unsigned int
| %x
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: In function 'stmmac_common_interrupt':
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:5096:6: warning: variable 'queues_count' set but not used [-Wunused-but-set-variable]
5096 | u32 queues_count;
| ^~~~~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: At top level:
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:5701:5: warning: no previous prototype for 'stmmac_xdp_xmit' [-Wmissing-prototypes]
5701 | int stmmac_xdp_xmit(struct net_device *dev, int n, struct xdp_frame **frames,
| ^~~~~~~~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6384:6: warning: no previous prototype for 'stmmac_clean_all_tx_rings' [-Wmissing-prototypes]
6384 | void stmmac_clean_all_tx_rings(struct stmmac_priv *priv)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: In function 'stmmac_dvr_probe':
>> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6666:25: error: 'struct dev_pm_info' has no member named 'runtime_auto'
6666 | if (priv->device->power.runtime_auto) {
| ^
In file included from include/linux/err.h:5,
from include/linux/clk.h:12,
from drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:17:
>> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6667:42: error: 'struct dev_pm_info' has no member named 'usage_count'
6667 | while (atomic_read(&priv->device->power.usage_count) > 0)
| ^
include/linux/compiler.h:261:17: note: in definition of macro '__READ_ONCE'
261 | union { typeof(x) __val; char __c[1]; } __u; \
| ^
arch/m68k/include/asm/atomic.h:21:25: note: in expansion of macro 'READ_ONCE'
21 | #define atomic_read(v) READ_ONCE((v)->counter)
| ^~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6667:10: note: in expansion of macro 'atomic_read'
6667 | while (atomic_read(&priv->device->power.usage_count) > 0)
| ^~~~~~~~~~~
>> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6667:42: error: 'struct dev_pm_info' has no member named 'usage_count'
6667 | while (atomic_read(&priv->device->power.usage_count) > 0)
| ^
include/linux/compiler.h:263:22: note: in definition of macro '__READ_ONCE'
263 | __read_once_size(&(x), __u.__c, sizeof(x)); \
| ^
arch/m68k/include/asm/atomic.h:21:25: note: in expansion of macro 'READ_ONCE'
21 | #define atomic_read(v) READ_ONCE((v)->counter)
| ^~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6667:10: note: in expansion of macro 'atomic_read'
6667 | while (atomic_read(&priv->device->power.usage_count) > 0)
| ^~~~~~~~~~~
>> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6667:42: error: 'struct dev_pm_info' has no member named 'usage_count'
6667 | while (atomic_read(&priv->device->power.usage_count) > 0)
| ^
include/linux/compiler.h:263:42: note: in definition of macro '__READ_ONCE'
263 | __read_once_size(&(x), __u.__c, sizeof(x)); \
| ^
arch/m68k/include/asm/atomic.h:21:25: note: in expansion of macro 'READ_ONCE'
21 | #define atomic_read(v) READ_ONCE((v)->counter)
| ^~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6667:10: note: in expansion of macro 'atomic_read'
6667 | while (atomic_read(&priv->device->power.usage_count) > 0)
| ^~~~~~~~~~~
>> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6667:42: error: 'struct dev_pm_info' has no member named 'usage_count'
6667 | while (atomic_read(&priv->device->power.usage_count) > 0)
| ^
include/linux/compiler.h:265:30: note: in definition of macro '__READ_ONCE'
265 | __read_once_size_nocheck(&(x), __u.__c, sizeof(x)); \
| ^
arch/m68k/include/asm/atomic.h:21:25: note: in expansion of macro 'READ_ONCE'
21 | #define atomic_read(v) READ_ONCE((v)->counter)
| ^~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6667:10: note: in expansion of macro 'atomic_read'
6667 | while (atomic_read(&priv->device->power.usage_count) > 0)
| ^~~~~~~~~~~
>> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6667:42: error: 'struct dev_pm_info' has no member named 'usage_count'
6667 | while (atomic_read(&priv->device->power.usage_count) > 0)
| ^
include/linux/compiler.h:265:50: note: in definition of macro '__READ_ONCE'
265 | __read_once_size_nocheck(&(x), __u.__c, sizeof(x)); \
| ^
arch/m68k/include/asm/atomic.h:21:25: note: in expansion of macro 'READ_ONCE'
21 | #define atomic_read(v) READ_ONCE((v)->counter)
| ^~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6667:10: note: in expansion of macro 'atomic_read'
6667 | while (atomic_read(&priv->device->power.usage_count) > 0)
| ^~~~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6670:42: error: 'struct dev_pm_info' has no member named 'usage_count'
6670 | while (atomic_read(&priv->device->power.usage_count) > 1)
| ^
include/linux/compiler.h:261:17: note: in definition of macro '__READ_ONCE'
261 | union { typeof(x) __val; char __c[1]; } __u; \
| ^
arch/m68k/include/asm/atomic.h:21:25: note: in expansion of macro 'READ_ONCE'
21 | #define atomic_read(v) READ_ONCE((v)->counter)
| ^~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6670:10: note: in expansion of macro 'atomic_read'
6670 | while (atomic_read(&priv->device->power.usage_count) > 1)
| ^~~~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6670:42: error: 'struct dev_pm_info' has no member named 'usage_count'
6670 | while (atomic_read(&priv->device->power.usage_count) > 1)
| ^
include/linux/compiler.h:263:22: note: in definition of macro '__READ_ONCE'
263 | __read_once_size(&(x), __u.__c, sizeof(x)); \
| ^
arch/m68k/include/asm/atomic.h:21:25: note: in expansion of macro 'READ_ONCE'
21 | #define atomic_read(v) READ_ONCE((v)->counter)
| ^~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6670:10: note: in expansion of macro 'atomic_read'
6670 | while (atomic_read(&priv->device->power.usage_count) > 1)
| ^~~~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6670:42: error: 'struct dev_pm_info' has no member named 'usage_count'
6670 | while (atomic_read(&priv->device->power.usage_count) > 1)
| ^
include/linux/compiler.h:263:42: note: in definition of macro '__READ_ONCE'
263 | __read_once_size(&(x), __u.__c, sizeof(x)); \
| ^
arch/m68k/include/asm/atomic.h:21:25: note: in expansion of macro 'READ_ONCE'
21 | #define atomic_read(v) READ_ONCE((v)->counter)
| ^~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6670:10: note: in expansion of macro 'atomic_read'
6670 | while (atomic_read(&priv->device->power.usage_count) > 1)
| ^~~~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6670:42: error: 'struct dev_pm_info' has no member named 'usage_count'
6670 | while (atomic_read(&priv->device->power.usage_count) > 1)
| ^
include/linux/compiler.h:265:30: note: in definition of macro '__READ_ONCE'
265 | __read_once_size_nocheck(&(x), __u.__c, sizeof(x)); \
| ^
arch/m68k/include/asm/atomic.h:21:25: note: in expansion of macro 'READ_ONCE'
21 | #define atomic_read(v) READ_ONCE((v)->counter)
| ^~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6670:10: note: in expansion of macro 'atomic_read'
6670 | while (atomic_read(&priv->device->power.usage_count) > 1)
| ^~~~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6670:42: error: 'struct dev_pm_info' has no member named 'usage_count'
6670 | while (atomic_read(&priv->device->power.usage_count) > 1)
| ^
include/linux/compiler.h:265:50: note: in definition of macro '__READ_ONCE'
265 | __read_once_size_nocheck(&(x), __u.__c, sizeof(x)); \
| ^
arch/m68k/include/asm/atomic.h:21:25: note: in expansion of macro 'READ_ONCE'
21 | #define atomic_read(v) READ_ONCE((v)->counter)
| ^~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6670:10: note: in expansion of macro 'atomic_read'
6670 | while (atomic_read(&priv->device->power.usage_count) > 1)
| ^~~~~~~~~~~
vim +6666 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
6662
6663 /* To support runtime PM, we need to make sure usage_count is equal to 0
6664 * when runtime_auto flag is set. Otherwise, it should be equal to 1.
6665 */
> 6666 if (priv->device->power.runtime_auto) {
> 6667 while (atomic_read(&priv->device->power.usage_count) > 0)
6668 pm_runtime_put_noidle(device);
6669 } else {
6670 while (atomic_read(&priv->device->power.usage_count) > 1)
6671 pm_runtime_put_noidle(device);
6672 }
6673
6674 return ret;
6675
6676 error_netdev_register:
6677 phylink_destroy(priv->phylink);
6678 error_phy_setup:
6679 if (priv->hw->pcs != STMMAC_PCS_RGMII &&
6680 priv->hw->pcs != STMMAC_PCS_TBI &&
6681 priv->hw->pcs != STMMAC_PCS_RTBI)
6682 stmmac_mdio_unregister(ndev);
6683 error_mdio_register:
6684 stmmac_napi_del(ndev);
6685
6686 error_hw_init:
6687 destroy_workqueue(priv->wq);
6688
6689 return ret;
6690 }
6691 EXPORT_SYMBOL_GPL(stmmac_dvr_probe);
6692
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[intel-linux-intel-lts:5.4/yocto 1363/9195] drivers/usb/typec/ucsi/ucsi_acpi.c:54:30: sparse: sparse: incorrect type in argument 2 (different address spaces)
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: 87241c08286384feb3ddc57d4cb0daca4be1e384
commit: 29e00c15f4cc490b222c2d03b2ee800ecf2d925f [1363/9195] usb: typec: ucsi: acpi: Move to the new API
config: x86_64-randconfig-s022-20200811 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-168-g9554805c-dirty
git checkout 29e00c15f4cc490b222c2d03b2ee800ecf2d925f
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
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/usb/typec/ucsi/ucsi_acpi.c:54:30: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const *q @@ got void [noderef] <asn:2> * @@
>> drivers/usb/typec/ucsi/ucsi_acpi.c:54:30: sparse: expected void const *q
drivers/usb/typec/ucsi/ucsi_acpi.c:54:30: sparse: got void [noderef] <asn:2> *
>> drivers/usb/typec/ucsi/ucsi_acpi.c:64:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *p @@ got void [noderef] <asn:2> * @@
>> drivers/usb/typec/ucsi/ucsi_acpi.c:64:25: sparse: expected void *p
drivers/usb/typec/ucsi/ucsi_acpi.c:64:25: sparse: got void [noderef] <asn:2> *
vim +54 drivers/usb/typec/ucsi/ucsi_acpi.c
43
44 static int ucsi_acpi_read(struct ucsi *ucsi, unsigned int offset,
45 void *val, size_t val_len)
46 {
47 struct ucsi_acpi *ua = ucsi_get_drvdata(ucsi);
48 int ret;
49
50 ret = ucsi_acpi_dsm(ua, UCSI_DSM_FUNC_READ);
51 if (ret)
52 return ret;
53
> 54 memcpy(val, ua->base + offset, val_len);
55
56 return 0;
57 }
58
59 static int ucsi_acpi_async_write(struct ucsi *ucsi, unsigned int offset,
60 const void *val, size_t val_len)
61 {
62 struct ucsi_acpi *ua = ucsi_get_drvdata(ucsi);
63
> 64 memcpy(ua->base + offset, val, val_len);
65
66 return ucsi_acpi_dsm(ua, UCSI_DSM_FUNC_WRITE);
67 }
68
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month