* Re: [PATCH v6] can: usb: etas_es58X: add support for ETAS ES58X CAN USB interfaces [not found] <20201114152325.523630-1-mailhol.vincent@wanadoo.fr> @ 2020-11-14 18:12 ` kernel test robot 2020-11-15 11:41 ` Vincent MAILHOL 2020-11-15 18:55 ` Marc Kleine-Budde 1 sibling, 1 reply; 6+ messages in thread From: kernel test robot @ 2020-11-14 18:12 UTC (permalink / raw) To: Vincent Mailhol, Marc Kleine-Budde, linux-can Cc: kbuild-all, clang-built-linux, Oliver Hartkopp, Vincent Mailhol, Arunachalam Santhanam, Wolfgang Grandegger, Jakub Kicinski, Masahiro Yamada, open list, open list:NETWORKING DRIVERS [-- Attachment #1: Type: text/plain, Size: 10114 bytes --] Hi Vincent, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on bff6f1db91e330d7fba56f815cdbc412c75fe163 v5.10-rc3 next-20201113] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Vincent-Mailhol/can-usb-etas_es58X-add-support-for-ETAS-ES58X-CAN-USB-interfaces/20201114-232854 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git f01c30de86f1047e9bae1b1b1417b0ce8dcd15b1 config: x86_64-randconfig-a005-20201115 (attached as .config) compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 9a85643cd357e412cff69067bb5c4840e228c2ab) 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 # https://github.com/0day-ci/linux/commit/80a9b72580bad04e879752fa5c54d278b486e2bb git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Vincent-Mailhol/can-usb-etas_es58X-add-support-for-ETAS-ES58X-CAN-USB-interfaces/20201114-232854 git checkout 80a9b72580bad04e879752fa5c54d278b486e2bb # 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@intel.com> All errors (new ones prefixed by >>): >> drivers/net/can/usb/etas_es58x/es58x_core.c:745:12: error: use of undeclared identifier 'CAN_MAX_RAW_DLC' if (dlc > CAN_MAX_RAW_DLC) { ^ drivers/net/can/usb/etas_es58x/es58x_core.c:748:22: error: use of undeclared identifier 'CAN_MAX_RAW_DLC' __func__, dlc, CAN_MAX_RAW_DLC); ^ >> drivers/net/can/usb/etas_es58x/es58x_core.c:753:9: error: implicit declaration of function 'can_fd_dlc2len' [-Werror,-Wimplicit-function-declaration] len = can_fd_dlc2len(dlc); ^ drivers/net/can/usb/etas_es58x/es58x_core.c:753:9: note: did you mean 'can_dlc2len'? include/linux/can/dev.h:190:4: note: 'can_dlc2len' declared here u8 can_dlc2len(u8 can_dlc); ^ >> drivers/net/can/usb/etas_es58x/es58x_core.c:756:9: error: implicit declaration of function 'can_cc_dlc2len' [-Werror,-Wimplicit-function-declaration] len = can_cc_dlc2len(dlc); ^ drivers/net/can/usb/etas_es58x/es58x_core.c:756:9: note: did you mean 'can_dlc2len'? include/linux/can/dev.h:190:4: note: 'can_dlc2len' declared here u8 can_dlc2len(u8 can_dlc); ^ >> drivers/net/can/usb/etas_es58x/es58x_core.c:775:3: error: implicit declaration of function 'can_frame_set_cc_len' [-Werror,-Wimplicit-function-declaration] can_frame_set_cc_len(ccf, dlc, es58x_priv(netdev)->can.ctrlmode); ^ 5 errors generated. -- >> drivers/net/can/usb/etas_es58x/es581_4.c:385:20: error: implicit declaration of function 'can_get_cc_dlc' [-Werror,-Wimplicit-function-declaration] tx_can_msg->dlc = can_get_cc_dlc(cf, priv->can.ctrlmode); ^ >> drivers/net/can/usb/etas_es58x/es581_4.c:387:41: error: no member named 'len' in 'struct can_frame' memcpy(tx_can_msg->data, cf->data, cf->len); ~~ ^ >> drivers/net/can/usb/etas_es58x/es581_4.c:391:13: error: implicit declaration of function 'can_cc_dlc2len' [-Werror,-Wimplicit-function-declaration] msg_len += es581_4_sizeof_rx_tx_msg(*tx_can_msg); ^ drivers/net/can/usb/etas_es58x/es581_4.c:30:29: note: expanded from macro 'es581_4_sizeof_rx_tx_msg' offsetof(typeof(msg), data[can_cc_dlc2len((msg).dlc)]) ^ drivers/net/can/usb/etas_es58x/es581_4.c:391:13: note: did you mean 'can_dlc2len'? drivers/net/can/usb/etas_es58x/es581_4.c:30:29: note: expanded from macro 'es581_4_sizeof_rx_tx_msg' offsetof(typeof(msg), data[can_cc_dlc2len((msg).dlc)]) ^ include/linux/can/dev.h:190:4: note: 'can_dlc2len' declared here u8 can_dlc2len(u8 can_dlc); ^ >> drivers/net/can/usb/etas_es58x/es581_4.c:515:48: error: use of undeclared identifier 'CAN_CTRLMODE_CC_LEN8_DLC' .ctrlmode_supported = CAN_CTRLMODE_LOOPBACK | CAN_CTRLMODE_CC_LEN8_DLC, ^ 4 errors generated. -- >> drivers/net/can/usb/etas_es58x/es58x_fd.c:119:24: error: implicit declaration of function 'can_cc_dlc2len' [-Werror,-Wimplicit-function-declaration] u16 rx_can_msg_len = es58x_fd_sizeof_rx_tx_msg(*rx_can_msg); ^ drivers/net/can/usb/etas_es58x/es58x_fd.c:36:3: note: expanded from macro 'es58x_fd_sizeof_rx_tx_msg' can_cc_dlc2len(__msg.dlc); \ ^ drivers/net/can/usb/etas_es58x/es58x_fd.c:119:24: note: did you mean 'can_dlc2len'? drivers/net/can/usb/etas_es58x/es58x_fd.c:36:3: note: expanded from macro 'es58x_fd_sizeof_rx_tx_msg' can_cc_dlc2len(__msg.dlc); \ ^ include/linux/can/dev.h:190:4: note: 'can_dlc2len' declared here u8 can_dlc2len(u8 can_dlc); ^ >> drivers/net/can/usb/etas_es58x/es58x_fd.c:141:11: error: implicit declaration of function 'can_fd_len2dlc' [-Werror,-Wimplicit-function-declaration] dlc = can_fd_len2dlc(rx_can_msg->len); ^ drivers/net/can/usb/etas_es58x/es58x_fd.c:141:11: note: did you mean 'can_len2dlc'? include/linux/can/dev.h:193:4: note: 'can_len2dlc' declared here u8 can_len2dlc(u8 len); ^ >> drivers/net/can/usb/etas_es58x/es58x_fd.c:371:25: error: no member named 'len' in 'struct can_frame' tx_can_msg->len = cf->len; ~~ ^ >> drivers/net/can/usb/etas_es58x/es58x_fd.c:373:21: error: implicit declaration of function 'can_get_cc_dlc' [-Werror,-Wimplicit-function-declaration] tx_can_msg->dlc = can_get_cc_dlc(cf, priv->can.ctrlmode); ^ drivers/net/can/usb/etas_es58x/es58x_fd.c:374:41: error: no member named 'len' in 'struct can_frame' memcpy(tx_can_msg->data, cf->data, cf->len); ~~ ^ drivers/net/can/usb/etas_es58x/es58x_fd.c:377:13: error: implicit declaration of function 'can_cc_dlc2len' [-Werror,-Wimplicit-function-declaration] msg_len += es58x_fd_sizeof_rx_tx_msg(*tx_can_msg); ^ drivers/net/can/usb/etas_es58x/es58x_fd.c:36:3: note: expanded from macro 'es58x_fd_sizeof_rx_tx_msg' can_cc_dlc2len(__msg.dlc); \ ^ >> drivers/net/can/usb/etas_es58x/es58x_fd.c:617:6: error: use of undeclared identifier 'CAN_CTRLMODE_CC_LEN8_DLC' CAN_CTRLMODE_CC_LEN8_DLC, ^ 7 errors generated. vim +/CAN_MAX_RAW_DLC +745 drivers/net/can/usb/etas_es58x/es58x_core.c 718 719 /** 720 * es58x_rx_can_msg() - Handle a received a CAN message. 721 * @netdev: CAN network device. 722 * @timestamp: Hardware time stamp (only relevant in rx branches). 723 * @data: CAN payload. 724 * @can_id: CAN ID. 725 * @es58x_flags: Please refer to enum es58x_flag. 726 * @dlc: Data Length Code (raw value). 727 * 728 * Fill up a CAN skb and post it. 729 * 730 * This function handles the case where the DLC of a classical CAN 731 * frame is greater than CAN_MAX_DLEN (c.f. the len8_dlc field of 732 * struct can_frame). 733 * 734 * Return: zero on success. 735 */ 736 int es58x_rx_can_msg(struct net_device *netdev, u64 timestamp, const u8 *data, 737 canid_t can_id, enum es58x_flag es58x_flags, u8 dlc) 738 { 739 struct canfd_frame *cfd; 740 struct can_frame *ccf; 741 struct sk_buff *skb; 742 u8 len; 743 bool is_can_fd = !!(es58x_flags & ES58X_FLAG_FD_DATA); 744 > 745 if (dlc > CAN_MAX_RAW_DLC) { 746 netdev_err(netdev, 747 "%s: DLC is %d but maximum should be %d\n", 748 __func__, dlc, CAN_MAX_RAW_DLC); 749 return -EMSGSIZE; 750 } 751 752 if (is_can_fd) { > 753 len = can_fd_dlc2len(dlc); 754 skb = alloc_canfd_skb(netdev, &cfd); 755 } else { > 756 len = can_cc_dlc2len(dlc); 757 skb = alloc_can_skb(netdev, &ccf); 758 cfd = (struct canfd_frame *)ccf; 759 } 760 761 if (!skb) { 762 netdev->stats.rx_dropped++; 763 return -ENOMEM; 764 } 765 cfd->can_id = can_id; 766 if (es58x_flags & ES58X_FLAG_EFF) 767 cfd->can_id |= CAN_EFF_FLAG; 768 if (is_can_fd) { 769 cfd->len = len; 770 if (es58x_flags & ES58X_FLAG_FD_BRS) 771 cfd->flags |= CANFD_BRS; 772 if (es58x_flags & ES58X_FLAG_FD_ESI) 773 cfd->flags |= CANFD_ESI; 774 } else { > 775 can_frame_set_cc_len(ccf, dlc, es58x_priv(netdev)->can.ctrlmode); 776 if (es58x_flags & ES58X_FLAG_RTR) { 777 ccf->can_id |= CAN_RTR_FLAG; 778 len = 0; 779 } 780 } 781 memcpy(cfd->data, data, len); 782 netdev->stats.rx_packets++; 783 netdev->stats.rx_bytes += len; 784 785 es58x_set_skb_timestamp(netdev, skb, timestamp); 786 netif_rx(skb); 787 788 es58x_priv(netdev)->err_passive_before_rtx_success = 0; 789 790 return 0; 791 } 792 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org [-- Attachment #2: .config.gz --] [-- Type: application/gzip, Size: 37642 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v6] can: usb: etas_es58X: add support for ETAS ES58X CAN USB interfaces 2020-11-14 18:12 ` [PATCH v6] can: usb: etas_es58X: add support for ETAS ES58X CAN USB interfaces kernel test robot @ 2020-11-15 11:41 ` Vincent MAILHOL 2020-11-16 0:31 ` [kbuild-all] " Rong Chen 0 siblings, 1 reply; 6+ messages in thread From: Vincent MAILHOL @ 2020-11-15 11:41 UTC (permalink / raw) To: kernel test robot Cc: Marc Kleine-Budde, linux-can, kbuild-all, clang-built-linux, Oliver Hartkopp, Arunachalam Santhanam, Wolfgang Grandegger, Jakub Kicinski, Masahiro Yamada, open list, open list:NETWORKING DRIVERS, Vincent Mailhol The report from Intel's test robot is a false positive. On Sun. 15 Nov. 2020 at 03:12, kernel test robot wrote: > Hi Vincent, > > Thank you for the patch! Yet something to improve: > > [auto build test ERROR on linus/master] > [also build test ERROR on bff6f1db91e330d7fba56f815cdbc412c75fe163 v5.10-rc3 next-20201113] > [If your patch is applied to the wrong git tree, kindly drop us a note. Patch is applied to the wrong git tree. It is based on the testing branch of linux-can-next: https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git/log/?h=testing > And when submitting patch, we suggest to use '--base' as documented in > https://git-scm.com/docs/git-format-patch] I did so (c.f. the base-commit and prerequisite-patch-id tags at the bottom of the patch). While the base-commit was taken into account, the prerequisite-patch-id tags seem to have been ignored. FYI, I used the below command to generate the patch. git format-patch --base=bff6f1db91e330d7fba56f815cdbc412c75fe163 -v6 -o patch/v6 HEAD~1 Yours sincerely, Vincent Mailhol > url: https://github.com/0day-ci/linux/commits/Vincent-Mailhol/can-usb-etas_es58X-add-support-for-ETAS-ES58X-CAN-USB-interfaces/20201114-232854 > base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git f01c30de86f1047e9bae1b1b1417b0ce8dcd15b1 > config: x86_64-randconfig-a005-20201115 (attached as .config) > compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 9a85643cd357e412cff69067bb5c4840e228c2ab) > 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 > # https://github.com/0day-ci/linux/commit/80a9b72580bad04e879752fa5c54d278b486e2bb > git remote add linux-review https://github.com/0day-ci/linux > git fetch --no-tags linux-review Vincent-Mailhol/can-usb-etas_es58X-add-support-for-ETAS-ES58X-CAN-USB-interfaces/20201114-232854 > git checkout 80a9b72580bad04e879752fa5c54d278b486e2bb > # 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@intel.com> > > All errors (new ones prefixed by >>): > > >> drivers/net/can/usb/etas_es58x/es58x_core.c:745:12: error: use of undeclared identifier 'CAN_MAX_RAW_DLC' > if (dlc > CAN_MAX_RAW_DLC) { > ^ > drivers/net/can/usb/etas_es58x/es58x_core.c:748:22: error: use of undeclared identifier 'CAN_MAX_RAW_DLC' > __func__, dlc, CAN_MAX_RAW_DLC); > ^ > >> drivers/net/can/usb/etas_es58x/es58x_core.c:753:9: error: implicit declaration of function 'can_fd_dlc2len' [-Werror,-Wimplicit-function-declaration] > len = can_fd_dlc2len(dlc); > ^ > drivers/net/can/usb/etas_es58x/es58x_core.c:753:9: note: did you mean 'can_dlc2len'? > include/linux/can/dev.h:190:4: note: 'can_dlc2len' declared here > u8 can_dlc2len(u8 can_dlc); > ^ > >> drivers/net/can/usb/etas_es58x/es58x_core.c:756:9: error: implicit declaration of function 'can_cc_dlc2len' [-Werror,-Wimplicit-function-declaration] > len = can_cc_dlc2len(dlc); > ^ > drivers/net/can/usb/etas_es58x/es58x_core.c:756:9: note: did you mean 'can_dlc2len'? > include/linux/can/dev.h:190:4: note: 'can_dlc2len' declared here > u8 can_dlc2len(u8 can_dlc); > ^ > >> drivers/net/can/usb/etas_es58x/es58x_core.c:775:3: error: implicit declaration of function 'can_frame_set_cc_len' [-Werror,-Wimplicit-function-declaration] > can_frame_set_cc_len(ccf, dlc, es58x_priv(netdev)->can.ctrlmode); > ^ > 5 errors generated. > -- > >> drivers/net/can/usb/etas_es58x/es581_4.c:385:20: error: implicit declaration of function 'can_get_cc_dlc' [-Werror,-Wimplicit-function-declaration] > tx_can_msg->dlc = can_get_cc_dlc(cf, priv->can.ctrlmode); > ^ > >> drivers/net/can/usb/etas_es58x/es581_4.c:387:41: error: no member named 'len' in 'struct can_frame' > memcpy(tx_can_msg->data, cf->data, cf->len); > ~~ ^ > >> drivers/net/can/usb/etas_es58x/es581_4.c:391:13: error: implicit declaration of function 'can_cc_dlc2len' [-Werror,-Wimplicit-function-declaration] > msg_len += es581_4_sizeof_rx_tx_msg(*tx_can_msg); > ^ > drivers/net/can/usb/etas_es58x/es581_4.c:30:29: note: expanded from macro 'es581_4_sizeof_rx_tx_msg' > offsetof(typeof(msg), data[can_cc_dlc2len((msg).dlc)]) > ^ > drivers/net/can/usb/etas_es58x/es581_4.c:391:13: note: did you mean 'can_dlc2len'? > drivers/net/can/usb/etas_es58x/es581_4.c:30:29: note: expanded from macro 'es581_4_sizeof_rx_tx_msg' > offsetof(typeof(msg), data[can_cc_dlc2len((msg).dlc)]) > ^ > include/linux/can/dev.h:190:4: note: 'can_dlc2len' declared here > u8 can_dlc2len(u8 can_dlc); > ^ > >> drivers/net/can/usb/etas_es58x/es581_4.c:515:48: error: use of undeclared identifier 'CAN_CTRLMODE_CC_LEN8_DLC' > .ctrlmode_supported = CAN_CTRLMODE_LOOPBACK | CAN_CTRLMODE_CC_LEN8_DLC, > ^ > 4 errors generated. > -- > >> drivers/net/can/usb/etas_es58x/es58x_fd.c:119:24: error: implicit declaration of function 'can_cc_dlc2len' [-Werror,-Wimplicit-function-declaration] > u16 rx_can_msg_len = es58x_fd_sizeof_rx_tx_msg(*rx_can_msg); > ^ > drivers/net/can/usb/etas_es58x/es58x_fd.c:36:3: note: expanded from macro 'es58x_fd_sizeof_rx_tx_msg' > can_cc_dlc2len(__msg.dlc); \ > ^ > drivers/net/can/usb/etas_es58x/es58x_fd.c:119:24: note: did you mean 'can_dlc2len'? > drivers/net/can/usb/etas_es58x/es58x_fd.c:36:3: note: expanded from macro 'es58x_fd_sizeof_rx_tx_msg' > can_cc_dlc2len(__msg.dlc); \ > ^ > include/linux/can/dev.h:190:4: note: 'can_dlc2len' declared here > u8 can_dlc2len(u8 can_dlc); > ^ > >> drivers/net/can/usb/etas_es58x/es58x_fd.c:141:11: error: implicit declaration of function 'can_fd_len2dlc' [-Werror,-Wimplicit-function-declaration] > dlc = can_fd_len2dlc(rx_can_msg->len); > ^ > drivers/net/can/usb/etas_es58x/es58x_fd.c:141:11: note: did you mean 'can_len2dlc'? > include/linux/can/dev.h:193:4: note: 'can_len2dlc' declared here > u8 can_len2dlc(u8 len); > ^ > >> drivers/net/can/usb/etas_es58x/es58x_fd.c:371:25: error: no member named 'len' in 'struct can_frame' > tx_can_msg->len = cf->len; > ~~ ^ > >> drivers/net/can/usb/etas_es58x/es58x_fd.c:373:21: error: implicit declaration of function 'can_get_cc_dlc' [-Werror,-Wimplicit-function-declaration] > tx_can_msg->dlc = can_get_cc_dlc(cf, priv->can.ctrlmode); > ^ > drivers/net/can/usb/etas_es58x/es58x_fd.c:374:41: error: no member named 'len' in 'struct can_frame' > memcpy(tx_can_msg->data, cf->data, cf->len); > ~~ ^ > drivers/net/can/usb/etas_es58x/es58x_fd.c:377:13: error: implicit declaration of function 'can_cc_dlc2len' [-Werror,-Wimplicit-function-declaration] > msg_len += es58x_fd_sizeof_rx_tx_msg(*tx_can_msg); > ^ > drivers/net/can/usb/etas_es58x/es58x_fd.c:36:3: note: expanded from macro 'es58x_fd_sizeof_rx_tx_msg' > can_cc_dlc2len(__msg.dlc); \ > ^ > >> drivers/net/can/usb/etas_es58x/es58x_fd.c:617:6: error: use of undeclared identifier 'CAN_CTRLMODE_CC_LEN8_DLC' > CAN_CTRLMODE_CC_LEN8_DLC, > ^ > 7 errors generated. > > vim +/CAN_MAX_RAW_DLC +745 drivers/net/can/usb/etas_es58x/es58x_core.c > > 718 > 719 /** > 720 * es58x_rx_can_msg() - Handle a received a CAN message. > 721 * @netdev: CAN network device. > 722 * @timestamp: Hardware time stamp (only relevant in rx branches). > 723 * @data: CAN payload. > 724 * @can_id: CAN ID. > 725 * @es58x_flags: Please refer to enum es58x_flag. > 726 * @dlc: Data Length Code (raw value). > 727 * > 728 * Fill up a CAN skb and post it. > 729 * > 730 * This function handles the case where the DLC of a classical CAN > 731 * frame is greater than CAN_MAX_DLEN (c.f. the len8_dlc field of > 732 * struct can_frame). > 733 * > 734 * Return: zero on success. > 735 */ > 736 int es58x_rx_can_msg(struct net_device *netdev, u64 timestamp, const u8 *data, > 737 canid_t can_id, enum es58x_flag es58x_flags, u8 dlc) > 738 { > 739 struct canfd_frame *cfd; > 740 struct can_frame *ccf; > 741 struct sk_buff *skb; > 742 u8 len; > 743 bool is_can_fd = !!(es58x_flags & ES58X_FLAG_FD_DATA); > 744 > > 745 if (dlc > CAN_MAX_RAW_DLC) { > 746 netdev_err(netdev, > 747 "%s: DLC is %d but maximum should be %d\n", > 748 __func__, dlc, CAN_MAX_RAW_DLC); > 749 return -EMSGSIZE; > 750 } > 751 > 752 if (is_can_fd) { > > 753 len = can_fd_dlc2len(dlc); > 754 skb = alloc_canfd_skb(netdev, &cfd); > 755 } else { > > 756 len = can_cc_dlc2len(dlc); > 757 skb = alloc_can_skb(netdev, &ccf); > 758 cfd = (struct canfd_frame *)ccf; > 759 } > 760 > 761 if (!skb) { > 762 netdev->stats.rx_dropped++; > 763 return -ENOMEM; > 764 } > 765 cfd->can_id = can_id; > 766 if (es58x_flags & ES58X_FLAG_EFF) > 767 cfd->can_id |= CAN_EFF_FLAG; > 768 if (is_can_fd) { > 769 cfd->len = len; > 770 if (es58x_flags & ES58X_FLAG_FD_BRS) > 771 cfd->flags |= CANFD_BRS; > 772 if (es58x_flags & ES58X_FLAG_FD_ESI) > 773 cfd->flags |= CANFD_ESI; > 774 } else { > > 775 can_frame_set_cc_len(ccf, dlc, es58x_priv(netdev)->can.ctrlmode); > 776 if (es58x_flags & ES58X_FLAG_RTR) { > 777 ccf->can_id |= CAN_RTR_FLAG; > 778 len = 0; > 779 } > 780 } > 781 memcpy(cfd->data, data, len); > 782 netdev->stats.rx_packets++; > 783 netdev->stats.rx_bytes += len; > 784 > 785 es58x_set_skb_timestamp(netdev, skb, timestamp); > 786 netif_rx(skb); > 787 > 788 es58x_priv(netdev)->err_passive_before_rtx_success = 0; > 789 > 790 return 0; > 791 } > 792 > > --- > 0-DAY CI Kernel Test Service, Intel Corporation > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [kbuild-all] Re: [PATCH v6] can: usb: etas_es58X: add support for ETAS ES58X CAN USB interfaces 2020-11-15 11:41 ` Vincent MAILHOL @ 2020-11-16 0:31 ` Rong Chen 0 siblings, 0 replies; 6+ messages in thread From: Rong Chen @ 2020-11-16 0:31 UTC (permalink / raw) To: Vincent MAILHOL, kernel test robot Cc: Marc Kleine-Budde, linux-can, kbuild-all, clang-built-linux, Oliver Hartkopp, Arunachalam Santhanam, Wolfgang Grandegger, Jakub Kicinski, Masahiro Yamada, open list, open list:NETWORKING DRIVERS On 11/15/20 7:41 PM, Vincent MAILHOL wrote: > The report from Intel's test robot is a false positive. > > On Sun. 15 Nov. 2020 at 03:12, kernel test robot wrote: >> Hi Vincent, >> >> Thank you for the patch! Yet something to improve: >> >> [auto build test ERROR on linus/master] >> [also build test ERROR on bff6f1db91e330d7fba56f815cdbc412c75fe163 v5.10-rc3 next-20201113] >> [If your patch is applied to the wrong git tree, kindly drop us a note. > Patch is applied to the wrong git tree. It is based on the testing > branch of linux-can-next: > https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git/log/?h=testing > >> And when submitting patch, we suggest to use '--base' as documented in >> https://git-scm.com/docs/git-format-patch] > I did so (c.f. the base-commit and prerequisite-patch-id tags at the > bottom of the patch). While the base-commit was taken into account, > the prerequisite-patch-id tags seem to have been ignored. > > FYI, I used the below command to generate the patch. > git format-patch --base=bff6f1db91e330d7fba56f815cdbc412c75fe163 -v6 > -o patch/v6 HEAD~1 Hi Vincent, Thanks for the feedback, we'll fix the problem asap. Best Regards, Rong Chen > > > Yours sincerely, > Vincent Mailhol > >> url: https://github.com/0day-ci/linux/commits/Vincent-Mailhol/can-usb-etas_es58X-add-support-for-ETAS-ES58X-CAN-USB-interfaces/20201114-232854 >> base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git f01c30de86f1047e9bae1b1b1417b0ce8dcd15b1 >> config: x86_64-randconfig-a005-20201115 (attached as .config) >> compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 9a85643cd357e412cff69067bb5c4840e228c2ab) >> 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 >> # https://github.com/0day-ci/linux/commit/80a9b72580bad04e879752fa5c54d278b486e2bb >> git remote add linux-review https://github.com/0day-ci/linux >> git fetch --no-tags linux-review Vincent-Mailhol/can-usb-etas_es58X-add-support-for-ETAS-ES58X-CAN-USB-interfaces/20201114-232854 >> git checkout 80a9b72580bad04e879752fa5c54d278b486e2bb >> # 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@intel.com> >> >> All errors (new ones prefixed by >>): >> >>>> drivers/net/can/usb/etas_es58x/es58x_core.c:745:12: error: use of undeclared identifier 'CAN_MAX_RAW_DLC' >> if (dlc > CAN_MAX_RAW_DLC) { >> ^ >> drivers/net/can/usb/etas_es58x/es58x_core.c:748:22: error: use of undeclared identifier 'CAN_MAX_RAW_DLC' >> __func__, dlc, CAN_MAX_RAW_DLC); >> ^ >>>> drivers/net/can/usb/etas_es58x/es58x_core.c:753:9: error: implicit declaration of function 'can_fd_dlc2len' [-Werror,-Wimplicit-function-declaration] >> len = can_fd_dlc2len(dlc); >> ^ >> drivers/net/can/usb/etas_es58x/es58x_core.c:753:9: note: did you mean 'can_dlc2len'? >> include/linux/can/dev.h:190:4: note: 'can_dlc2len' declared here >> u8 can_dlc2len(u8 can_dlc); >> ^ >>>> drivers/net/can/usb/etas_es58x/es58x_core.c:756:9: error: implicit declaration of function 'can_cc_dlc2len' [-Werror,-Wimplicit-function-declaration] >> len = can_cc_dlc2len(dlc); >> ^ >> drivers/net/can/usb/etas_es58x/es58x_core.c:756:9: note: did you mean 'can_dlc2len'? >> include/linux/can/dev.h:190:4: note: 'can_dlc2len' declared here >> u8 can_dlc2len(u8 can_dlc); >> ^ >>>> drivers/net/can/usb/etas_es58x/es58x_core.c:775:3: error: implicit declaration of function 'can_frame_set_cc_len' [-Werror,-Wimplicit-function-declaration] >> can_frame_set_cc_len(ccf, dlc, es58x_priv(netdev)->can.ctrlmode); >> ^ >> 5 errors generated. >> -- >>>> drivers/net/can/usb/etas_es58x/es581_4.c:385:20: error: implicit declaration of function 'can_get_cc_dlc' [-Werror,-Wimplicit-function-declaration] >> tx_can_msg->dlc = can_get_cc_dlc(cf, priv->can.ctrlmode); >> ^ >>>> drivers/net/can/usb/etas_es58x/es581_4.c:387:41: error: no member named 'len' in 'struct can_frame' >> memcpy(tx_can_msg->data, cf->data, cf->len); >> ~~ ^ >>>> drivers/net/can/usb/etas_es58x/es581_4.c:391:13: error: implicit declaration of function 'can_cc_dlc2len' [-Werror,-Wimplicit-function-declaration] >> msg_len += es581_4_sizeof_rx_tx_msg(*tx_can_msg); >> ^ >> drivers/net/can/usb/etas_es58x/es581_4.c:30:29: note: expanded from macro 'es581_4_sizeof_rx_tx_msg' >> offsetof(typeof(msg), data[can_cc_dlc2len((msg).dlc)]) >> ^ >> drivers/net/can/usb/etas_es58x/es581_4.c:391:13: note: did you mean 'can_dlc2len'? >> drivers/net/can/usb/etas_es58x/es581_4.c:30:29: note: expanded from macro 'es581_4_sizeof_rx_tx_msg' >> offsetof(typeof(msg), data[can_cc_dlc2len((msg).dlc)]) >> ^ >> include/linux/can/dev.h:190:4: note: 'can_dlc2len' declared here >> u8 can_dlc2len(u8 can_dlc); >> ^ >>>> drivers/net/can/usb/etas_es58x/es581_4.c:515:48: error: use of undeclared identifier 'CAN_CTRLMODE_CC_LEN8_DLC' >> .ctrlmode_supported = CAN_CTRLMODE_LOOPBACK | CAN_CTRLMODE_CC_LEN8_DLC, >> ^ >> 4 errors generated. >> -- >>>> drivers/net/can/usb/etas_es58x/es58x_fd.c:119:24: error: implicit declaration of function 'can_cc_dlc2len' [-Werror,-Wimplicit-function-declaration] >> u16 rx_can_msg_len = es58x_fd_sizeof_rx_tx_msg(*rx_can_msg); >> ^ >> drivers/net/can/usb/etas_es58x/es58x_fd.c:36:3: note: expanded from macro 'es58x_fd_sizeof_rx_tx_msg' >> can_cc_dlc2len(__msg.dlc); \ >> ^ >> drivers/net/can/usb/etas_es58x/es58x_fd.c:119:24: note: did you mean 'can_dlc2len'? >> drivers/net/can/usb/etas_es58x/es58x_fd.c:36:3: note: expanded from macro 'es58x_fd_sizeof_rx_tx_msg' >> can_cc_dlc2len(__msg.dlc); \ >> ^ >> include/linux/can/dev.h:190:4: note: 'can_dlc2len' declared here >> u8 can_dlc2len(u8 can_dlc); >> ^ >>>> drivers/net/can/usb/etas_es58x/es58x_fd.c:141:11: error: implicit declaration of function 'can_fd_len2dlc' [-Werror,-Wimplicit-function-declaration] >> dlc = can_fd_len2dlc(rx_can_msg->len); >> ^ >> drivers/net/can/usb/etas_es58x/es58x_fd.c:141:11: note: did you mean 'can_len2dlc'? >> include/linux/can/dev.h:193:4: note: 'can_len2dlc' declared here >> u8 can_len2dlc(u8 len); >> ^ >>>> drivers/net/can/usb/etas_es58x/es58x_fd.c:371:25: error: no member named 'len' in 'struct can_frame' >> tx_can_msg->len = cf->len; >> ~~ ^ >>>> drivers/net/can/usb/etas_es58x/es58x_fd.c:373:21: error: implicit declaration of function 'can_get_cc_dlc' [-Werror,-Wimplicit-function-declaration] >> tx_can_msg->dlc = can_get_cc_dlc(cf, priv->can.ctrlmode); >> ^ >> drivers/net/can/usb/etas_es58x/es58x_fd.c:374:41: error: no member named 'len' in 'struct can_frame' >> memcpy(tx_can_msg->data, cf->data, cf->len); >> ~~ ^ >> drivers/net/can/usb/etas_es58x/es58x_fd.c:377:13: error: implicit declaration of function 'can_cc_dlc2len' [-Werror,-Wimplicit-function-declaration] >> msg_len += es58x_fd_sizeof_rx_tx_msg(*tx_can_msg); >> ^ >> drivers/net/can/usb/etas_es58x/es58x_fd.c:36:3: note: expanded from macro 'es58x_fd_sizeof_rx_tx_msg' >> can_cc_dlc2len(__msg.dlc); \ >> ^ >>>> drivers/net/can/usb/etas_es58x/es58x_fd.c:617:6: error: use of undeclared identifier 'CAN_CTRLMODE_CC_LEN8_DLC' >> CAN_CTRLMODE_CC_LEN8_DLC, >> ^ >> 7 errors generated. >> >> vim +/CAN_MAX_RAW_DLC +745 drivers/net/can/usb/etas_es58x/es58x_core.c >> >> 718 >> 719 /** >> 720 * es58x_rx_can_msg() - Handle a received a CAN message. >> 721 * @netdev: CAN network device. >> 722 * @timestamp: Hardware time stamp (only relevant in rx branches). >> 723 * @data: CAN payload. >> 724 * @can_id: CAN ID. >> 725 * @es58x_flags: Please refer to enum es58x_flag. >> 726 * @dlc: Data Length Code (raw value). >> 727 * >> 728 * Fill up a CAN skb and post it. >> 729 * >> 730 * This function handles the case where the DLC of a classical CAN >> 731 * frame is greater than CAN_MAX_DLEN (c.f. the len8_dlc field of >> 732 * struct can_frame). >> 733 * >> 734 * Return: zero on success. >> 735 */ >> 736 int es58x_rx_can_msg(struct net_device *netdev, u64 timestamp, const u8 *data, >> 737 canid_t can_id, enum es58x_flag es58x_flags, u8 dlc) >> 738 { >> 739 struct canfd_frame *cfd; >> 740 struct can_frame *ccf; >> 741 struct sk_buff *skb; >> 742 u8 len; >> 743 bool is_can_fd = !!(es58x_flags & ES58X_FLAG_FD_DATA); >> 744 >> > 745 if (dlc > CAN_MAX_RAW_DLC) { >> 746 netdev_err(netdev, >> 747 "%s: DLC is %d but maximum should be %d\n", >> 748 __func__, dlc, CAN_MAX_RAW_DLC); >> 749 return -EMSGSIZE; >> 750 } >> 751 >> 752 if (is_can_fd) { >> > 753 len = can_fd_dlc2len(dlc); >> 754 skb = alloc_canfd_skb(netdev, &cfd); >> 755 } else { >> > 756 len = can_cc_dlc2len(dlc); >> 757 skb = alloc_can_skb(netdev, &ccf); >> 758 cfd = (struct canfd_frame *)ccf; >> 759 } >> 760 >> 761 if (!skb) { >> 762 netdev->stats.rx_dropped++; >> 763 return -ENOMEM; >> 764 } >> 765 cfd->can_id = can_id; >> 766 if (es58x_flags & ES58X_FLAG_EFF) >> 767 cfd->can_id |= CAN_EFF_FLAG; >> 768 if (is_can_fd) { >> 769 cfd->len = len; >> 770 if (es58x_flags & ES58X_FLAG_FD_BRS) >> 771 cfd->flags |= CANFD_BRS; >> 772 if (es58x_flags & ES58X_FLAG_FD_ESI) >> 773 cfd->flags |= CANFD_ESI; >> 774 } else { >> > 775 can_frame_set_cc_len(ccf, dlc, es58x_priv(netdev)->can.ctrlmode); >> 776 if (es58x_flags & ES58X_FLAG_RTR) { >> 777 ccf->can_id |= CAN_RTR_FLAG; >> 778 len = 0; >> 779 } >> 780 } >> 781 memcpy(cfd->data, data, len); >> 782 netdev->stats.rx_packets++; >> 783 netdev->stats.rx_bytes += len; >> 784 >> 785 es58x_set_skb_timestamp(netdev, skb, timestamp); >> 786 netif_rx(skb); >> 787 >> 788 es58x_priv(netdev)->err_passive_before_rtx_success = 0; >> 789 >> 790 return 0; >> 791 } >> 792 >> >> --- >> 0-DAY CI Kernel Test Service, Intel Corporation >> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org > _______________________________________________ > kbuild-all mailing list -- kbuild-all@lists.01.org > To unsubscribe send an email to kbuild-all-leave@lists.01.org ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v6] can: usb: etas_es58X: add support for ETAS ES58X CAN USB interfaces [not found] <20201114152325.523630-1-mailhol.vincent@wanadoo.fr> 2020-11-14 18:12 ` [PATCH v6] can: usb: etas_es58X: add support for ETAS ES58X CAN USB interfaces kernel test robot @ 2020-11-15 18:55 ` Marc Kleine-Budde 2020-11-16 14:44 ` Vincent MAILHOL 1 sibling, 1 reply; 6+ messages in thread From: Marc Kleine-Budde @ 2020-11-15 18:55 UTC (permalink / raw) To: Vincent Mailhol, linux-can Cc: Oliver Hartkopp, Arunachalam Santhanam, Wolfgang Grandegger, David S. Miller, Jakub Kicinski, Masahiro Yamada, open list, open list:NETWORKING DRIVERS [-- Attachment #1.1: Type: text/plain, Size: 1113 bytes --] On 11/14/20 4:22 PM, Vincent Mailhol wrote: > This driver supports the ES581.4, ES582.1 and ES584.1 interfaces from > ETAS GmbH (https://www.etas.com/en/products/es58x.php). > > Co-developed-by: Arunachalam Santhanam <arunachalam.santhanam@in.bosch.com> > Signed-off-by: Arunachalam Santhanam <arunachalam.santhanam@in.bosch.com> > Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> The driver fails to compile with CONFIG_SYSFS switched off CC [M] drivers/net/can/usb/etas_es58x/es58x_core.o drivers/net/can/usb/etas_es58x/es58x_core.c: In function ‘es58x_init_netdev’: drivers/net/can/usb/etas_es58x/es58x_core.c:2380:32: error: ‘struct netdev_queue’ has no member named ‘dql’ 2380 | netdev_get_tx_queue(netdev, 0)->dql.min_limit = | ^~ regards, Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v6] can: usb: etas_es58X: add support for ETAS ES58X CAN USB interfaces 2020-11-15 18:55 ` Marc Kleine-Budde @ 2020-11-16 14:44 ` Vincent MAILHOL 2020-11-16 15:02 ` Marc Kleine-Budde 0 siblings, 1 reply; 6+ messages in thread From: Vincent MAILHOL @ 2020-11-16 14:44 UTC (permalink / raw) To: Marc Kleine-Budde Cc: linux-can, Oliver Hartkopp, Arunachalam Santhanam, Wolfgang Grandegger, David S. Miller, Jakub Kicinski, Masahiro Yamada, open list, open list:NETWORKING DRIVERS On Mon. 16 Nov 2020 at 03:55, Marc Kleine-Budde wrote: > On 11/14/20 4:22 PM, Vincent Mailhol wrote: > > This driver supports the ES581.4, ES582.1 and ES584.1 interfaces from > > ETAS GmbH (https://www.etas.com/en/products/es58x.php). > > > > Co-developed-by: Arunachalam Santhanam <arunachalam.santhanam@in.bosch.com> > > Signed-off-by: Arunachalam Santhanam <arunachalam.santhanam@in.bosch.com> > > Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> > > The driver fails to compile with CONFIG_SYSFS switched off > > CC [M] drivers/net/can/usb/etas_es58x/es58x_core.o > drivers/net/can/usb/etas_es58x/es58x_core.c: In function ‘es58x_init_netdev’: > drivers/net/can/usb/etas_es58x/es58x_core.c:2380:32: error: ‘struct netdev_queue’ has no member named ‘dql’ > 2380 | netdev_get_tx_queue(netdev, 0)->dql.min_limit = > | ^~ Thanks, nice catch! CONFIG_SYSFS is an expert setting, I totally missed that one. Took me actually a couple of minutes navigating in the menuconfig to find how to remove the option. The root cause is actually on CONFIG_BQL (which depends on CONFIG_SYSFS). Reference: https://elixir.bootlin.com/linux/latest/source/include/linux/netdevice.h#L636 Will send a v7 patch right after. Out of curiosity, how did you find this? Did you find it during a code review or did you just happen to have a .config with CONFIG_SYSFS Yours sincerely, Vincent Mailhol ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v6] can: usb: etas_es58X: add support for ETAS ES58X CAN USB interfaces 2020-11-16 14:44 ` Vincent MAILHOL @ 2020-11-16 15:02 ` Marc Kleine-Budde 0 siblings, 0 replies; 6+ messages in thread From: Marc Kleine-Budde @ 2020-11-16 15:02 UTC (permalink / raw) To: Vincent MAILHOL Cc: linux-can, Oliver Hartkopp, Arunachalam Santhanam, Wolfgang Grandegger, David S. Miller, Jakub Kicinski, Masahiro Yamada, open list, open list:NETWORKING DRIVERS [-- Attachment #1.1: Type: text/plain, Size: 1883 bytes --] On 11/16/20 3:44 PM, Vincent MAILHOL wrote: > On Mon. 16 Nov 2020 at 03:55, Marc Kleine-Budde wrote: >> On 11/14/20 4:22 PM, Vincent Mailhol wrote: >>> This driver supports the ES581.4, ES582.1 and ES584.1 interfaces from >>> ETAS GmbH (https://www.etas.com/en/products/es58x.php). >>> >>> Co-developed-by: Arunachalam Santhanam <arunachalam.santhanam@in.bosch.com> >>> Signed-off-by: Arunachalam Santhanam <arunachalam.santhanam@in.bosch.com> >>> Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> >> >> The driver fails to compile with CONFIG_SYSFS switched off >> >> CC [M] drivers/net/can/usb/etas_es58x/es58x_core.o >> drivers/net/can/usb/etas_es58x/es58x_core.c: In function ‘es58x_init_netdev’: >> drivers/net/can/usb/etas_es58x/es58x_core.c:2380:32: error: ‘struct netdev_queue’ has no member named ‘dql’ >> 2380 | netdev_get_tx_queue(netdev, 0)->dql.min_limit = >> | ^~ > > Thanks, nice catch! > CONFIG_SYSFS is an expert setting, I totally missed that one. Took me > actually a couple of minutes navigating in the menuconfig to find how > to remove the option. me too :) > The root cause is actually on CONFIG_BQL (which depends on > CONFIG_SYSFS). > Reference: https://elixir.bootlin.com/linux/latest/source/include/linux/netdevice.h#L636 > > Will send a v7 patch right after. > > Out of curiosity, how did you find this? Did you find it during a code > review or did you just happen to have a .config with CONFIG_SYSFS During code review, I found that the dql had a ifdef CONFIG_SYSFS. Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-11-16 15:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20201114152325.523630-1-mailhol.vincent@wanadoo.fr>
2020-11-14 18:12 ` [PATCH v6] can: usb: etas_es58X: add support for ETAS ES58X CAN USB interfaces kernel test robot
2020-11-15 11:41 ` Vincent MAILHOL
2020-11-16 0:31 ` [kbuild-all] " Rong Chen
2020-11-15 18:55 ` Marc Kleine-Budde
2020-11-16 14:44 ` Vincent MAILHOL
2020-11-16 15:02 ` Marc Kleine-Budde
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox