From: kbuild test robot <fengguang.wu@intel.com>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: netdev@vger.kernel.org, "Michael S. Tsirkin" <mst@redhat.com>,
kbuild-all@01.org, kvm@vger.kernel.org,
virtualization@lists.linux-foundation.org
Subject: [vhost:vhost 24/24] drivers/firmware/qemu_fw_cfg.c:499:22: error: storage size of 'files' isn't known
Date: Thu, 15 Feb 2018 04:27:33 +0800 [thread overview]
Message-ID: <201802150430.8hqex8Tw%fengguang.wu@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1905 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost
head: 5d457fe6aeaab9d0a1665eafc8af7139bc6b6f2e
commit: 5d457fe6aeaab9d0a1665eafc8af7139bc6b6f2e [24/24] fw_cfg: fix sparse warnings around FW_CFG_FILE_DIR read
config: i386-randconfig-x015-201806 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
git checkout 5d457fe6aeaab9d0a1665eafc8af7139bc6b6f2e
# 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_register_dir_entries':
>> drivers/firmware/qemu_fw_cfg.c:499:22: error: storage size of 'files' isn't known
struct fw_cfg_files files;
^~~~~
drivers/firmware/qemu_fw_cfg.c:499:22: warning: unused variable 'files' [-Wunused-variable]
vim +499 drivers/firmware/qemu_fw_cfg.c
493
494 /* iterate over all fw_cfg directory entries, registering each one */
495 static int fw_cfg_register_dir_entries(void)
496 {
497 int ret = 0;
498 u32 count, i;
> 499 struct fw_cfg_files files;
500 struct fw_cfg_file *dir;
501 size_t dir_size;
502
503 fw_cfg_read_blob(FW_CFG_FILE_DIR, &files.count, 0, sizeof(files.count));
504 count = be32_to_cpu(files.count);
505 dir_size = count * sizeof(struct fw_cfg_file);
506
507 dir = kmalloc(dir_size, GFP_KERNEL);
508 if (!dir)
509 return -ENOMEM;
510
511 fw_cfg_read_blob(FW_CFG_FILE_DIR, dir, sizeof(files.count), dir_size);
512
513 for (i = 0; i < count; i++) {
514 ret = fw_cfg_register_file(&dir[i]);
515 if (ret)
516 break;
517 }
518
519 kfree(dir);
520 return ret;
521 }
522
---
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: 32274 bytes --]
[-- Attachment #3: Type: text/plain, Size: 183 bytes --]
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
next reply other threads:[~2018-02-14 20:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-14 20:27 kbuild test robot [this message]
[not found] ` <CAMxuvawhzjNA8gQSCpVtff-A6-Umg6fPz37nPhqRrDiRwKqUCQ@mail.gmail.com>
2018-02-15 18:26 ` [vhost:vhost 24/24] drivers/firmware/qemu_fw_cfg.c:499:22: error: storage size of 'files' isn't known Michael S. Tsirkin
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=201802150430.8hqex8Tw%fengguang.wu@intel.com \
--to=fengguang.wu@intel.com \
--cc=kbuild-all@01.org \
--cc=kvm@vger.kernel.org \
--cc=marcandre.lureau@redhat.com \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.org \
/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).