mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
Miscellaneous patches for 2022-12-14
-----BEGIN PGP SIGNATURE----- iQJGBAABCAAwFiEENUvIs9frKmtoZ05fOHC0AOuRhlMFAmOZ6lYSHGFybWJydUBy ZWRoYXQuY29tAAoJEDhwtADrkYZT6VEQAKynjWh3AIZ4/qOgrVqsP0oRspevLmfH BbuGoldjYpEE7RbwuCaZalZ7iy7TcSySxnPfUDVsFHd7NWffJVjwKHifGC0D/Ez0 +Ggyb1CBebN+mS7t+BNFUHdMM+wxFIlHwg4f4aTFbn2o0HKgj2a8tcNzNRonZbfa xURnvbD4G4u0VZEc3Jak+x193xbOJFsuuWq0BZnDuNk+XqjyW2RwfpXLPJVk+82a 4uy/YgYuqXUqBeULwcJj+shBL4SXR9GyajTFMS64przSUle0ADUmXkPtaS2agV7e Pym/UQuAcxvNyw34fJsiMZxx6rZI9YU30jQUMRLoYcPRR/Q/aiPeiiHtiD6Kaid7 IfOeH/EArXaQRFpD89xj4YcaTnRLQOEj0NXgXvAbQf6eD8JYyao/S/0lCsPZEoA2 nibLqEQ25ncDNXoSomuwtfjVff3w68lODFbhwqfA0gf3cPtCgVZ6xQ8P/McNY6K6 wqFHXMWTDHk1LOCTucjYz1z2TGzTnSG4iWi5Yt6FSxAc958AO+v5ALn/1pcYun+E azM/MF0AInKj2aJCT530zT0tpCs/Jo07YKC8k6ubi77S0ZdmGS1XLeXkRXfk1+yI OhuUgiVlSTHxD69DagT2vbnx1mDMM9X+OBIMvEi5nwvD9A/ghaCgkDeGFvbA1ud0 t0mxPBZJ+tiZ =JJjG -----END PGP SIGNATURE----- Merge tag 'pull-misc-2022-12-14' of https://repo.or.cz/qemu/armbru into staging Miscellaneous patches for 2022-12-14 # gpg: Signature made Wed 14 Dec 2022 15:23:02 GMT # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full] # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * tag 'pull-misc-2022-12-14' of https://repo.or.cz/qemu/armbru: ppc4xx_sdram: Simplify sdram_ddr_size() to return block/vmdk: Simplify vmdk_co_create() to return directly cleanup: Tweak and re-run return_directly.cocci io: Tidy up fat-fingered parameter name qapi: Use returned bool to check for failure (again) sockets: Use ERRP_GUARD() where obviously appropriate qemu-config: Use ERRP_GUARD() where obviously appropriate qemu-config: Make config_parse_qdict() return bool monitor: Use ERRP_GUARD() in monitor_init() monitor: Simplify monitor_fd_param()'s error handling error: Move ERRP_GUARD() to the beginning of the function error: Drop a few superfluous ERRP_GUARD() error: Drop some obviously superfluous error_propagate() Drop more useless casts from void * to pointer Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
48804eebd4
70 changed files with 188 additions and 407 deletions
|
@ -2533,11 +2533,7 @@ vhost_user_crypto_close_session(struct vhost_dev *dev, uint64_t session_id)
|
|||
static bool vhost_user_mem_section_filter(struct vhost_dev *dev,
|
||||
MemoryRegionSection *section)
|
||||
{
|
||||
bool result;
|
||||
|
||||
result = memory_region_get_fd(section->mr) >= 0;
|
||||
|
||||
return result;
|
||||
return memory_region_get_fd(section->mr) >= 0;
|
||||
}
|
||||
|
||||
static int vhost_user_get_inflight_fd(struct vhost_dev *dev,
|
||||
|
|
|
@ -963,6 +963,7 @@ static bool vhost_vdpa_svq_map_rings(struct vhost_dev *dev,
|
|||
struct vhost_vring_addr *addr,
|
||||
Error **errp)
|
||||
{
|
||||
ERRP_GUARD();
|
||||
DMAMap device_region, driver_region;
|
||||
struct vhost_vring_addr svq_addr;
|
||||
struct vhost_vdpa *v = dev->opaque;
|
||||
|
@ -971,7 +972,6 @@ static bool vhost_vdpa_svq_map_rings(struct vhost_dev *dev,
|
|||
size_t avail_offset;
|
||||
bool ok;
|
||||
|
||||
ERRP_GUARD();
|
||||
vhost_svq_get_vring_addr(svq, &svq_addr);
|
||||
|
||||
driver_region = (DMAMap) {
|
||||
|
|
|
@ -241,36 +241,34 @@ static void balloon_stats_poll_cb(void *opaque)
|
|||
static void balloon_stats_get_all(Object *obj, Visitor *v, const char *name,
|
||||
void *opaque, Error **errp)
|
||||
{
|
||||
Error *err = NULL;
|
||||
VirtIOBalloon *s = VIRTIO_BALLOON(obj);
|
||||
bool ok = false;
|
||||
int i;
|
||||
|
||||
if (!visit_start_struct(v, name, NULL, 0, &err)) {
|
||||
goto out;
|
||||
if (!visit_start_struct(v, name, NULL, 0, errp)) {
|
||||
return;
|
||||
}
|
||||
if (!visit_type_int(v, "last-update", &s->stats_last_update, &err)) {
|
||||
if (!visit_type_int(v, "last-update", &s->stats_last_update, errp)) {
|
||||
goto out_end;
|
||||
}
|
||||
|
||||
if (!visit_start_struct(v, "stats", NULL, 0, &err)) {
|
||||
if (!visit_start_struct(v, "stats", NULL, 0, errp)) {
|
||||
goto out_end;
|
||||
}
|
||||
for (i = 0; i < VIRTIO_BALLOON_S_NR; i++) {
|
||||
if (!visit_type_uint64(v, balloon_stat_names[i], &s->stats[i], &err)) {
|
||||
if (!visit_type_uint64(v, balloon_stat_names[i], &s->stats[i], errp)) {
|
||||
goto out_nested;
|
||||
}
|
||||
}
|
||||
visit_check_struct(v, &err);
|
||||
ok = visit_check_struct(v, errp);
|
||||
out_nested:
|
||||
visit_end_struct(v, NULL);
|
||||
|
||||
if (!err) {
|
||||
visit_check_struct(v, &err);
|
||||
if (ok) {
|
||||
visit_check_struct(v, errp);
|
||||
}
|
||||
out_end:
|
||||
visit_end_struct(v, NULL);
|
||||
out:
|
||||
error_propagate(errp, err);
|
||||
}
|
||||
|
||||
static void balloon_stats_get_poll_interval(Object *obj, Visitor *v,
|
||||
|
|
|
@ -775,8 +775,7 @@ static void virtio_iommu_handle_command(VirtIODevice *vdev, VirtQueue *vq)
|
|||
output_size = s->config.probe_size + sizeof(tail);
|
||||
buf = g_malloc0(output_size);
|
||||
|
||||
ptail = (struct virtio_iommu_req_tail *)
|
||||
(buf + s->config.probe_size);
|
||||
ptail = buf + s->config.probe_size;
|
||||
ptail->status = virtio_iommu_handle_probe(s, iov, iov_cnt, buf);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1094,12 +1094,9 @@ static void virtio_mem_set_requested_size(Object *obj, Visitor *v,
|
|||
Error **errp)
|
||||
{
|
||||
VirtIOMEM *vmem = VIRTIO_MEM(obj);
|
||||
Error *err = NULL;
|
||||
uint64_t value;
|
||||
|
||||
visit_type_size(v, name, &value, &err);
|
||||
if (err) {
|
||||
error_propagate(errp, err);
|
||||
if (!visit_type_size(v, name, &value, errp)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1159,7 +1156,6 @@ static void virtio_mem_set_block_size(Object *obj, Visitor *v, const char *name,
|
|||
void *opaque, Error **errp)
|
||||
{
|
||||
VirtIOMEM *vmem = VIRTIO_MEM(obj);
|
||||
Error *err = NULL;
|
||||
uint64_t value;
|
||||
|
||||
if (DEVICE(obj)->realized) {
|
||||
|
@ -1167,9 +1163,7 @@ static void virtio_mem_set_block_size(Object *obj, Visitor *v, const char *name,
|
|||
return;
|
||||
}
|
||||
|
||||
visit_type_size(v, name, &value, &err);
|
||||
if (err) {
|
||||
error_propagate(errp, err);
|
||||
if (!visit_type_size(v, name, &value, errp)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue