linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Lizhi Hou <lizhi.hou@xilinx.com>, linux-kernel@vger.kernel.org
Cc: kbuild-all@lists.01.org, Lizhi Hou <lizhi.hou@xilinx.com>,
	linux-fpga@vger.kernel.org, maxz@xilinx.com,
	sonal.santan@xilinx.com, yliu@xilinx.com,
	michal.simek@xilinx.com, stefanos@xilinx.com,
	devicetree@vger.kernel.org, trix@redhat.com
Subject: Re: [PATCH V5 XRT Alveo 20/20] fpga: xrt: Kconfig and Makefile updates for XRT drivers
Date: Wed, 28 Apr 2021 07:53:08 +0800	[thread overview]
Message-ID: <202104280727.NniRBYlM-lkp@intel.com> (raw)
In-Reply-To: <20210427205431.23896-21-lizhi.hou@xilinx.com>

[-- Attachment #1: Type: text/plain, Size: 5774 bytes --]

Hi Lizhi,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linux/master]
[also build test WARNING on linus/master v5.12 next-20210427]
[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/Lizhi-Hou/XRT-Alveo-driver-overview/20210428-050424
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 1fe5501ba1abf2b7e78295df73675423bd6899a0
config: mips-allyesconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 9.3.0
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/0day-ci/linux/commit/079fb263b22e0d961ac204b3928bdff5d8ebf3d5
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Lizhi-Hou/XRT-Alveo-driver-overview/20210428-050424
        git checkout 079fb263b22e0d961ac204b3928bdff5d8ebf3d5
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=mips 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from include/linux/printk.h:409,
                    from include/linux/kernel.h:16,
                    from include/linux/list.h:9,
                    from include/linux/preempt.h:11,
                    from include/linux/spinlock.h:51,
                    from include/linux/vmalloc.h:5,
                    from drivers/fpga/xrt/lib/subdev.c:9:
   drivers/fpga/xrt/lib/subdev.c: In function 'metadata_output':
>> drivers/fpga/xrt/lib/subdev.c:120:16: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
     120 |   dev_dbg(dev, "count (%ld) beyond left bytes: %lld\n", count, size - off);
         |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:129:15: note: in definition of macro '__dynamic_func_call'
     129 |   func(&id, ##__VA_ARGS__);  \
         |               ^~~~~~~~~~~
   include/linux/dynamic_debug.h:161:2: note: in expansion of macro '_dynamic_func_call'
     161 |  _dynamic_func_call(fmt,__dynamic_dev_dbg,   \
         |  ^~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:123:2: note: in expansion of macro 'dynamic_dev_dbg'
     123 |  dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |  ^~~~~~~~~~~~~~~
   include/linux/dev_printk.h:123:23: note: in expansion of macro 'dev_fmt'
     123 |  dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                       ^~~~~~~
   drivers/fpga/xrt/lib/subdev.c:120:3: note: in expansion of macro 'dev_dbg'
     120 |   dev_dbg(dev, "count (%ld) beyond left bytes: %lld\n", count, size - off);
         |   ^~~~~~~
   drivers/fpga/xrt/lib/subdev.c:120:26: note: format string is defined here
     120 |   dev_dbg(dev, "count (%ld) beyond left bytes: %lld\n", count, size - off);
         |                        ~~^
         |                          |
         |                          long int
         |                        %d


vim +120 drivers/fpga/xrt/lib/subdev.c

390cff2f7a6222 Lizhi Hou 2021-04-27   96  
390cff2f7a6222 Lizhi Hou 2021-04-27   97  static ssize_t metadata_output(struct file *filp, struct kobject *kobj,
390cff2f7a6222 Lizhi Hou 2021-04-27   98  			       struct bin_attribute *attr, char *buf, loff_t off, size_t count)
390cff2f7a6222 Lizhi Hou 2021-04-27   99  {
390cff2f7a6222 Lizhi Hou 2021-04-27  100  	struct device *dev = kobj_to_dev(kobj);
390cff2f7a6222 Lizhi Hou 2021-04-27  101  	struct xrt_device *xdev = to_xrt_dev(dev);
390cff2f7a6222 Lizhi Hou 2021-04-27  102  	struct xrt_subdev_platdata *pdata = DEV_PDATA(xdev);
390cff2f7a6222 Lizhi Hou 2021-04-27  103  	unsigned char *blob;
390cff2f7a6222 Lizhi Hou 2021-04-27  104  	unsigned long  size;
390cff2f7a6222 Lizhi Hou 2021-04-27  105  	ssize_t ret = 0;
390cff2f7a6222 Lizhi Hou 2021-04-27  106  
390cff2f7a6222 Lizhi Hou 2021-04-27  107  	blob = pdata->xsp_dtb;
390cff2f7a6222 Lizhi Hou 2021-04-27  108  	size = xrt_md_size(dev, blob);
390cff2f7a6222 Lizhi Hou 2021-04-27  109  	if (size == XRT_MD_INVALID_LENGTH) {
390cff2f7a6222 Lizhi Hou 2021-04-27  110  		ret = -EINVAL;
390cff2f7a6222 Lizhi Hou 2021-04-27  111  		goto failed;
390cff2f7a6222 Lizhi Hou 2021-04-27  112  	}
390cff2f7a6222 Lizhi Hou 2021-04-27  113  
390cff2f7a6222 Lizhi Hou 2021-04-27  114  	if (off >= size) {
390cff2f7a6222 Lizhi Hou 2021-04-27  115  		dev_dbg(dev, "offset (%lld) beyond total size: %ld\n", off, size);
390cff2f7a6222 Lizhi Hou 2021-04-27  116  		goto failed;
390cff2f7a6222 Lizhi Hou 2021-04-27  117  	}
390cff2f7a6222 Lizhi Hou 2021-04-27  118  
390cff2f7a6222 Lizhi Hou 2021-04-27  119  	if (off + count > size) {
390cff2f7a6222 Lizhi Hou 2021-04-27 @120  		dev_dbg(dev, "count (%ld) beyond left bytes: %lld\n", count, size - off);
390cff2f7a6222 Lizhi Hou 2021-04-27  121  		count = size - off;
390cff2f7a6222 Lizhi Hou 2021-04-27  122  	}
390cff2f7a6222 Lizhi Hou 2021-04-27  123  	memcpy(buf, blob + off, count);
390cff2f7a6222 Lizhi Hou 2021-04-27  124  
390cff2f7a6222 Lizhi Hou 2021-04-27  125  	ret = count;
390cff2f7a6222 Lizhi Hou 2021-04-27  126  failed:
390cff2f7a6222 Lizhi Hou 2021-04-27  127  	return ret;
390cff2f7a6222 Lizhi Hou 2021-04-27  128  }
390cff2f7a6222 Lizhi Hou 2021-04-27  129  

---
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: 70262 bytes --]

  reply	other threads:[~2021-04-27 23:53 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-27 20:54 [PATCH V5 XRT Alveo 00/20] XRT Alveo driver overview Lizhi Hou
2021-04-27 20:54 ` [PATCH V5 XRT Alveo 01/20] Documentation: fpga: Add a document describing XRT Alveo drivers Lizhi Hou
2021-04-28 19:40   ` Tom Rix
2021-05-03 23:00   ` Moritz Fischer
2021-04-27 20:54 ` [PATCH V5 XRT Alveo 02/20] fpga: xrt: driver metadata helper functions Lizhi Hou
2021-05-01 20:19   ` Tom Rix
2021-04-27 20:54 ` [PATCH V5 XRT Alveo 03/20] fpga: xrt: xclbin file " Lizhi Hou
2021-05-03 13:00   ` Tom Rix
2021-05-03 23:19   ` Moritz Fischer
2021-05-05 17:21     ` Lizhi Hou
2021-04-27 20:54 ` [PATCH V5 XRT Alveo 04/20] fpga: xrt: xrt-lib driver manager Lizhi Hou
2021-05-03 13:06   ` Tom Rix
2021-05-03 21:51     ` Lizhi Hou
2021-04-27 20:54 ` [PATCH V5 XRT Alveo 05/20] fpga: xrt: group driver Lizhi Hou
2021-05-03 13:10   ` Tom Rix
2021-04-27 20:54 ` [PATCH V5 XRT Alveo 06/20] fpga: xrt: char dev node helper functions Lizhi Hou
2021-05-03 13:27   ` Tom Rix
2021-04-27 20:54 ` [PATCH V5 XRT Alveo 07/20] fpga: xrt: root driver infrastructure Lizhi Hou
2021-05-03 13:37   ` Tom Rix
2021-04-27 20:54 ` [PATCH V5 XRT Alveo 08/20] fpga: xrt: " Lizhi Hou
2021-05-03 13:46   ` Tom Rix
2021-04-27 20:54 ` [PATCH V5 XRT Alveo 09/20] fpga: xrt: management physical function driver (root) Lizhi Hou
2021-05-03 13:49   ` Tom Rix
2021-04-27 20:54 ` [PATCH V5 XRT Alveo 10/20] fpga: xrt: main driver for management function device Lizhi Hou
2021-05-04 13:50   ` Tom Rix
2021-04-27 20:54 ` [PATCH V5 XRT Alveo 11/20] fpga: xrt: fpga-mgr and region implementation for xclbin download Lizhi Hou
2021-05-04 13:56   ` Tom Rix
2021-04-27 20:54 ` [PATCH V5 XRT Alveo 12/20] fpga: xrt: VSEC driver Lizhi Hou
2021-05-04 14:00   ` Tom Rix
2021-04-27 20:54 ` [PATCH V5 XRT Alveo 13/20] fpga: xrt: User Clock Subsystem driver Lizhi Hou
2021-05-04 14:03   ` Tom Rix
2021-04-27 20:54 ` [PATCH V5 XRT Alveo 14/20] fpga: xrt: ICAP driver Lizhi Hou
2021-05-04 14:05   ` Tom Rix
2021-04-27 20:54 ` [PATCH V5 XRT Alveo 15/20] fpga: xrt: devctl xrt driver Lizhi Hou
2021-05-04 14:07   ` Tom Rix
2021-04-27 20:54 ` [PATCH V5 XRT Alveo 16/20] fpga: xrt: clock driver Lizhi Hou
2021-05-04 14:08   ` Tom Rix
2021-04-27 20:54 ` [PATCH V5 XRT Alveo 17/20] fpga: xrt: clock frequency counter driver Lizhi Hou
2021-05-04 14:10   ` Tom Rix
2021-04-27 20:54 ` [PATCH V5 XRT Alveo 18/20] fpga: xrt: DDR calibration driver Lizhi Hou
2021-05-04 14:11   ` Tom Rix
2021-04-27 20:54 ` [PATCH V5 XRT Alveo 19/20] fpga: xrt: partition isolation driver Lizhi Hou
2021-05-04 14:13   ` Tom Rix
2021-04-27 20:54 ` [PATCH V5 XRT Alveo 20/20] fpga: xrt: Kconfig and Makefile updates for XRT drivers Lizhi Hou
2021-04-27 23:53   ` kernel test robot [this message]
2021-04-28  3:12   ` kernel test robot
2021-04-28  3:12   ` [RFC PATCH] fpga: xrt: xmgnt_bridge_ops can be static kernel test robot
2021-05-04 14:18   ` [PATCH V5 XRT Alveo 20/20] fpga: xrt: Kconfig and Makefile updates for XRT drivers Tom Rix
2021-04-28 17:36 ` [PATCH V5 XRT Alveo 00/20] XRT Alveo driver overview Tom Rix

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=202104280727.NniRBYlM-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-fpga@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizhi.hou@xilinx.com \
    --cc=maxz@xilinx.com \
    --cc=michal.simek@xilinx.com \
    --cc=sonal.santan@xilinx.com \
    --cc=stefanos@xilinx.com \
    --cc=trix@redhat.com \
    --cc=yliu@xilinx.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).