- includes cleanup

- reduce .data footprint
 - fix warnings reported by Clang static code analyzer
 - fix dp8393x part lost in merge
 - update git.orderfile and rules.mak
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEEzS913cjjpNwuT1Fz8ww4vT8vvjwFAl5mW8MSHGxhdXJlbnRA
 dml2aWVyLmV1AAoJEPMMOL0/L748Gp4QAK9x4I03QjC2VXj4EM2/LYJlKDx5aOHV
 bvb5WLAEIABNIhsdQQtHiZ3Ytdj3sQFjh3gbjiRQNq6IC/zbKTYmsJPLLJcifUkR
 4cUtmf33B5FT/SnMDzvom759kn6+6w+ErA9W1daSdSidYwKWIUbFj2WdzIUnHhc8
 PaL1FV/4lME37wrggb1/CVn7pQzC89RSrz5HLYf/XekfN2LGEnhOxrMpfNdaHPeb
 8W6aOXqRe27sE+WyqMOQLtg+VM27FfjIT0fsQsKttBN7fWZ0Uxxqwuur2kSrJ2Ye
 D3MpysAK6d8IxCba+u6as7NYkV7EwC1onI29aK9RHLqixb4WPEqPHvDaE3rRrCOO
 42TlM5ywTTOzVJUOTXq60DFqUP6MnOtpBAyN7H3MXPPpI/7j8WoiamLgWCMA7b1B
 4V5oCLAU8R0XKgMagzXEw46M38eL1ZOz9eZR3ZThMQR8qG56wlD3Y9xdoYIvlFok
 lDl0npmbSh1SkN3qNYj5+UlNSAUeannMDfDu4GpjjPS+IcHNlUD0y29ybohPZxD5
 hN+uMgywoNkoPNyBsOSv5Moq96GNefnTzbhg+d+chGfcimuaGfYgO9MrRoBsj/zY
 XJWfbWpsSDgnlpT3hjHCwsWiPU9CA2SfcxApFy+Ag/+Y2pFnClnkRVjeLScXGwrd
 U1mADoRqcHMz
 =uJfn
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/vivier2/tags/trivial-branch-pull-request' into staging

- includes cleanup
- reduce .data footprint
- fix warnings reported by Clang static code analyzer
- fix dp8393x part lost in merge
- update git.orderfile and rules.mak

# gpg: Signature made Mon 09 Mar 2020 15:07:47 GMT
# gpg:                using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
# gpg:                issuer "laurent@vivier.eu"
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full]
# gpg:                 aka "Laurent Vivier <laurent@vivier.eu>" [full]
# gpg:                 aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full]
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C

* remotes/vivier2/tags/trivial-branch-pull-request: (33 commits)
  monitor/hmp-cmds: Remove redundant statement in hmp_rocker_of_dpa_groups()
  display/exynos4210_fimd: Remove redundant statement in exynos4210_fimd_update()
  display/pxa2xx_lcd: Remove redundant statement in pxa2xx_palette_parse()
  scsi/scsi-disk: Remove redundant statement in scsi_disk_emulate_command()
  dma/xlnx-zdma: Remove redundant statement in zdma_write_dst()
  block/file-posix: Remove redundant statement in raw_handle_perm_lock()
  block/stream: Remove redundant statement in stream_run()
  core/qdev: fix memleak in qdev_get_gpio_out_connector()
  hw/i386/pc: Clean up includes
  hw/pci-host/q35: Remove unused includes
  hw/i386: Include "hw/mem/nvdimm.h"
  hw/acpi: Include "hw/mem/nvdimm.h"
  hw/pci-host/piix: Include "qemu/range.h"
  hw/i2c/smbus_ich9: Include "qemu/range.h"
  hw/pci-host/q35: Include "qemu/range.h"
  hw/timer/hpet: Include "exec/address-spaces.h"
  hw/acpi/cpu_hotplug: Include "hw/pci/pci.h"
  hw/hppa/machine: Include "net/net.h"
  hw/alpha/dp264: Include "net/net.h"
  hw/alpha/alpha_sys: Remove unused "hw/ide.h" header
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2020-03-09 15:35:58 +00:00
commit 06db86c8e7
39 changed files with 43 additions and 55 deletions

View File

@ -15,9 +15,6 @@ UNCHECKED_GOALS := %clean TAGS cscope ctags dist \
help check-help print-% \
docker docker-% vm-help vm-test vm-build-%
print-%:
@echo '$*=$($*)'
# All following code might depend on configuration variables
ifneq ($(wildcard config-host.mak),)
# Put the all: rule here so that config-host.mak can contain dependencies.

