mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: "Gabriel L. Somlo" <somlo@cmu.edu>
Cc: kbuild-all@01.org, gregkh@linuxfoundation.org, paul@pwsan.com,
	galak@codeaurora.org, will.deacon@arm.com, agross@codeaurora.org,
	mark.rutland@arm.com, zajec5@gmail.com, hanjun.guo@linaro.org,
	catalin.marinas@arm.com, linux-api@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernelnewbies@kernelnewbies.org,
	matt.fleming@intel.com, lersek@redhat.com,
	jordan.l.justen@intel.com, mst@redhat.com,
	peter.maydell@linaro.org, leif.lindholm@linaro.org,
	ard.biesheuvel@linaro.org, pbonzini@redhat.com,
	kraxel@redhat.com, qemu-devel@nongnu.org
Subject: Re: [PATCH v3 1/4] firmware: introduce sysfs driver for QEMU's fw_cfg device
Date: Sun, 4 Oct 2015 09:34:12 +0800	[thread overview]
Message-ID: <201510040936.gYi4Ld9m%fengguang.wu@intel.com> (raw)
In-Reply-To: <1443914889-9619-2-git-send-email-somlo@cmu.edu>

Hi Gabriel,

[auto build test results on v4.3-rc3 -- if it's inappropriate base, please ignore]

reproduce:
        # apt-get install sparse
        make ARCH=x86_64 allmodconfig
        make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

   drivers/firmware/qemu_fw_cfg.c:66:25: sparse: constant 0xd00000510 is so big it is long
>> drivers/firmware/qemu_fw_cfg.c:95:39: sparse: restricted __be16 degrades to integer
>> drivers/firmware/qemu_fw_cfg.c:95:58: sparse: restricted __le16 degrades to integer
>> drivers/firmware/qemu_fw_cfg.c:111:25: sparse: cast to restricted __be32
>> drivers/firmware/qemu_fw_cfg.c:111:25: sparse: cast to restricted __be32
>> drivers/firmware/qemu_fw_cfg.c:111:25: sparse: cast to restricted __be32
>> drivers/firmware/qemu_fw_cfg.c:111:25: sparse: cast to restricted __be32
>> drivers/firmware/qemu_fw_cfg.c:111:25: sparse: cast to restricted __be32
>> drivers/firmware/qemu_fw_cfg.c:111:25: sparse: cast to restricted __be32
>> drivers/firmware/qemu_fw_cfg.c:95:39: sparse: restricted __be16 degrades to integer
>> drivers/firmware/qemu_fw_cfg.c:95:58: sparse: restricted __le16 degrades to integer
>> drivers/firmware/qemu_fw_cfg.c:95:39: sparse: restricted __be16 degrades to integer
>> drivers/firmware/qemu_fw_cfg.c:95:58: sparse: restricted __le16 degrades to integer
   drivers/firmware/qemu_fw_cfg.c:367:25: sparse: cast to restricted __be32
   drivers/firmware/qemu_fw_cfg.c:367:25: sparse: cast to restricted __be32
   drivers/firmware/qemu_fw_cfg.c:367:25: sparse: cast to restricted __be32
   drivers/firmware/qemu_fw_cfg.c:367:25: sparse: cast to restricted __be32
   drivers/firmware/qemu_fw_cfg.c:367:25: sparse: cast to restricted __be32
   drivers/firmware/qemu_fw_cfg.c:367:25: sparse: cast to restricted __be32
>> drivers/firmware/qemu_fw_cfg.c:368:27: sparse: cast to restricted __be16
>> drivers/firmware/qemu_fw_cfg.c:368:27: sparse: cast to restricted __be16
>> drivers/firmware/qemu_fw_cfg.c:368:27: sparse: cast to restricted __be16
>> drivers/firmware/qemu_fw_cfg.c:368:27: sparse: cast to restricted __be16
>> drivers/firmware/qemu_fw_cfg.c:95:39: sparse: restricted __be16 degrades to integer
>> drivers/firmware/qemu_fw_cfg.c:95:58: sparse: restricted __le16 degrades to integer
>> drivers/firmware/qemu_fw_cfg.c:420:22: sparse: cast to restricted __le32

vim +95 drivers/firmware/qemu_fw_cfg.c

    60			.size = 0x0a,
    61			.ctrl_offset = 0x08,
    62			.data_offset = 0x00,
    63			.is_mmio = true,
    64		}, {
    65			.name = "fw_cfg MMIO on sun4m",
  > 66			.base = 0xd00000510,
    67			.size = 0x03,
    68			.ctrl_offset = 0x00,
    69			.data_offset = 0x02,
    70			.is_mmio = true,
    71		}, {
    72			.name = "fw_cfg MMIO on ppc/mac",
    73			.base = 0xf0000510,
    74			.size = 0x03,
    75			.ctrl_offset = 0x00,
    76			.data_offset = 0x02,
    77			.is_mmio = true,
    78		}, { } /* END */
    79	};
    80	
    81	/* fw_cfg device i/o currently selected option set */
    82	static struct fw_cfg_access *fw_cfg_mode;
    83	
    84	/* fw_cfg device i/o register addresses */
    85	static void __iomem *fw_cfg_dev_base;
    86	static void __iomem *fw_cfg_reg_ctrl;
    87	static void __iomem *fw_cfg_reg_data;
    88	
    89	/* atomic access to fw_cfg device (potentially slow i/o, so using mutex) */
    90	static DEFINE_MUTEX(fw_cfg_dev_lock);
    91	
    92	/* pick appropriate endianness for selector key */
    93	static inline u16 fw_cfg_sel_endianness(u16 key)
    94	{
  > 95		return fw_cfg_mode->is_mmio ? cpu_to_be16(key) : cpu_to_le16(key);
    96	}
    97	
    98	/* type for fw_cfg "directory scan" visitor/callback function */
    99	typedef int (*fw_cfg_file_callback)(const struct fw_cfg_file *f);
   100	
   101	/* run a given callback on each fw_cfg directory entry */
   102	static int fw_cfg_scan_dir(fw_cfg_file_callback callback)
   103	{
   104		int ret = 0;
   105		u32 count, i;
   106		struct fw_cfg_file f;
   107	
   108		mutex_lock(&fw_cfg_dev_lock);
   109		iowrite16(fw_cfg_sel_endianness(FW_CFG_FILE_DIR), fw_cfg_reg_ctrl);
   110		ioread8_rep(fw_cfg_reg_data, &count, sizeof(count));
 > 111		for (i = 0; i < be32_to_cpu(count); i++) {
   112			ioread8_rep(fw_cfg_reg_data, &f, sizeof(f));
   113			ret = callback(&f);
   114			if (ret)

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

  reply	other threads:[~2015-10-04  1:35 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-03 23:28 [PATCH v3 0/4] SysFS driver for QEMU " Gabriel L. Somlo
2015-10-03 23:28 ` [PATCH v3 1/4] firmware: introduce sysfs driver for QEMU's " Gabriel L. Somlo
2015-10-04  1:34   ` kbuild test robot [this message]
2015-10-06  8:40   ` [Qemu-devel] " Stefan Hajnoczi
2015-10-06 12:53   ` Laszlo Ersek
2015-10-06 17:54   ` Andy Lutomirski
2015-10-06 18:17     ` Gabriel L. Somlo
2015-10-03 23:28 ` [PATCH v3 2/4] firmware: use acpi to detect QEMU fw_cfg device for sysfs fw_cfg driver Gabriel L. Somlo
2015-10-04  7:54   ` Michael S. Tsirkin
2015-10-04 20:24     ` Gabriel L. Somlo
2015-10-04 20:27       ` Gabriel L. Somlo
2015-10-03 23:28 ` [PATCH v3 3/4] kobject: export kset_find_obj() for module use Gabriel L. Somlo
2015-10-03 23:28 ` [PATCH v3 4/4] firmware: create directory hierarchy for sysfs fw_cfg entries Gabriel L. Somlo
2015-10-05 10:00 ` [PATCH v3 0/4] SysFS driver for QEMU fw_cfg device Mark Rutland
2015-10-05 11:48   ` Paolo Bonzini
2015-10-05 12:23     ` Mark Rutland
2015-10-05 12:43       ` Gabriel L. Somlo
2015-10-05 12:56         ` Mark Rutland
2015-10-05 13:21           ` Gabriel L. Somlo
2015-10-05 12:40   ` Gabriel L. Somlo
2015-10-05 12:50     ` Peter Maydell
2015-10-05 13:13       ` Gabriel L. Somlo
2015-10-05 13:18       ` Paolo Bonzini
2015-11-04 20:48         ` Gabriel L. Somlo
2015-10-05 13:05     ` Mark Rutland
2015-10-06  7:18       ` Laszlo Ersek

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=201510040936.gYi4Ld9m%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=agross@codeaurora.org \
    --cc=ard.biesheuvel@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=galak@codeaurora.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hanjun.guo@linaro.org \
    --cc=jordan.l.justen@intel.com \
    --cc=kbuild-all@01.org \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=kraxel@redhat.com \
    --cc=leif.lindholm@linaro.org \
    --cc=lersek@redhat.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=matt.fleming@intel.com \
    --cc=mst@redhat.com \
    --cc=paul@pwsan.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=somlo@cmu.edu \
    --cc=will.deacon@arm.com \
    --cc=zajec5@gmail.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

all inboxes | Powered by JetHome®