From: kernel test robot <lkp@intel.com>
To: "Bernard Zhao" <zhaojunkui2008@126.com>,
"Wolfgang Grandegger" <wg@grandegger.com>,
"Marc Kleine-Budde" <mkl@pengutronix.de>,
"David S. Miller" <davem@davemloft.net>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Vincent Mailhol" <mailhol.vincent@wanadoo.fr>,
"Stefan Mätje" <stefan.maetje@esd.eu>,
linux-can@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
netdev@vger.kernel.org, bernard@vivo.com
Subject: Re: [PATCH v2] usb/peak_usb: cleanup code
Date: Thu, 12 May 2022 04:43:49 +0800 [thread overview]
Message-ID: <202205120402.hmn6WJGb-lkp@intel.com> (raw)
In-Reply-To: <20220511130240.790771-1-zhaojunkui2008@126.com>
Hi Bernard,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on mkl-can-next/testing]
[also build test ERROR on v5.18-rc6 next-20220511]
[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/intel-lab-lkp/linux/commits/Bernard-Zhao/usb-peak_usb-cleanup-code/20220511-210544
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git testing
config: hexagon-randconfig-r023-20220509 (https://download.01.org/0day-ci/archive/20220512/202205120402.hmn6WJGb-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 18dd123c56754edf62c7042dcf23185c3727610f)
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
# https://github.com/intel-lab-lkp/linux/commit/126e94285ae6302c0b5ef6ec5174ebc2685ff220
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Bernard-Zhao/usb-peak_usb-cleanup-code/20220511-210544
git checkout 126e94285ae6302c0b5ef6ec5174ebc2685ff220
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/net/can/usb/peak_usb/
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/peak_usb/pcan_usb_pro.c:914:8: error: use of undeclared identifier 'bi'
kfree(bi);
^
>> drivers/net/can/usb/peak_usb/pcan_usb_pro.c:915:8: error: use of undeclared identifier 'fi'
kfree(fi);
^
2 errors generated.
vim +/bi +914 drivers/net/can/usb/peak_usb/pcan_usb_pro.c
d8a199355f8f8a Stephane Grosjean 2012-03-02 843
126e94285ae630 Bernard Zhao 2022-05-11 844 static int pcan_usb_pro_init_first_channel(struct peak_usb_device *dev, struct pcan_usb_pro_interface **usb_if)
d8a199355f8f8a Stephane Grosjean 2012-03-02 845 {
126e94285ae630 Bernard Zhao 2022-05-11 846 struct pcan_usb_pro_interface *pusb_if = NULL;
f14e22435a27ef Marc Kleine-Budde 2013-05-16 847 int err;
d8a199355f8f8a Stephane Grosjean 2012-03-02 848
d8a199355f8f8a Stephane Grosjean 2012-03-02 849 /* do this for 1st channel only */
d8a199355f8f8a Stephane Grosjean 2012-03-02 850 if (!dev->prev_siblings) {
126e94285ae630 Bernard Zhao 2022-05-11 851 struct pcan_usb_pro_fwinfo *fi = NULL;
126e94285ae630 Bernard Zhao 2022-05-11 852 struct pcan_usb_pro_blinfo *bi = NULL;
126e94285ae630 Bernard Zhao 2022-05-11 853
d8a199355f8f8a Stephane Grosjean 2012-03-02 854 /* allocate netdevices common structure attached to first one */
126e94285ae630 Bernard Zhao 2022-05-11 855 pusb_if = kzalloc(sizeof(struct pcan_usb_pro_interface),
d8a199355f8f8a Stephane Grosjean 2012-03-02 856 GFP_KERNEL);
f14e22435a27ef Marc Kleine-Budde 2013-05-16 857 fi = kmalloc(sizeof(struct pcan_usb_pro_fwinfo), GFP_KERNEL);
f14e22435a27ef Marc Kleine-Budde 2013-05-16 858 bi = kmalloc(sizeof(struct pcan_usb_pro_blinfo), GFP_KERNEL);
126e94285ae630 Bernard Zhao 2022-05-11 859 if (!pusb_if || !fi || !bi) {
f14e22435a27ef Marc Kleine-Budde 2013-05-16 860 err = -ENOMEM;
f14e22435a27ef Marc Kleine-Budde 2013-05-16 861 goto err_out;
f14e22435a27ef Marc Kleine-Budde 2013-05-16 862 }
d8a199355f8f8a Stephane Grosjean 2012-03-02 863
d8a199355f8f8a Stephane Grosjean 2012-03-02 864 /* number of ts msgs to ignore before taking one into account */
126e94285ae630 Bernard Zhao 2022-05-11 865 pusb_if->cm_ignore_count = 5;
d8a199355f8f8a Stephane Grosjean 2012-03-02 866
d8a199355f8f8a Stephane Grosjean 2012-03-02 867 /*
d8a199355f8f8a Stephane Grosjean 2012-03-02 868 * explicit use of dev_xxx() instead of netdev_xxx() here:
d8a199355f8f8a Stephane Grosjean 2012-03-02 869 * information displayed are related to the device itself, not
d8a199355f8f8a Stephane Grosjean 2012-03-02 870 * to the canx netdevices.
d8a199355f8f8a Stephane Grosjean 2012-03-02 871 */
d8a199355f8f8a Stephane Grosjean 2012-03-02 872 err = pcan_usb_pro_send_req(dev, PCAN_USBPRO_REQ_INFO,
d8a199355f8f8a Stephane Grosjean 2012-03-02 873 PCAN_USBPRO_INFO_FW,
f14e22435a27ef Marc Kleine-Budde 2013-05-16 874 fi, sizeof(*fi));
d8a199355f8f8a Stephane Grosjean 2012-03-02 875 if (err) {
d8a199355f8f8a Stephane Grosjean 2012-03-02 876 dev_err(dev->netdev->dev.parent,
d8a199355f8f8a Stephane Grosjean 2012-03-02 877 "unable to read %s firmware info (err %d)\n",
d8a199355f8f8a Stephane Grosjean 2012-03-02 878 pcan_usb_pro.name, err);
f14e22435a27ef Marc Kleine-Budde 2013-05-16 879 goto err_out;
d8a199355f8f8a Stephane Grosjean 2012-03-02 880 }
d8a199355f8f8a Stephane Grosjean 2012-03-02 881
d8a199355f8f8a Stephane Grosjean 2012-03-02 882 err = pcan_usb_pro_send_req(dev, PCAN_USBPRO_REQ_INFO,
d8a199355f8f8a Stephane Grosjean 2012-03-02 883 PCAN_USBPRO_INFO_BL,
f14e22435a27ef Marc Kleine-Budde 2013-05-16 884 bi, sizeof(*bi));
d8a199355f8f8a Stephane Grosjean 2012-03-02 885 if (err) {
d8a199355f8f8a Stephane Grosjean 2012-03-02 886 dev_err(dev->netdev->dev.parent,
d8a199355f8f8a Stephane Grosjean 2012-03-02 887 "unable to read %s bootloader info (err %d)\n",
d8a199355f8f8a Stephane Grosjean 2012-03-02 888 pcan_usb_pro.name, err);
f14e22435a27ef Marc Kleine-Budde 2013-05-16 889 goto err_out;
d8a199355f8f8a Stephane Grosjean 2012-03-02 890 }
d8a199355f8f8a Stephane Grosjean 2012-03-02 891
f14e22435a27ef Marc Kleine-Budde 2013-05-16 892 /* tell the device the can driver is running */
f14e22435a27ef Marc Kleine-Budde 2013-05-16 893 err = pcan_usb_pro_drv_loaded(dev, 1);
f14e22435a27ef Marc Kleine-Budde 2013-05-16 894 if (err)
f14e22435a27ef Marc Kleine-Budde 2013-05-16 895 goto err_out;
f14e22435a27ef Marc Kleine-Budde 2013-05-16 896
d8a199355f8f8a Stephane Grosjean 2012-03-02 897 dev_info(dev->netdev->dev.parent,
d8a199355f8f8a Stephane Grosjean 2012-03-02 898 "PEAK-System %s hwrev %u serial %08X.%08X (%u channels)\n",
d8a199355f8f8a Stephane Grosjean 2012-03-02 899 pcan_usb_pro.name,
f14e22435a27ef Marc Kleine-Budde 2013-05-16 900 bi->hw_rev, bi->serial_num_hi, bi->serial_num_lo,
d8a199355f8f8a Stephane Grosjean 2012-03-02 901 pcan_usb_pro.ctrl_count);
d8a199355f8f8a Stephane Grosjean 2012-03-02 902
20fb4eb96fb035 Marc Kleine-Budde 2013-12-14 903 kfree(bi);
20fb4eb96fb035 Marc Kleine-Budde 2013-12-14 904 kfree(fi);
126e94285ae630 Bernard Zhao 2022-05-11 905 } else {
126e94285ae630 Bernard Zhao 2022-05-11 906 pusb_if = pcan_usb_pro_dev_if(dev->prev_siblings);
126e94285ae630 Bernard Zhao 2022-05-11 907 }
126e94285ae630 Bernard Zhao 2022-05-11 908
126e94285ae630 Bernard Zhao 2022-05-11 909 *usb_if = pusb_if;
20fb4eb96fb035 Marc Kleine-Budde 2013-12-14 910
d8a199355f8f8a Stephane Grosjean 2012-03-02 911 return 0;
f14e22435a27ef Marc Kleine-Budde 2013-05-16 912
f14e22435a27ef Marc Kleine-Budde 2013-05-16 913 err_out:
f14e22435a27ef Marc Kleine-Budde 2013-05-16 @914 kfree(bi);
f14e22435a27ef Marc Kleine-Budde 2013-05-16 @915 kfree(fi);
f14e22435a27ef Marc Kleine-Budde 2013-05-16 916 kfree(usb_if);
f14e22435a27ef Marc Kleine-Budde 2013-05-16 917
f14e22435a27ef Marc Kleine-Budde 2013-05-16 918 return err;
d8a199355f8f8a Stephane Grosjean 2012-03-02 919 }
d8a199355f8f8a Stephane Grosjean 2012-03-02 920
--
0-DAY CI Kernel Test Service
https://01.org/lkp
prev parent reply other threads:[~2022-05-11 20:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-11 13:02 [PATCH v2] usb/peak_usb: cleanup code Bernard Zhao
2022-05-11 14:28 ` Vincent MAILHOL
2022-05-12 1:15 ` z
2022-05-11 19:42 ` kernel test robot
2022-05-11 20:43 ` kernel test robot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202205120402.hmn6WJGb-lkp@intel.com \
--to=lkp@intel.com \
--cc=bernard@vivo.com \
--cc=davem@davemloft.net \
--cc=kbuild-all@lists.01.org \
--cc=kuba@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mailhol.vincent@wanadoo.fr \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stefan.maetje@esd.eu \
--cc=wg@grandegger.com \
--cc=zhaojunkui2008@126.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).