View File

@ -888,7 +888,6 @@ static int raw_handle_perm_lock(BlockDriverState *bs,
"Is another process using the image [%s]?\n",
bs->filename);
}
op = RAW_PL_ABORT;
/* fall through to unlock bytes. */
case RAW_PL_ABORT:
raw_apply_lock_bytes(s, s->fd, s->perm, ~s->shared_perm,

View File

@ -114,7 +114,6 @@ static int coroutine_fn stream_run(Job *job, Error **errp)
int64_t offset = 0;
uint64_t delay_ns = 0;
int error = 0;
int ret = 0;
int64_t n = 0; /* bytes */
if (bs == s->bottom) {
@ -139,6 +138,7 @@ static int coroutine_fn stream_run(Job *job, Error **errp)
for ( ; offset < len; offset += n) {
bool copy;
int ret;
/* Note that even when no rate limit is applied we need to yield
* with no pending I/O here so that bdrv_drain_all() returns.
@ -183,7 +183,6 @@ static int coroutine_fn stream_run(Job *job, Error **errp)
break;
}
}
ret = 0;
/* Publish progress */
job_progress_update(&s->common.job, n);

View File

@ -43,7 +43,7 @@
#define BTRFS_SUPER_MAGIC 0x9123683E
#endif
static struct option helper_opts[] = {
static const struct option helper_opts[] = {
{"fd", required_argument, NULL, 'f'},
{"path", required_argument, NULL, 'p'},
{"nodaemon", no_argument, NULL, 'n'},

View File

@ -14,6 +14,7 @@
#include "qapi/error.h"
#include "hw/core/cpu.h"
#include "hw/i386/pc.h"
#include "hw/pci/pci.h"
#include "qemu/error-report.h"
#define CPU_EJECT_METHOD "CPEJ"

View File

@ -27,7 +27,6 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qapi/visitor.h"
#include "hw/i386/pc.h"
#include "hw/pci/pci.h"
#include "migration/vmstate.h"
#include "qemu/timer.h"
@ -40,6 +39,7 @@
#include "hw/i386/ich9.h"
#include "hw/mem/pc-dimm.h"
#include "hw/mem/nvdimm.h"
//#define DEBUG

View File

@ -38,6 +38,7 @@
#include "hw/acpi/cpu.h"
#include "hw/hotplug.h"
#include "hw/mem/pc-dimm.h"
#include "hw/mem/nvdimm.h"
#include "hw/acpi/memory_hotplug.h"
#include "hw/acpi/acpi_dev_interface.h"
#include "hw/xen/xen.h"

View File

@ -6,7 +6,6 @@
#include "target/alpha/cpu-qom.h"
#include "hw/pci/pci.h"
#include "hw/pci/pci_host.h"
#include "hw/ide.h"
#include "hw/boards.h"
#include "hw/intc/i8259.h"

View File

@ -21,6 +21,7 @@
#include "hw/dma/i8257.h"
#include "net/net.h"
#include "qemu/cutils.h"
#include "net/net.h"
#define MAX_IDE_BUS 2

View File

@ -1066,7 +1066,7 @@ static void OPLResetChip(FM_OPL *OPL)
}
}
/* ---------- Create one of vietual YM3812 ---------- */
/* ---------- Create one of virtual YM3812 ---------- */
/* 'rate' is sampling rate and 'bufsiz' is the size of the */
FM_OPL *OPLCreate(int clock, int rate)
{
@ -1115,7 +1115,7 @@ FM_OPL *OPLCreate(int clock, int rate)
return OPL;
}
/* ---------- Destroy one of vietual YM3812 ---------- */
/* ---------- Destroy one of virtual YM3812 ---------- */
void OPLDestroy(FM_OPL *OPL)
{
#ifdef OPL_OUTPUT_LOG

View File

@ -557,7 +557,7 @@ void qdev_connect_gpio_out_named(DeviceState *dev, const char *name, int n,
qemu_irq qdev_get_gpio_out_connector(DeviceState *dev, const char *name, int n)
{
char *propname = g_strdup_printf("%s[%d]",
g_autofree char *propname = g_strdup_printf("%s[%d]",
name ? name : "unnamed-gpio-out", n);
qemu_irq ret = (qemu_irq)object_property_get_link(OBJECT(dev), propname,

View File

@ -1311,7 +1311,6 @@ static void exynos4210_fimd_update(void *opaque)
}
host_fb_addr += inc_size;
fb_line_addr += inc_size;
is_dirty = false;
}
g_free(snap);
blend = true;

View File

@ -593,7 +593,6 @@ static void pxa2xx_palette_parse(PXA2xxLCDState *s, int ch, int bpp)
n = 256;
break;
default:
format = 0;
return;
}

View File

@ -372,7 +372,7 @@ static uint64_t zdma_update_descr_addr(XlnxZDMA *s, bool type,
static void zdma_write_dst(XlnxZDMA *s, uint8_t *buf, uint32_t len)
{
uint32_t dst_size, dlen;
bool dst_intr, dst_type;
bool dst_intr;
unsigned int ptype = ARRAY_FIELD_EX32(s->regs, ZDMA_CH_CTRL0, POINT_TYPE);
unsigned int rw_mode = ARRAY_FIELD_EX32(s->regs, ZDMA_CH_CTRL0, MODE);
unsigned int burst_type = ARRAY_FIELD_EX32(s->regs, ZDMA_CH_DATA_ATTR,
@ -386,17 +386,17 @@ static void zdma_write_dst(XlnxZDMA *s, uint8_t *buf, uint32_t len)
while (len) {
dst_size = FIELD_EX32(s->dsc_dst.words[2], ZDMA_CH_DST_DSCR_WORD2,
SIZE);
dst_type = FIELD_EX32(s->dsc_dst.words[3], ZDMA_CH_DST_DSCR_WORD3,
TYPE);
if (dst_size == 0 && ptype == PT_MEM) {
uint64_t next;
bool dst_type = FIELD_EX32(s->dsc_dst.words[3],
ZDMA_CH_DST_DSCR_WORD3,
TYPE);
next = zdma_update_descr_addr(s, dst_type,
R_ZDMA_CH_DST_CUR_DSCR_LSB);
zdma_load_descriptor(s, next, &s->dsc_dst);
dst_size = FIELD_EX32(s->dsc_dst.words[2], ZDMA_CH_DST_DSCR_WORD2,
SIZE);
dst_type = FIELD_EX32(s->dsc_dst.words[3], ZDMA_CH_DST_DSCR_WORD3,
TYPE);
}
/* Match what hardware does by ignoring the dst_size and only using

View File

@ -22,6 +22,7 @@
#include "qapi/error.h"
#include "net/net.h"
#include "qemu/log.h"
#include "net/net.h"
#define MAX_IDE_BUS 2

View File

@ -21,6 +21,7 @@
*/
#include "qemu/osdep.h"
#include "qemu/range.h"
#include "hw/i2c/pm_smbus.h"
#include "hw/pci/pci.h"
#include "migration/vmstate.h"

View File

@ -47,6 +47,7 @@
#include "hw/rtc/mc146818rtc_regs.h"
#include "migration/vmstate.h"
#include "hw/mem/memory-device.h"
#include "hw/mem/nvdimm.h"
#include "sysemu/numa.h"
#include "sysemu/reset.h"

View File

@ -76,6 +76,7 @@
#include "hw/boards.h"
#include "acpi-build.h"
#include "hw/mem/pc-dimm.h"
#include "hw/mem/nvdimm.h"
#include "qapi/error.h"
#include "qapi/qapi-visit-common.h"
#include "qapi/visitor.h"

View File

@ -60,6 +60,7 @@
#include "migration/global_state.h"
#include "migration/misc.h"
#include "sysemu/numa.h"
#include "hw/mem/nvdimm.h"
#define MAX_IDE_BUS 2

View File

@ -53,6 +53,7 @@
#include "qapi/error.h"
#include "qemu/error-report.h"
#include "sysemu/numa.h"
#include "hw/mem/nvdimm.h"
/* ICH9 AHCI has 6 ports */
#define MAX_SATA_PORTS 6

View File

@ -37,7 +37,6 @@
#include "migration/vmstate.h"
#include "hw/irq.h"
#include "hw/isa/apm.h"
#include "hw/i386/ioapic.h"
#include "hw/pci/pci.h"
#include "hw/pci/pci_bridge.h"
#include "hw/i386/ich9.h"

View File

@ -525,8 +525,8 @@ static void dp8393x_do_transmit_packets(dp8393xState *s)
* (4 + 3 * s->regs[SONIC_TFC]),
MEMTXATTRS_UNSPECIFIED, s->data,
size);
s->regs[SONIC_CTDA] = dp8393x_get(s, width, 0) & ~0x1;
if (dp8393x_get(s, width, 0) & SONIC_DESC_EOL) {
s->regs[SONIC_CTDA] = dp8393x_get(s, width, 0);
if (s->regs[SONIC_CTDA] & SONIC_DESC_EOL) {
/* EOL detected */
break;
}

View File

@ -1150,7 +1150,8 @@ set_ims(E1000State *s, int index, uint32_t val)
}
#define getreg(x) [x] = mac_readreg
static uint32_t (*macreg_readops[])(E1000State *, int) = {
typedef uint32_t (*readops)(E1000State *, int);
static const readops macreg_readops[] = {
getreg(PBA), getreg(RCTL), getreg(TDH), getreg(TXDCTL),
getreg(WUFC), getreg(TDT), getreg(CTRL), getreg(LEDCTL),
getreg(MANC), getreg(MDIC), getreg(SWSM), getreg(STATUS),
@ -1205,7 +1206,8 @@ static uint32_t (*macreg_readops[])(E1000State *, int) = {
enum { NREADOPS = ARRAY_SIZE(macreg_readops) };
#define putreg(x) [x] = mac_writereg
static void (*macreg_writeops[])(E1000State *, int, uint32_t) = {
typedef void (*writeops)(E1000State *, int, uint32_t);
static const writeops macreg_writeops[] = {
putreg(PBA), putreg(EERD), putreg(SWSM), putreg(WUFC),
putreg(TDBAL), putreg(TDBAH), putreg(TXDCTL), putreg(RDBAH),
putreg(RDBAL), putreg(LEDCTL), putreg(VET), putreg(FCRUC),

View File

@ -2855,7 +2855,8 @@ e1000e_set_gcr(E1000ECore *core, int index, uint32_t val)
}
#define e1000e_getreg(x) [x] = e1000e_mac_readreg
static uint32_t (*e1000e_macreg_readops[])(E1000ECore *, int) = {
typedef uint32_t (*readops)(E1000ECore *, int);
static const readops e1000e_macreg_readops[] = {
e1000e_getreg(PBA),
e1000e_getreg(WUFC),
e1000e_getreg(MANC),
@ -3061,7 +3062,8 @@ static uint32_t (*e1000e_macreg_readops[])(E1000ECore *, int) = {
enum { E1000E_NREADOPS = ARRAY_SIZE(e1000e_macreg_readops) };
#define e1000e_putreg(x) [x] = e1000e_mac_writereg
static void (*e1000e_macreg_writeops[])(E1000ECore *, int, uint32_t) = {
typedef void (*writeops)(E1000ECore *, int, uint32_t);
static const writeops e1000e_macreg_writeops[] = {
e1000e_putreg(PBA),
e1000e_putreg(SWSM),
e1000e_putreg(WUFC),

View File

@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
#include "qemu/range.h"
#include "hw/i386/pc.h"
#include "hw/pci/pci.h"
#include "hw/pci/pci_host.h"

View File

@ -29,6 +29,7 @@
*/
#include "qemu/osdep.h"
#include "hw/i386/pc.h"
#include "hw/pci-host/q35.h"
#include "hw/qdev-properties.h"
#include "migration/vmstate.h"

View File

@ -27,7 +27,6 @@
#include "migration/qemu-file-types.h"
#include "migration/vmstate.h"
#include "sysemu/sysemu.h"
#include "ui/console.h"
#include "qemu/bcd.h"
#include "qemu/module.h"

View File

@ -1915,7 +1915,6 @@ static int32_t scsi_disk_emulate_command(SCSIRequest *req, uint8_t *buf)
r->iov.iov_base = blk_blockalign(s->qdev.conf.blk, r->buflen);
}
buflen = req->cmd.xfer;
outbuf = r->iov.iov_base;
memset(outbuf, 0, r->buflen);
switch (req->cmd.buf[0]) {

View File

@ -27,7 +27,6 @@
#include "qemu/osdep.h"
#include "hw/i386/pc.h"
#include "hw/irq.h"
#include "ui/console.h"
#include "qapi/error.h"
#include "qemu/error-report.h"
#include "qemu/timer.h"
@ -37,6 +36,7 @@
#include "hw/rtc/mc146818rtc_regs.h"
#include "migration/vmstate.h"
#include "hw/timer/i8254.h"
#include "exec/address-spaces.h"
//#define HPET_DEBUG
#ifdef HPET_DEBUG

View File

@ -17,7 +17,6 @@
#include "desc.h"
#include "hw/qdev-properties.h"
#include "hw/scsi/scsi.h"
#include "ui/console.h"
#include "migration/vmstate.h"
#include "monitor/monitor.h"
#include "sysemu/sysemu.h"

View File

@ -5,7 +5,6 @@
#include "hw/sysbus.h"
#include "hw/i386/pc.h"
#include "hw/isa/apm.h"
#include "hw/i386/ioapic.h"
#include "hw/pci/pci.h"
#include "hw/pci/pcie_host.h"
#include "hw/pci/pci_bridge.h"

View File

@ -22,11 +22,7 @@
#ifndef INTEL_IOMMU_H
#define INTEL_IOMMU_H
#include "sysemu/dma.h"
#include "hw/i386/x86-iommu.h"
#include "hw/i386/ioapic.h"
#include "hw/pci/msi.h"
#include "hw/sysbus.h"
#include "qemu/iova-tree.h"
#define TYPE_INTEL_IOMMU_DEVICE "intel-iommu"

View File

@ -23,7 +23,6 @@
#define QEMU_IOAPIC_INTERNAL_H
#include "exec/memory.h"
#include "hw/i386/ioapic.h"
#include "hw/sysbus.h"
#include "qemu/notify.h"

View File

@ -1,20 +1,15 @@
#ifndef HW_PC_H
#define HW_PC_H
#include "exec/memory.h"
#include "qemu/notify.h"
#include "qapi/qapi-types-common.h"
#include "hw/boards.h"
#include "hw/block/fdc.h"
#include "hw/block/flash.h"
#include "net/net.h"
#include "hw/i386/x86.h"
#include "qemu/range.h"
#include "qemu/bitmap.h"
#include "qemu/module.h"
#include "hw/pci/pci.h"
#include "hw/mem/pc-dimm.h"
#include "hw/mem/nvdimm.h"
#include "hw/acpi/acpi_dev_interface.h"
#include "hw/hotplug.h"
#define HPET_INTCAP "hpet-intcap"

View File

@ -22,17 +22,11 @@
#ifndef HW_Q35_H
#define HW_Q35_H
#include "hw/isa/isa.h"
#include "hw/sysbus.h"
#include "hw/i386/pc.h"
#include "hw/isa/apm.h"
#include "hw/pci/pci.h"
#include "hw/pci/pcie_host.h"
#include "hw/acpi/acpi.h"
#include "hw/acpi/ich9.h"
#include "hw/pci-host/pam.h"
#include "hw/i386/intel_iommu.h"
#include "qemu/units.h"
#include "qemu/range.h"
#define TYPE_Q35_HOST_DEVICE "q35-pcihost"
#define Q35_HOST_DEVICE(obj) \

View File

@ -2842,7 +2842,6 @@ void hmp_rocker_of_dpa_groups(Monitor *mon, const QDict *qdict)
const char *name = qdict_get_str(qdict, "name");
uint8_t type = qdict_get_try_int(qdict, "type", 9);
Error *err = NULL;
bool set = false;
list = qmp_query_rocker_of_dpa_groups(name, type != 9, type, &err);
if (err != NULL) {
@ -2854,6 +2853,7 @@ void hmp_rocker_of_dpa_groups(Monitor *mon, const QDict *qdict)
for (g = list; g; g = g->next) {
RockerOfDpaGroup *group = g->value;
bool set = false;
monitor_printf(mon, "0x%08x", group->id);
@ -2898,14 +2898,11 @@ void hmp_rocker_of_dpa_groups(Monitor *mon, const QDict *qdict)
if (group->has_set_eth_dst) {
if (!set) {
set = true;
monitor_printf(mon, " set");
}
monitor_printf(mon, " dst %s", group->set_eth_dst);
}
set = false;
if (group->has_ttl_check && group->ttl_check) {
monitor_printf(mon, " check TTL");
}

View File

@ -435,3 +435,6 @@ sentinel = .$(subst $(SPACE),_,$(subst /,_,$1)).sentinel.
atomic = $(eval $1: $(call sentinel,$1) ; @:) \
$(call sentinel,$1) : $2 ; @touch $$@ \
$(foreach t,$1,$(if $(wildcard $t),,$(shell rm -f $(call sentinel,$1))))
print-%:
@echo '$*=$($*)'

View File

@ -11,6 +11,7 @@
# Documentation
docs/*
*.rst
*.texi
# build system

View File

@ -25,6 +25,7 @@
#include "qemu/osdep.h"
#include "qemu-common.h"
#include "qemu/units.h"
#include "hw/boards.h"
#include "hw/qdev-properties.h"
#include "qapi/error.h"
#include "qemu-version.h"