Content-Type: multipart/mixed; boundary="===============5424250305633769818==" MIME-Version: 1.0 From: Ajay.Kathat@microchip.com To: kbuild-all@lists.01.org Subject: Re: [PATCH v7 17/17] wilc1000: add Makefile and Kconfig files for wilc1000 compilation Date: Wed, 24 Jun 2020 05:26:49 +0000 Message-ID: In-Reply-To: <202006232255.SJ9vbMlt%lkp@intel.com> List-Id: --===============5424250305633769818== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On 23/06/20 8:22 pm, kernel test robot wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know th= e content is safe > = > Hi, > = > I love your patch! Perhaps something to improve: > = > [auto build test WARNING on a15a20acc980342c97d804c5fae1cfc0cd7712a9] > = > url: https://github.com/0day-ci/linux/commits/Ajay-Kathat-microchip-co= m/wilc1000-move-out-of-staging/20200623-190333 > base: a15a20acc980342c97d804c5fae1cfc0cd7712a9 > config: ia64-allmodconfig (attached as .config) > compiler: ia64-linux-gcc (GCC) 9.3.0 > reproduce (this is a W=3D1 build): > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbi= n/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # save the attached .config to linux build tree > COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-9.3.0 make.cros= s ARCH=3Dia64 > = > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot > = > All warnings (new ones prefixed by >>): > = > drivers/net/wireless/microchip/wilc1000/mon.c: In function 'wilc_wfi_i= nit_mon_interface': >>> drivers/net/wireless/microchip/wilc1000/mon.c:232:2: warning: 'strncpy'= specified bound 16 equals destination size [-Wstringop-truncation] > 232 | strncpy(wl->monitor_dev->name, name, IFNAMSIZ); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Though replacing 'strncpy' with 'strlcpy' will help to suppress this warning but not sure if its true alarm because next line sets NULL termination for string. I agree 'strlcpy' is better candidate here and reduces one extra line. > = > vim +/strncpy +232 drivers/net/wireless/microchip/wilc1000/mon.c > = > daf8b5f14a7066 Ajay Singh 2020-06-23 216 > daf8b5f14a7066 Ajay Singh 2020-06-23 217 struct net_device *wilc_wfi_in= it_mon_interface(struct wilc *wl, > daf8b5f14a7066 Ajay Singh 2020-06-23 218 = const char *name, > daf8b5f14a7066 Ajay Singh 2020-06-23 219 = struct net_device *real_dev) > daf8b5f14a7066 Ajay Singh 2020-06-23 220 { > daf8b5f14a7066 Ajay Singh 2020-06-23 221 struct wilc_wfi_mon_priv = *priv; > daf8b5f14a7066 Ajay Singh 2020-06-23 222 > daf8b5f14a7066 Ajay Singh 2020-06-23 223 /* If monitor interface i= s already initialized, return it */ > daf8b5f14a7066 Ajay Singh 2020-06-23 224 if (wl->monitor_dev) > daf8b5f14a7066 Ajay Singh 2020-06-23 225 return wl->monito= r_dev; > daf8b5f14a7066 Ajay Singh 2020-06-23 226 > daf8b5f14a7066 Ajay Singh 2020-06-23 227 wl->monitor_dev =3D alloc= _etherdev(sizeof(struct wilc_wfi_mon_priv)); > daf8b5f14a7066 Ajay Singh 2020-06-23 228 if (!wl->monitor_dev) > daf8b5f14a7066 Ajay Singh 2020-06-23 229 return NULL; > daf8b5f14a7066 Ajay Singh 2020-06-23 230 > daf8b5f14a7066 Ajay Singh 2020-06-23 231 wl->monitor_dev->type =3D= ARPHRD_IEEE80211_RADIOTAP; > daf8b5f14a7066 Ajay Singh 2020-06-23 @232 strncpy(wl->monitor_dev->= name, name, IFNAMSIZ); > daf8b5f14a7066 Ajay Singh 2020-06-23 233 wl->monitor_dev->name[IFN= AMSIZ - 1] =3D 0; > daf8b5f14a7066 Ajay Singh 2020-06-23 234 wl->monitor_dev->netdev_o= ps =3D &wilc_wfi_netdev_ops; > daf8b5f14a7066 Ajay Singh 2020-06-23 235 wl->monitor_dev->needs_fr= ee_netdev =3D true; > daf8b5f14a7066 Ajay Singh 2020-06-23 236 > daf8b5f14a7066 Ajay Singh 2020-06-23 237 if (register_netdevice(wl= ->monitor_dev)) { > daf8b5f14a7066 Ajay Singh 2020-06-23 238 netdev_err(real_d= ev, "register_netdevice failed\n"); > daf8b5f14a7066 Ajay Singh 2020-06-23 239 return NULL; > daf8b5f14a7066 Ajay Singh 2020-06-23 240 } > daf8b5f14a7066 Ajay Singh 2020-06-23 241 priv =3D netdev_priv(wl->= monitor_dev); > daf8b5f14a7066 Ajay Singh 2020-06-23 242 if (!priv) > daf8b5f14a7066 Ajay Singh 2020-06-23 243 return NULL; > daf8b5f14a7066 Ajay Singh 2020-06-23 244 > daf8b5f14a7066 Ajay Singh 2020-06-23 245 priv->real_ndev =3D real_= dev; > daf8b5f14a7066 Ajay Singh 2020-06-23 246 > daf8b5f14a7066 Ajay Singh 2020-06-23 247 return wl->monitor_dev; > daf8b5f14a7066 Ajay Singh 2020-06-23 248 } > daf8b5f14a7066 Ajay Singh 2020-06-23 249 > = > --- > 0-DAY CI Kernel Test Service, Intel Corporation > https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org >=20 --===============5424250305633769818==--