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 1/4] fw_cfg: add DMA register
Date: Fri, 22 Sep 2017 19:05:58 +0800	[thread overview]
Message-ID: <201709221938.Nj0td5hh%fengguang.wu@intel.com> (raw)
In-Reply-To: <20170919115814.14724-2-marcandre.lureau@redhat.com>

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

Hi Marc-André,

[auto build test ERROR on linus/master]
[also build test ERROR 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-x009-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 errors (new ones prefixed by >>):

   drivers/firmware/qemu_fw_cfg.c: In function 'fw_cfg_cmdline_set':
>> drivers/firmware/qemu_fw_cfg.c:690:43: error: 'process' undeclared (first use in this function)
         (processed != 1 && processed != 3 && process != 4))
                                              ^~~~~~~
   drivers/firmware/qemu_fw_cfg.c:690:43: note: each undeclared identifier is reported only once for each function it appears in

vim +/process +690 drivers/firmware/qemu_fw_cfg.c

   639	
   640	/* use special scanf/printf modifier for phys_addr_t, resource_size_t */
   641	#define PH_ADDR_SCAN_FMT "@%" __PHYS_ADDR_PREFIX "i%n" \
   642				 ":%" __PHYS_ADDR_PREFIX "i" \
   643				 ":%" __PHYS_ADDR_PREFIX "i%n" \
   644				 ":%" __PHYS_ADDR_PREFIX "i%n"
   645	
   646	#define PH_ADDR_PR_1_FMT "0x%" __PHYS_ADDR_PREFIX "x@" \
   647				 "0x%" __PHYS_ADDR_PREFIX "x"
   648	
   649	#define PH_ADDR_PR_3_FMT PH_ADDR_PR_1_FMT \
   650				 ":%" __PHYS_ADDR_PREFIX "u" \
   651				 ":%" __PHYS_ADDR_PREFIX "u"
   652	
   653	#define PH_ADDR_PR_4_FMT PH_ADDR_PR_3_FMT \
   654				 ":%" __PHYS_ADDR_PREFIX "u"
   655	
   656	static int fw_cfg_cmdline_set(const char *arg, const struct kernel_param *kp)
   657	{
   658		struct resource res[4] = {};
   659		char *str;
   660		phys_addr_t base;
   661		resource_size_t size, ctrl_off, data_off, dma_off;
   662		int processed, consumed = 0;
   663	
   664		/* only one fw_cfg device can exist system-wide, so if one
   665		 * was processed on the command line already, we might as
   666		 * well stop here.
   667		 */
   668		if (fw_cfg_cmdline_dev) {
   669			/* avoid leaking previously registered device */
   670			platform_device_unregister(fw_cfg_cmdline_dev);
   671			return -EINVAL;
   672		}
   673	
   674		/* consume "<size>" portion of command line argument */
   675		size = memparse(arg, &str);
   676	
   677		/* get "@<base>[:<ctrl_off>:<data_off>[:<dma_off>]]" chunks */
   678		processed = sscanf(str, PH_ADDR_SCAN_FMT,
   679				   &base, &consumed,
   680				   &ctrl_off, &data_off, &consumed,
   681				   &dma_off, &consumed);
   682	
   683		/* sscanf() must process precisely 1, 3 or 4 chunks:
   684		 * <base> is mandatory, optionally followed by <ctrl_off>
   685		 * and <data_off>, and <dma_off>;
   686		 * there must be no extra characters after the last chunk,
   687		 * so str[consumed] must be '\0'.
   688		 */
   689		if (str[consumed] ||
 > 690		    (processed != 1 && processed != 3 && process != 4))
   691			return -EINVAL;
   692	
   693		res[0].start = base;
   694		res[0].end = base + size - 1;
   695		res[0].flags = !strcmp(kp->name, "mmio") ? IORESOURCE_MEM :
   696							   IORESOURCE_IO;
   697	
   698		/* insert register offsets, if provided */
   699		if (processed > 1) {
   700			res[1].name = "ctrl";
   701			res[1].start = ctrl_off;
   702			res[1].flags = IORESOURCE_REG;
   703			res[2].name = "data";
   704			res[2].start = data_off;
   705			res[2].flags = IORESOURCE_REG;
   706		}
   707		if (processed > 3) {
   708			res[3].name = "dma";
   709			res[3].start = dma_off;
   710			res[3].flags = IORESOURCE_REG;
   711		}
   712	
   713		/* "processed" happens to nicely match the number of resources
   714		 * we need to pass in to this platform device.
   715		 */
   716		fw_cfg_cmdline_dev = platform_device_register_simple("fw_cfg",
   717						PLATFORM_DEVID_NONE, res, processed);
   718		if (IS_ERR(fw_cfg_cmdline_dev))
   719			return PTR_ERR(fw_cfg_cmdline_dev);
   720	
   721		return 0;
   722	}
   723	

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

  reply	other threads:[~2017-09-22 11:06 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 [this message]
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
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=201709221938.Nj0td5hh%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®