Hi Anthony, Thank you for the patch! Yet something to improve: [auto build test ERROR on usb/usb-testing] [also build test ERROR on peter.chen-usb/ci-for-usb-next balbi-usb/next v5.6-rc4 next-20200306] [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/Anthony-Mallet/USB-cdc-acm-fix-close_delay-and-closing_wait-units-in-TIOCSSERIAL/20200306-021541 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing config: arm64-allyesconfig (attached as .config) compiler: clang version 11.0.0 (git://gitmirror/llvm_project a0cd413426479abb207381bdbab862f3dfb3ce7d) reproduce: # FIXME the reproduce steps for clang is not ready yet If you fix the issue, kindly add following tag Reported-by: kbuild test robot <lkp@xxxxxxxxx> All errors (new ones prefixed by >>): >> drivers/usb/class/cdc-acm.c:930:3: error: expected expression else { ^ >> drivers/usb/class/cdc-acm.c:942:1: error: function definition is not allowed here { ^ drivers/usb/class/cdc-acm.c:986:1: error: function definition is not allowed here { ^ drivers/usb/class/cdc-acm.c:1002:1: error: function definition is not allowed here { ^ drivers/usb/class/cdc-acm.c:1023:1: error: function definition is not allowed here { ^ drivers/usb/class/cdc-acm.c:1086:1: error: function definition is not allowed here { ^ drivers/usb/class/cdc-acm.c:1095:1: error: function definition is not allowed here { ^ drivers/usb/class/cdc-acm.c:1105:1: error: function definition is not allowed here { ^ drivers/usb/class/cdc-acm.c:1127:1: error: function definition is not allowed here { ^ drivers/usb/class/cdc-acm.c:1514:1: error: function definition is not allowed here { ^ drivers/usb/class/cdc-acm.c:1568:1: error: function definition is not allowed here { ^ drivers/usb/class/cdc-acm.c:1592:1: error: function definition is not allowed here { ^ drivers/usb/class/cdc-acm.c:1629:1: error: function definition is not allowed here { ^ drivers/usb/class/cdc-acm.c:1641:1: error: function definition is not allowed here { ^ >> drivers/usb/class/cdc-acm.c:1913:11: error: use of undeclared identifier 'acm_probe' .probe = acm_probe, ^ >> drivers/usb/class/cdc-acm.c:1914:16: error: use of undeclared identifier 'acm_disconnect' .disconnect = acm_disconnect, ^ >> drivers/usb/class/cdc-acm.c:1916:13: error: use of undeclared identifier 'acm_suspend'; did you mean 'dpm_suspend'? .suspend = acm_suspend, ^~~~~~~~~~~ dpm_suspend include/linux/pm.h:727:12: note: 'dpm_suspend' declared here extern int dpm_suspend(pm_message_t state); ^ >> drivers/usb/class/cdc-acm.c:1917:12: error: use of undeclared identifier 'acm_resume'; did you mean 'dpm_resume'? .resume = acm_resume, ^~~~~~~~~~ dpm_resume include/linux/pm.h:719:13: note: 'dpm_resume' declared here extern void dpm_resume(pm_message_t state); ^ >> drivers/usb/class/cdc-acm.c:1918:18: error: use of undeclared identifier 'acm_reset_resume'; did you mean 'pm_request_resume'? .reset_resume = acm_reset_resume, ^~~~~~~~~~~~~~~~ pm_request_resume include/linux/pm_runtime.h:209:19: note: 'pm_request_resume' declared here static inline int pm_request_resume(struct device *dev) ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. vim +930 drivers/usb/class/cdc-acm.c 905 906 static int set_serial_info(struct tty_struct *tty, struct serial_struct *ss) 907 { 908 struct acm *acm = tty->driver_data; 909 unsigned int closing_wait, close_delay; 910 unsigned int old_closing_wait, old_close_delay; 911 int retval = 0; 912 913 close_delay = msecs_to_jiffies(ss->close_delay * 10); 914 closing_wait = ss->closing_wait == ASYNC_CLOSING_WAIT_NONE ? 915 ASYNC_CLOSING_WAIT_NONE : 916 msecs_to_jiffies(ss->closing_wait * 10); 917 918 /* we must redo the rounding here, so that the values match */ 919 old_close_delay = jiffies_to_msecs(acm->port.close_delay) / 10; 920 old_closing_wait = acm->port.closing_wait == ASYNC_CLOSING_WAIT_NONE ? 921 ASYNC_CLOSING_WAIT_NONE : 922 jiffies_to_msecs(acm->port.closing_wait) / 10; 923 924 mutex_lock(&acm->port.mutex); 925 926 if ((ss->close_delay != old_close_delay) || 927 (ss->closing_wait != old_closing_wait)) { 928 if (!capable(CAP_SYS_ADMIN)) { 929 retval = -EPERM; > 930 else { 931 acm->port.close_delay = close_delay; 932 acm->port.closing_wait = closing_wait; 933 } 934 } else 935 retval = -EOPNOTSUPP; 936 937 mutex_unlock(&acm->port.mutex); 938 return retval; 939 } 940 941 static int wait_serial_change(struct acm *acm, unsigned long arg) > 942 { 943 int rv = 0; 944 DECLARE_WAITQUEUE(wait, current); 945 struct async_icount old, new; 946 947 do { 948 spin_lock_irq(&acm->read_lock); 949 old = acm->oldcount; 950 new = acm->iocount; 951 acm->oldcount = new; 952 spin_unlock_irq(&acm->read_lock); 953 954 if ((arg & TIOCM_DSR) && 955 old.dsr != new.dsr) 956 break; 957 if ((arg & TIOCM_CD) && 958 old.dcd != new.dcd) 959 break; 960 if ((arg & TIOCM_RI) && 961 old.rng != new.rng) 962 break; 963 964 add_wait_queue(&acm->wioctl, &wait); 965 set_current_state(TASK_INTERRUPTIBLE); 966 schedule(); 967 remove_wait_queue(&acm->wioctl, &wait); 968 if (acm->disconnected) { 969 if (arg & TIOCM_CD) 970 break; 971 else 972 rv = -ENODEV; 973 } else { 974 if (signal_pending(current)) 975 rv = -ERESTARTSYS; 976 } 977 } while (!rv); 978 979 980 981 return rv; 982 } 983 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip