From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============7246617124066078232==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH v18, 2/2] net: Add dm9051 driver Date: Mon, 07 Feb 2022 20:03:43 +0800 Message-ID: <202202071930.jk46Rzon-lkp@intel.com> In-Reply-To: <20220207090906.11156-3-josright123@gmail.com> List-Id: --===============7246617124066078232== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Joseph, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on 9d922f5df53844228b9f7c62f2593f4f06c0b69b] url: https://github.com/0day-ci/linux/commits/Joseph-CHAMG/ADD-DM9051-ET= HERNET-DRIVER/20220207-171932 base: 9d922f5df53844228b9f7c62f2593f4f06c0b69b config: h8300-allyesconfig (https://download.01.org/0day-ci/archive/2022020= 7/202202071930.jk46Rzon-lkp(a)intel.com/config) compiler: h8300-linux-gcc (GCC) 11.2.0 reproduce (this is a W=3D1 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/0day-ci/linux/commit/95377dabb7803b784249b3b64= 9966e0567e380de git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Joseph-CHAMG/ADD-DM9051-ETHERNET-D= RIVER/20220207-171932 git checkout 95377dabb7803b784249b3b649966e0567e380de # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cross= O=3Dbuild_dir ARCH=3Dh8300 SHELL=3D/bin/bash drivers/net/ethernet/davicom/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): In file included from include/linux/kernel.h:11, from include/linux/skbuff.h:13, from include/linux/if_ether.h:19, from include/linux/etherdevice.h:20, from drivers/net/ethernet/davicom/dm9051.c:7: include/linux/scatterlist.h: In function 'sg_set_buf': include/asm-generic/page.h:89:51: warning: ordered comparison of pointer= with null pointer [-Wextra] 89 | #define virt_addr_valid(kaddr) (((void *)(kaddr) >=3D (void *)P= AGE_OFFSET) && \ | ^~ include/linux/compiler.h:78:45: note: in definition of macro 'unlikely' 78 | # define unlikely(x) __builtin_expect(!!(x), 0) | ^ include/linux/scatterlist.h:143:9: note: in expansion of macro 'BUG_ON' 143 | BUG_ON(!virt_addr_valid(buf)); | ^~~~~~ include/linux/scatterlist.h:143:17: note: in expansion of macro 'virt_ad= dr_valid' 143 | BUG_ON(!virt_addr_valid(buf)); | ^~~~~~~~~~~~~~~ In file included from include/linux/etherdevice.h:21, from drivers/net/ethernet/davicom/dm9051.c:7: drivers/net/ethernet/davicom/dm9051.c: In function 'dm9051_rxctl_delay': >> drivers/net/ethernet/davicom/dm9051.c:930:42: warning: format '%d' expec= ts argument of type 'int', but argument 6 has type 'long unsigned int' [-Wf= ormat=3D] 930 | netif_err(db, drv, ndev, "%s: error %d bulk writ= ing reg %02x, len %d\n", | ^~~~~~~~~~~~~~~~~~~~~~~= ~~~~~~~~~~~~~~~~~~~~~~~ 931 | __func__, result, DM9051_PAR, sizeof(n= dev->dev_addr)); | ~~~~~~~~= ~~~~~~~~~~~~~~ | | | long uns= igned int include/linux/netdevice.h:5079:37: note: in definition of macro 'netif_l= evel' 5079 | netdev_##level(dev, fmt, ##args); \ | ^~~ drivers/net/ethernet/davicom/dm9051.c:930:17: note: in expansion of macr= o 'netif_err' 930 | netif_err(db, drv, ndev, "%s: error %d bulk writ= ing reg %02x, len %d\n", | ^~~~~~~~~ drivers/net/ethernet/davicom/dm9051.c:930:84: note: format string is def= ined here 930 | netif_err(db, drv, ndev, "%s: error %d bulk writ= ing reg %02x, len %d\n", | = ~^ | = | | = int | = %ld vim +930 drivers/net/ethernet/davicom/dm9051.c 918 = 919 static void dm9051_rxctl_delay(struct work_struct *work) 920 { 921 struct board_info *db =3D container_of(work, struct board_info, rxc= trl_work); 922 struct net_device *ndev =3D db->ndev; 923 int result; 924 = 925 mutex_lock(&db->spi_lockm); 926 = 927 result =3D regmap_bulk_write(db->regmap_dmbulk, DM9051_PAR, ndev->d= ev_addr, 928 sizeof(ndev->dev_addr)); 929 if (result < 0) { > 930 netif_err(db, drv, ndev, "%s: error %d bulk writing reg %02x, len = %d\n", 931 __func__, result, DM9051_PAR, sizeof(ndev->dev_addr)); 932 goto out_unlock; 933 } 934 = 935 dm9051_set_recv(db); 936 = 937 /* To has mutex unlock and return from this function if regmap func= tion fail 938 */ 939 out_unlock: 940 mutex_unlock(&db->spi_lockm); 941 } 942 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============7246617124066078232==--