Content-Type: multipart/mixed; boundary="===============5282520872097281166==" MIME-Version: 1.0 From: Rong Chen To: kbuild-all@lists.01.org Subject: Re: [PATCH v6] can: usb: etas_es58X: add support for ETAS ES58X CAN USB interfaces Date: Mon, 16 Nov 2020 08:31:53 +0800 Message-ID: <25305b69-72f8-d862-6e67-9af1b2de3403@intel.com> In-Reply-To: List-Id: --===============5282520872097281166== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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/lo= g/?h=3Dtesting > >> 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=3Dbff6f1db91e330d7fba56f815cdbc412c75fe163 -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.g= it f01c30de86f1047e9bae1b1b1417b0ce8dcd15b1 >> config: x86_64-randconfig-a005-20201115 (attached as .config) >> compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 9a8= 5643cd357e412cff69067bb5c4840e228c2ab) >> reproduce (this is a W=3D1 build): >> wget https://raw.githubusercontent.com/intel/lkp-tests/master/s= bin/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/80a9b72580bad04e87975= 2fa5c54d278b486e2bb >> git remote add linux-review https://github.com/0day-ci/linux >> git fetch --no-tags linux-review Vincent-Mailhol/can-usb-etas_e= s58X-add-support-for-ETAS-ES58X-CAN-USB-interfaces/20201114-232854 >> git checkout 80a9b72580bad04e879752fa5c54d278b486e2bb >> # save the attached .config to linux build tree >> COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dclang make.cross = ARCH=3Dx86_64 >> >> If you fix the issue, kindly add following tag as appropriate >> Reported-by: kernel test robot >> >> All errors (new ones prefixed by >>): >> >>>> drivers/net/can/usb/etas_es58x/es58x_core.c:745:12: error: use of unde= clared 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 un= declared identifier 'CAN_MAX_RAW_DLC' >> __func__, dlc, CAN_MAX_RAW_DLC); >> ^ >>>> drivers/net/can/usb/etas_es58x/es58x_core.c:753:9: error: implicit dec= laration of function 'can_fd_dlc2len' [-Werror,-Wimplicit-function-declarat= ion] >> len =3D can_fd_dlc2len(dlc); >> ^ >> drivers/net/can/usb/etas_es58x/es58x_core.c:753:9: note: did you mea= n '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 dec= laration of function 'can_cc_dlc2len' [-Werror,-Wimplicit-function-declarat= ion] >> len =3D can_cc_dlc2len(dlc); >> ^ >> drivers/net/can/usb/etas_es58x/es58x_core.c:756:9: note: did you mea= n '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 dec= laration of function 'can_frame_set_cc_len' [-Werror,-Wimplicit-function-de= claration] >> can_frame_set_cc_len(ccf, dlc, es58x_priv(netdev)->c= an.ctrlmode); >> ^ >> 5 errors generated. >> -- >>>> drivers/net/can/usb/etas_es58x/es581_4.c:385:20: error: implicit decla= ration of function 'can_get_cc_dlc' [-Werror,-Wimplicit-function-declaratio= n] >> tx_can_msg->dlc =3D can_get_cc_dlc(cf, priv->can.ctrlmode); >> ^ >>>> drivers/net/can/usb/etas_es58x/es581_4.c:387:41: error: no member name= d '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 decla= ration of function 'can_cc_dlc2len' [-Werror,-Wimplicit-function-declaratio= n] >> msg_len +=3D 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 undecla= red identifier 'CAN_CTRLMODE_CC_LEN8_DLC' >> .ctrlmode_supported =3D CAN_CTRLMODE_LOOPBACK | CAN_CTRLMODE= _CC_LEN8_DLC, >> ^ >> 4 errors generated. >> -- >>>> drivers/net/can/usb/etas_es58x/es58x_fd.c:119:24: error: implicit decl= aration of function 'can_cc_dlc2len' [-Werror,-Wimplicit-function-declarati= on] >> u16 rx_can_msg_len =3D 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 decl= aration of function 'can_fd_len2dlc' [-Werror,-Wimplicit-function-declarati= on] >> dlc =3D can_fd_len2dlc(rx_can_msg->l= en); >> ^ >> 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 nam= ed 'len' in 'struct can_frame' >> tx_can_msg->len =3D cf->len; >> ~~ ^ >>>> drivers/net/can/usb/etas_es58x/es58x_fd.c:373:21: error: implicit decl= aration of function 'can_get_cc_dlc' [-Werror,-Wimplicit-function-declarati= on] >> tx_can_msg->dlc =3D can_get_cc_dlc(cf, priv->can.ctr= lmode); >> ^ >> drivers/net/can/usb/etas_es58x/es58x_fd.c:374:41: error: no member n= amed '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 de= claration of function 'can_cc_dlc2len' [-Werror,-Wimplicit-function-declara= tion] >> msg_len +=3D 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 undecla= red 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 branche= s). >> 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_flag= s, 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 =3D !!(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 =3D can_fd_dlc2len(dlc); >> 754 skb =3D alloc_canfd_skb(netdev, &cfd); >> 755 } else { >> > 756 len =3D can_cc_dlc2len(dlc); >> 757 skb =3D alloc_can_skb(netdev, &ccf); >> 758 cfd =3D (struct canfd_frame *)ccf; >> 759 } >> 760 >> 761 if (!skb) { >> 762 netdev->stats.rx_dropped++; >> 763 return -ENOMEM; >> 764 } >> 765 cfd->can_id =3D can_id; >> 766 if (es58x_flags & ES58X_FLAG_EFF) >> 767 cfd->can_id |=3D CAN_EFF_FLAG; >> 768 if (is_can_fd) { >> 769 cfd->len =3D len; >> 770 if (es58x_flags & ES58X_FLAG_FD_BRS) >> 771 cfd->flags |=3D CANFD_BRS; >> 772 if (es58x_flags & ES58X_FLAG_FD_ESI) >> 773 cfd->flags |=3D CANFD_ESI; >> 774 } else { >> > 775 can_frame_set_cc_len(ccf, dlc, es58x_priv(netde= v)->can.ctrlmode); >> 776 if (es58x_flags & ES58X_FLAG_RTR) { >> 777 ccf->can_id |=3D CAN_RTR_FLAG; >> 778 len =3D 0; >> 779 } >> 780 } >> 781 memcpy(cfd->data, data, len); >> 782 netdev->stats.rx_packets++; >> 783 netdev->stats.rx_bytes +=3D len; >> 784 >> 785 es58x_set_skb_timestamp(netdev, skb, timestamp); >> 786 netif_rx(skb); >> 787 >> 788 es58x_priv(netdev)->err_passive_before_rtx_success =3D = 0; >> 789 >> 790 return 0; >> 791 } >> 792 >> >> --- >> 0-DAY CI Kernel Test Service, Intel Corporation >> https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org > _______________________________________________ > kbuild-all mailing list -- kbuild-all(a)lists.01.org > To unsubscribe send an email to kbuild-all-leave(a)lists.01.org --===============5282520872097281166==--