Re: [PATCH v4 7/8] usb: mausb_host: MA-USB PAL events processing
From: kbuild test robot
Date: Sat Mar 28 2020 - 06:36:28 EST
Hi,
I love your patch! Perhaps something to improve:
[auto build test WARNING on usb/usb-testing]
[also build test WARNING on balbi-usb/next peter.chen-usb/ci-for-usb-next linus/master linux/master v5.6-rc7 next-20200327]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/vladimir-stankovic-displaylink-com/Add-MA-USB-Host-driver/20200328-042436
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: c6x-allyesconfig (attached as .config)
compiler: c6x-elf-gcc (GCC) 9.2.0
reproduce:
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
GCC_VERSION=9.2.0 make.cross ARCH=c6x
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>
All warnings (new ones prefixed by >>):
In file included from include/linux/printk.h:7,
from include/linux/kernel.h:15,
from include/linux/list.h:9,
from include/linux/preempt.h:11,
from include/linux/spinlock.h:51,
from include/linux/kref.h:16,
from drivers/usb/mausb_host/hpal.h:8,
from drivers/usb/mausb_host/utils.h:8,
from drivers/usb/mausb_host/utils.c:5:
drivers/usb/mausb_host/utils.c: In function 'mausb_file_read':
>> include/linux/kern_levels.h:5:18: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'ssize_t' {aka 'int'} [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/linux/kern_levels.h:9:20: note: in expansion of macro 'KERN_SOH'
9 | #define KERN_ALERT KERN_SOH "1" /* action must be taken immediately */
| ^~~~~~~~
include/linux/printk.h:300:9: note: in expansion of macro 'KERN_ALERT'
300 | printk(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~
>> drivers/usb/mausb_host/utils.h:16:2: note: in expansion of macro 'pr_alert'
16 | pr_##level_str("MAUSB " #level " [%x:%x] [%s] " log "\n",\
| ^~~
>> drivers/usb/mausb_host/utils.h:20:29: note: in expansion of macro 'mausb_pr_logs'
20 | #define mausb_pr_alert(...) mausb_pr_logs(alert, 1, ##__VA_ARGS__)
| ^~~~~~~~~~~~~
>> drivers/usb/mausb_host/utils.c:102:3: note: in expansion of macro 'mausb_pr_alert'
102 | mausb_pr_alert("Different expected bytes to read (%ld) from actual size (%ld)",
| ^~~~~~~~~~~~~~
include/linux/kern_levels.h:5:18: warning: format '%ld' expects argument of type 'long int', but argument 6 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/linux/kern_levels.h:9:20: note: in expansion of macro 'KERN_SOH'
9 | #define KERN_ALERT KERN_SOH "1" /* action must be taken immediately */
| ^~~~~~~~
include/linux/printk.h:300:9: note: in expansion of macro 'KERN_ALERT'
300 | printk(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~
>> drivers/usb/mausb_host/utils.h:16:2: note: in expansion of macro 'pr_alert'
16 | pr_##level_str("MAUSB " #level " [%x:%x] [%s] " log "\n",\
| ^~~
>> drivers/usb/mausb_host/utils.h:20:29: note: in expansion of macro 'mausb_pr_logs'
20 | #define mausb_pr_alert(...) mausb_pr_logs(alert, 1, ##__VA_ARGS__)
| ^~~~~~~~~~~~~
>> drivers/usb/mausb_host/utils.c:102:3: note: in expansion of macro 'mausb_pr_alert'
102 | mausb_pr_alert("Different expected bytes to read (%ld) from actual size (%ld)",
| ^~~~~~~~~~~~~~
drivers/usb/mausb_host/utils.c: In function 'mausb_file_write':
>> include/linux/kern_levels.h:5:18: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'ssize_t' {aka 'int'} [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/linux/kern_levels.h:9:20: note: in expansion of macro 'KERN_SOH'
9 | #define KERN_ALERT KERN_SOH "1" /* action must be taken immediately */
| ^~~~~~~~
include/linux/printk.h:300:9: note: in expansion of macro 'KERN_ALERT'
300 | printk(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~
>> drivers/usb/mausb_host/utils.h:16:2: note: in expansion of macro 'pr_alert'
16 | pr_##level_str("MAUSB " #level " [%x:%x] [%s] " log "\n",\
| ^~~
>> drivers/usb/mausb_host/utils.h:20:29: note: in expansion of macro 'mausb_pr_logs'
20 | #define mausb_pr_alert(...) mausb_pr_logs(alert, 1, ##__VA_ARGS__)
| ^~~~~~~~~~~~~
drivers/usb/mausb_host/utils.c:193:3: note: in expansion of macro 'mausb_pr_alert'
193 | mausb_pr_alert("Different expected bytes to write (%ld) from actual size (%ld)",
| ^~~~~~~~~~~~~~
include/linux/kern_levels.h:5:18: warning: format '%ld' expects argument of type 'long int', but argument 6 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/linux/kern_levels.h:9:20: note: in expansion of macro 'KERN_SOH'
9 | #define KERN_ALERT KERN_SOH "1" /* action must be taken immediately */
| ^~~~~~~~
include/linux/printk.h:300:9: note: in expansion of macro 'KERN_ALERT'
300 | printk(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~
>> drivers/usb/mausb_host/utils.h:16:2: note: in expansion of macro 'pr_alert'
16 | pr_##level_str("MAUSB " #level " [%x:%x] [%s] " log "\n",\
| ^~~
>> drivers/usb/mausb_host/utils.h:20:29: note: in expansion of macro 'mausb_pr_logs'
20 | #define mausb_pr_alert(...) mausb_pr_logs(alert, 1, ##__VA_ARGS__)
| ^~~~~~~~~~~~~
drivers/usb/mausb_host/utils.c:193:3: note: in expansion of macro 'mausb_pr_alert'
193 | mausb_pr_alert("Different expected bytes to write (%ld) from actual size (%ld)",
| ^~~~~~~~~~~~~~
--
drivers/usb/mausb_host/hpal_events.c: In function 'mausb_data_msg_received_event':
>> drivers/usb/mausb_host/hpal_events.c:44:27: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
44 | event->data.recv_buf = (u64)hdr;
| ^
drivers/usb/mausb_host/hpal_events.c: In function 'mausb_isoch_msg_received_event':
drivers/usb/mausb_host/hpal_events.c:66:27: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
66 | event->data.recv_buf = (u64)hdr;
| ^
drivers/usb/mausb_host/hpal_events.c: In function 'mausb_cleanup_delete_data_transfer_event':
>> drivers/usb/mausb_host/hpal_events.c:593:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
593 | struct urb *urb = (struct urb *)event->data.urb;
| ^
vim +/pr_alert +16 drivers/usb/mausb_host/utils.h
5f578d5631444d vladimir.stankovic@xxxxxxxxxxxxxxx 2020-03-27 9
cca4e12f279232 vladimir.stankovic@xxxxxxxxxxxxxxx 2020-03-27 10 #if defined(MAUSB_NO_LOGS)
cca4e12f279232 vladimir.stankovic@xxxxxxxxxxxxxxx 2020-03-27 11 #define mausb_pr_logs(...)
cca4e12f279232 vladimir.stankovic@xxxxxxxxxxxxxxx 2020-03-27 12 #else
cca4e12f279232 vladimir.stankovic@xxxxxxxxxxxxxxx 2020-03-27 13 #include <linux/printk.h>
cca4e12f279232 vladimir.stankovic@xxxxxxxxxxxxxxx 2020-03-27 14 #include <linux/sched.h>
cca4e12f279232 vladimir.stankovic@xxxxxxxxxxxxxxx 2020-03-27 15 #define mausb_pr_logs(level_str, level, log, ...)\
cca4e12f279232 vladimir.stankovic@xxxxxxxxxxxxxxx 2020-03-27 @16 pr_##level_str("MAUSB " #level " [%x:%x] [%s] " log "\n",\
cca4e12f279232 vladimir.stankovic@xxxxxxxxxxxxxxx 2020-03-27 17 current->pid, current->tgid, __func__, ##__VA_ARGS__)
cca4e12f279232 vladimir.stankovic@xxxxxxxxxxxxxxx 2020-03-27 18 #endif /* MAUSB_NO_LOGS */
cca4e12f279232 vladimir.stankovic@xxxxxxxxxxxxxxx 2020-03-27 19
cca4e12f279232 vladimir.stankovic@xxxxxxxxxxxxxxx 2020-03-27 @20 #define mausb_pr_alert(...) mausb_pr_logs(alert, 1, ##__VA_ARGS__)
cca4e12f279232 vladimir.stankovic@xxxxxxxxxxxxxxx 2020-03-27 21
:::::: The code at line 16 was first introduced by commit
:::::: cca4e12f279232d69e2a551b72966976d5cda619 usb: Add MA-USB Host kernel module
:::::: TO: vladimir.stankovic@xxxxxxxxxxxxxxx <vladimir.stankovic@xxxxxxxxxxxxxxx>
:::::: CC: 0day robot <lkp@xxxxxxxxx>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip