mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: marcandre.lureau@redhat.com
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org, somlo@cmu.edu,
	qemu-devel@nongnu.org, mst@redhat.com,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: Re: [PATCH v2 2/4] fw_cfg: do DMA read operation
Date: Fri, 22 Sep 2017 19:25:15 +0800	[thread overview]
Message-ID: <201709221915.92rrS1kM%fengguang.wu@intel.com> (raw)
In-Reply-To: <20170919115814.14724-3-marcandre.lureau@redhat.com>

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

Hi Marc-André,

[auto build test WARNING on linus/master]
[also build test WARNING on v4.14-rc1 next-20170922]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/marcandre-lureau-redhat-com/fw_cfg-add-DMA-operations-etc-vmcoreinfo-support/20170922-182716
config: i386-randconfig-x000-201738 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   drivers//firmware/qemu_fw_cfg.c: In function 'fw_cfg_dma_transfer':
>> drivers//firmware/qemu_fw_cfg.c:139:18: warning: right shift count >= width of type [-Wshift-count-overflow]
     iowrite32be(dma >> 32, fw_cfg_reg_dma);
                     ^~
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/list.h:4,
                    from include/linux/module.h:9,
                    from drivers//firmware/qemu_fw_cfg.c:30:
   drivers//firmware/qemu_fw_cfg.c: At top level:
   include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'strcpy' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:421:2: note: in expansion of macro 'if'
     if (p_size == (size_t)-1 && q_size == (size_t)-1)
     ^~
   include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'kmemdup' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:411:2: note: in expansion of macro 'if'
     if (p_size < size)
     ^~
   include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'kmemdup' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:409:2: note: in expansion of macro 'if'
     if (__builtin_constant_p(size) && p_size < size)
     ^~
   include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memchr_inv' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:400:2: note: in expansion of macro 'if'
     if (p_size < size)
     ^~
   include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memchr_inv' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:398:2: note: in expansion of macro 'if'
     if (__builtin_constant_p(size) && p_size < size)
     ^~
   include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memchr' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:389:2: note: in expansion of macro 'if'
     if (p_size < size)
     ^~
   include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memchr' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:387:2: note: in expansion of macro 'if'
     if (__builtin_constant_p(size) && p_size < size)
     ^~
   include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memcmp' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:379:2: note: in expansion of macro 'if'
     if (p_size < size || q_size < size)
     ^~
   include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memcmp' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:376:3: note: in expansion of macro 'if'
      if (q_size < size)
      ^~
   include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memcmp' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:374:3: note: in expansion of macro 'if'
      if (p_size < size)

vim +139 drivers//firmware/qemu_fw_cfg.c

   102	
   103	static ssize_t fw_cfg_dma_transfer(void *address, u32 length, u32 control)
   104	{
   105		dma_addr_t dma_addr = 0;
   106		struct fw_cfg_dma *d;
   107		dma_addr_t dma;
   108		ssize_t ret = length;
   109		enum dma_data_direction dir =
   110			(control & FW_CFG_DMA_CTL_READ ? DMA_FROM_DEVICE : 0);
   111	
   112		if (address && length) {
   113			dma_addr = dma_map_single(dev, address, length, dir);
   114			if (dma_mapping_error(NULL, dma_addr)) {
   115				WARN(1, "%s: failed to map address\n", __func__);
   116				return -EFAULT;
   117			}
   118		}
   119	
   120		d = kmalloc(sizeof(*d), GFP_KERNEL | GFP_DMA);
   121		if (!d) {
   122			ret = -ENOMEM;
   123			goto end;
   124		}
   125	
   126		dma = dma_map_single(dev, d, sizeof(*d), DMA_BIDIRECTIONAL);
   127		if (dma_mapping_error(NULL, dma)) {
   128			WARN(1, "%s: failed to map fw_cfg_dma\n", __func__);
   129			ret = -EFAULT;
   130			goto end;
   131		}
   132	
   133		*d = (struct fw_cfg_dma) {
   134			.address = cpu_to_be64(dma_addr),
   135			.length = cpu_to_be32(length),
   136			.control = cpu_to_be32(control)
   137		};
   138	
 > 139		iowrite32be(dma >> 32, fw_cfg_reg_dma);
   140		iowrite32be(dma, fw_cfg_reg_dma + 4);
   141		while (be32_to_cpu(d->control) & ~FW_CFG_DMA_CTL_ERROR)
   142			yield(); /* FIXME: wait_event? */
   143	
   144		if (be32_to_cpu(d->control) & FW_CFG_DMA_CTL_ERROR)
   145			ret = -EIO;
   146	
   147		dma_unmap_single(dev, dma, sizeof(*d), DMA_BIDIRECTIONAL);
   148	
   149	end:
   150		kfree(d);
   151		if (dma_addr)
   152			dma_unmap_single(dev, dma_addr, length, dir);
   153	
   154		return ret;
   155	}
   156	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29438 bytes --]

  reply	other threads:[~2017-09-22 11:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-19 11:58 [PATCH v2 0/4] fw_cfg: add DMA operations & etc/vmcoreinfo support marcandre.lureau
2017-09-19 11:58 ` [PATCH v2 1/4] fw_cfg: add DMA register marcandre.lureau
2017-09-22 11:05   ` kbuild test robot
2017-09-22 11:45   ` kbuild test robot
2017-09-19 11:58 ` [PATCH v2 2/4] fw_cfg: do DMA read operation marcandre.lureau
2017-09-22 11:25   ` kbuild test robot [this message]
2017-09-19 11:58 ` [PATCH v2 3/4] fw_cfg: write vmcoreinfo details marcandre.lureau
2017-09-22 18:01   ` kbuild test robot
2017-09-22 20:38   ` kbuild test robot
2017-09-19 11:58 ` [PATCH v2 4/4] RFC: fw_cfg: add DMA write operation in sysfs marcandre.lureau

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=201709221915.92rrS1kM%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcandre.lureau@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=somlo@cmu.edu \
    /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

all inboxes | Powered by JetHome®