error: Mechanical fixes & cleanups
cover error: Mechanical fixes & cleanups
Markus Armbruster (4):
coccinelle/err-bad-newline: Fix for Python 3, and add patterns
error: Strip trailing '\n' from error string arguments (again)
error: Remove NULL checks on error_propagate() calls (again)
error: Use error_fatal to simplify obvious fatal errors (again)
scripts/coccinelle/err-bad-newline.cocci | 24 ++++++++++++++++++++++-- exec.c | 11 +++-------- hw/i386/intel_iommu.c | 6 +++--- hw/net/virtio-net.c | 8 ++------ hw/s390x/s390-virtio-ccw.c | 6 +----- hw/virtio/vhost.c | 10 +++------- migration/colo.c | 4 +--- migration/migration.c | 8 ++------ target/ppc/mmu-hash64.c | 2 +- 9 files changed, 38 insertions(+), 41 deletions(-)
Signature · 1 line
2.26.2
PATCH 1/4 coccinelle/err-bad-newline: Fix for Python 3, and add patterns
--- scripts/coccinelle/err-bad-newline.cocci | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-)
scripts/coccinelle/err-bad-newline.cocci +22 -2
@@ -1,22 +1,42 @@ // Error messages should not contain newlines. This script finds // messages that do. Fixing them is manual. @r@ -expression errp, eno, cls, fmt; +expression errp, err, eno, cls, fmt, ap; position p; @@ ( +error_vreport(fmt, ap)@p +| +warn_vreport(fmt, ap)@p +| +info_vreport(fmt, ap)@p +| error_report(fmt, ...)@p | +warn_report(fmt, ...)@p +| +info_report(fmt, ...)@p +| +error_report_once(fmt, ...)@p +| +warn_report_once(fmt, ...)@p +| error_setg(errp, fmt, ...)@p | error_setg_errno(errp, eno, fmt, ...)@p | error_setg_win32(errp, eno, cls, fmt, ...)@p | +error_propagate_prepend(errp, err, fmt, ...)@p +| +error_vprepend(errp, fmt, ap)@p +| error_prepend(errp, fmt, ...)@p | error_setg_file_open(errp, eno, cls, fmt, ...)@p | +warn_reportf_err(errp, fmt, ...)@p +| error_reportf_err(errp, fmt, ...)@p | error_set(errp, cls, fmt, ...)@p
@@ -26,4 +46,4 @@ fmt << r.fmt; p << r.p; @@ if "\\n" in str(fmt): - print "%s:%s:%s:%s" % (p[0].file, p[0].line, p[0].column, fmt) + print("%s:%s:%s:%s" % (p[0].file, p[0].line, p[0].column, fmt))
Signature · 1 line
2.26.2
Re: [PATCH 1/4] coccinelle/err-bad-newline: Fix for Python 3, and add patterns
Quoted 5 lines · Markus Armbruster
Signed-off-by Markus Armbruster <[email protected]>--- scripts/coccinelle/err-bad-newline.cocci | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-)
Signature · 3 lines
Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
PATCH 2/4 error: Strip trailing '\n' from error string arguments (again)
In reply to Markus ArmbrusterTracked down with scripts/coccinelle/err-bad-newline.cocci.
--- hw/i386/intel_iommu.c | 6 +++--- target/ppc/mmu-hash64.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
hw/i386/intel_iommu.c +3 -3
@@ -2356,7 +2356,7 @@ static bool vtd_process_iotlb_desc(IntelIOMMUState *s, VTDInvDesc *inv_desc)if ((inv_desc->lo &VTD_INV_DESC_IOTLB_RSVD_LO ) || (inv_desc->hi &VTD_INV_DESC_IOTLB_RSVD_HI )) {error_report_once ("%s: invalid iotlb inv desc: hi=0x%" PRIx64 -", lo=0x%" PRIx64" (reserved bits unzero)\n" , +", lo=0x%" PRIx64" (reserved bits unzero)" , __func__, inv_desc->hi, inv_desc->lo);return false; }
@@ -2377,7 +2377,7 @@ static bool vtd_process_iotlb_desc(IntelIOMMUState *s, VTDInvDesc *inv_desc) am =VTD_INV_DESC_IOTLB_AM (inv_desc->hi);if (am >VTD_MAMV ) {error_report_once ("%s: invalid iotlb inv desc: hi=0x%" PRIx64 -", lo=0x%" PRIx64" (am=%u > VTD_MAMV=%u)\n" , +", lo=0x%" PRIx64" (am=%u > VTD_MAMV=%u)" , __func__, inv_desc->hi, inv_desc->lo, am, (unsigned )VTD_MAMV );return false;
@@ -2387,7 +2387,7 @@ static bool vtd_process_iotlb_desc(IntelIOMMUState *s, VTDInvDesc *inv_desc)default :error_report_once ("%s: invalid iotlb inv desc: hi=0x%" PRIx64 -", lo=0x%" PRIx64" (type mismatch: 0x%llx)\n" , +", lo=0x%" PRIx64" (type mismatch: 0x%llx)" , __func__, inv_desc->hi, inv_desc->lo, inv_desc->lo &VTD_INV_DESC_IOTLB_G );return false;
target/ppc/mmu-hash64.c +1 -1
@@ -859,7 +859,7 @@ static int build_vrma_slbe(PowerPCCPU *cpu, ppc_slb_t *slb) }error_report ("Bad page size encoding in LPCR[VRMASD]; LPCR=0x" - TARGET_FMT_lx"\n" , lpcr); + TARGET_FMT_lx, lpcr);return -1 ; }
Signature · 1 line
2.26.2
Re: [PATCH 2/4] error: Strip trailing '\n' from error string arguments (again)
Quoted 9 lines · Markus Armbruster
Tracked down with
scripts/coccinelle/err-bad-newline.cocci.Cc Peter Xu <[email protected]>Cc David Gibson <[email protected]>Signed-off-by Markus Armbruster <[email protected]>--- hw/i386/intel_iommu.c | 6 +++--- target/ppc/mmu-hash64.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
Re: [PATCH 2/4] error: Strip trailing '\n' from error string arguments (again)
In reply to Markus ArmbrusterQuoted 5 lines · Markus Armbruster
Tracked down with
scripts/coccinelle/err-bad-newline.cocci.Cc Peter Xu <[email protected]>Cc David Gibson <[email protected]>Signed-off-by Markus Armbruster <[email protected]>
ppc part
Quoted 49 lines
--- hw/i386/intel_iommu.c | 6 +++--- target/ppc/mmu-hash64.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)hw/i386/intel_iommu.c +3
-3@@ -2356,7 +2356,7 @@ static bool vtd_process_iotlb_desc(IntelIOMMUState *s, VTDInvDesc *inv_desc)if ((inv_desc->lo &VTD_INV_DESC_IOTLB_RSVD_LO ) || (inv_desc->hi &VTD_INV_DESC_IOTLB_RSVD_HI )) {error_report_once ("%s: invalid iotlb inv desc: hi=0x%" PRIx64 -", lo=0x%" PRIx64" (reserved bits unzero)\n" , +", lo=0x%" PRIx64" (reserved bits unzero)" , __func__, inv_desc->hi, inv_desc->lo);return false; }@@ -2377,7 +2377,7 @@ static bool vtd_process_iotlb_desc(IntelIOMMUState *s, VTDInvDesc *inv_desc) am =VTD_INV_DESC_IOTLB_AM (inv_desc->hi);if (am >VTD_MAMV ) {error_report_once ("%s: invalid iotlb inv desc: hi=0x%" PRIx64 -", lo=0x%" PRIx64" (am=%u > VTD_MAMV=%u)\n" , +", lo=0x%" PRIx64" (am=%u > VTD_MAMV=%u)" , __func__, inv_desc->hi, inv_desc->lo, am, (unsigned )VTD_MAMV );return false;@@ -2387,7 +2387,7 @@ static bool vtd_process_iotlb_desc(IntelIOMMUState *s, VTDInvDesc *inv_desc)default :error_report_once ("%s: invalid iotlb inv desc: hi=0x%" PRIx64 -", lo=0x%" PRIx64" (type mismatch: 0x%llx)\n" , +", lo=0x%" PRIx64" (type mismatch: 0x%llx)" , __func__, inv_desc->hi, inv_desc->lo, inv_desc->lo &VTD_INV_DESC_IOTLB_G );return false;target/ppc/mmu-hash64.c +1
-1@@ -859,7 +859,7 @@ static int build_vrma_slbe(PowerPCCPU *cpu, ppc_slb_t *slb) }error_report ("Bad page size encoding in LPCR[VRMASD]; LPCR=0x" - TARGET_FMT_lx"\n" , lpcr); + TARGET_FMT_lx, lpcr);return -1 ; }
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Re: [PATCH 2/4] error: Strip trailing '\n' from error string arguments (again)
In reply to Markus ArmbrusterQuoted 5 lines · Markus Armbruster
Tracked down with
scripts/coccinelle/err-bad-newline.cocci.Cc Peter Xu <[email protected]>Cc David Gibson <[email protected]>Signed-off-by Markus Armbruster <[email protected]>
Signature · 1 line
Peter Xu
PATCH 3/4 error: Remove NULL checks on error_propagate() calls (again)
In reply to Markus ArmbrusterPatch created mechanically by rerunning:
$ spatch --sp-file scripts/coccinelle/error_propagate_null.cocci \
--macro-file scripts/cocci-macro-file.h \
--use-gitgrep .--- hw/net/virtio-net.c | 8 ++------ migration/colo.c | 4 +--- migration/migration.c | 8 ++------ 3 files changed, 5 insertions(+), 15 deletions(-)
hw/net/virtio-net.c +2 -6
@@ -809,9 +809,7 @@ static void failover_add_primary(VirtIONet *n, Error **errp)"sure primary device has parameter" " failover_pair_id=<virtio-net-id>\n"); } -if (err) { -error_propagate (errp, err); - } +error_propagate (errp, err); }static int is_my_primary (void *opaque,QemuOpts *opts,Error **errp)
@@ -865,9 +863,7 @@ static DeviceState *virtio_connect_failover_devices(VirtIONet *n, n->primary_device_id =g_strdup (prim_dev->id); n->primary_device_opts = prim_dev->opts; }else { -if (err) { -error_propagate (errp, err); - } +error_propagate (errp, err); }return prim_dev;
migration/colo.c +1 -3
@@ -798,9 +798,7 @@ static void colo_incoming_process_checkpoint(MigrationIncomingState *mis,colo_send_message (mis->to_src_file,COLO_MESSAGE_VMSTATE_LOADED , &local_err); -if (local_err) { -error_propagate (errp, local_err); - } +error_propagate (errp, local_err); } static void colo_wait_handle_message(MigrationIncomingState *mis,
migration/migration.c +2 -6
@@ -601,9 +601,7 @@ void migration_fd_process_incoming(QEMUFile *f, Error **errp) }if (migration_incoming_setup (f, &local_err)) { -if (local_err) { -error_propagate (errp, local_err); - } +error_propagate (errp, local_err);return ; }migration_incoming_process ();
@@ -625,9 +623,7 @@ void migration_ioc_process_incoming(QIOChannel *ioc, Error **errp) }if (migration_incoming_setup (f, &local_err)) { -if (local_err) { -error_propagate (errp, local_err); - } +error_propagate (errp, local_err);return ; }
Signature · 1 line
2.26.2
Re: [PATCH 3/4] error: Remove NULL checks on error_propagate() calls (again)
Quoted 14 lines · Markus Armbruster
Patch created mechanically by rerunning:
$ spatch --sp-file scripts/coccinelle/error_propagate_null.cocci \ --macro-file scripts/cocci-macro-file.h \ --use-gitgrep .Cc Jens Freimann <[email protected]>Cc Hailiang Zhang <[email protected]>Cc Juan Quintela <[email protected]>Signed-off-by Markus Armbruster <[email protected]>---
+++
b/migration/colo.c
migration/colo.c static void colo_incoming_process_checkpoint(MigrationIncomingState *mis, · line 802
Quoted 8 lines
migration/colo.c +1
-3@@ -798,9 +798,7 @@ static void colo_incoming_process_checkpoint(MigrationIncomingState *mis,colo_send_message (mis->to_src_file,COLO_MESSAGE_VMSTATE_LOADED , &local_err); -if (local_err) { -error_propagate (errp, local_err); - } +error_propagate (errp, local_err); }
As this is mechanical, it is fine. But there is now a further cleanup possible of passing errp directly to colo_send_message, and possibly dropping local_err altogether.
Signature · 3 lines
Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
Re: [PATCH 3/4] error: Remove NULL checks on error_propagate() calls (again)
Quoted 13 lines · Eric Blake
Quoted 11 lines · Markus Armbruster
Patch created mechanically by rerunning:
$ spatch --sp-file scripts/coccinelle/error_propagate_null.cocci \ --macro-file scripts/cocci-macro-file.h \ --use-gitgrep .Cc Jens Freimann <[email protected]>Cc Hailiang Zhang <[email protected]>Cc Juan Quintela <[email protected]>Signed-off-by Markus Armbruster <[email protected]>---
Quoted 14 lines
migration/colo.c static void colo_incoming_process_checkpoint(MigrationIncomingState *mis, · line 802
Quoted 10 lines
+++
b/migration/colo.cmigration/colo.c +1
-3@@ -798,9 +798,7 @@ static void colo_incoming_process_checkpoint(MigrationIncomingState *mis,colo_send_message (mis->to_src_file,COLO_MESSAGE_VMSTATE_LOADED , &local_err); -if (local_err) { -error_propagate (errp, local_err); - } +error_propagate (errp, local_err); }As this is mechanical, it is fine. But there is now a further cleanup possible of passing errp directly to
colo_send_message, and possibly droppinglocal_erraltogether.
True.
The patch is small and simple enough for squashing in further manual cleanups. I'd like to first check whether a followup patch created with the machinery I used for eliminating error_propagate() comes out better.
Quoted 1 line
Reviewed-by Eric Blake <[email protected]>
Thanks!
Re: [PATCH 3/4] error: Remove NULL checks on error_propagate() calls (again)
Quoted 30 lines · Markus Armbruster
Quoted 13 lines · Eric Blake
Quoted 11 lines · Markus Armbruster
Patch created mechanically by rerunning:
$ spatch --sp-file scripts/coccinelle/error_propagate_null.cocci \ --macro-file scripts/cocci-macro-file.h \ --use-gitgrep .Cc Jens Freimann <[email protected]>Cc Hailiang Zhang <[email protected]>Cc Juan Quintela <[email protected]>Signed-off-by Markus Armbruster <[email protected]>---
Quoted 14 lines
migration/colo.c static void colo_incoming_process_checkpoint(MigrationIncomingState *mis, · line 802
Quoted 10 lines
+++
b/migration/colo.cmigration/colo.c +1
-3@@ -798,9 +798,7 @@ static void colo_incoming_process_checkpoint(MigrationIncomingState *mis,colo_send_message (mis->to_src_file,COLO_MESSAGE_VMSTATE_LOADED , &local_err); -if (local_err) { -error_propagate (errp, local_err); - } +error_propagate (errp, local_err); }As this is mechanical, it is fine. But there is now a further cleanup possible of passing errp directly to
colo_send_message, and possibly droppinglocal_erraltogether.
Quoted 5 lines
True.
The patch is small and simple enough for squashing in further manual cleanups. I'd like to first check whether a followup patch created with the machinery I used for eliminating
error_propagate()comes out better.
Vladimir's scripts/coccinelle/errp-guard.cocci will take care of it.
Eliminating error propagation altogether would be even better, but it's also more work: several void functions need to return bool instead.
Quoted 3 lines
Quoted 1 line
Reviewed-by Eric Blake <[email protected]>Thanks!
Re: [PATCH 3/4] error: Remove NULL checks on error_propagate() calls (again)
Quoted 15 lines · Markus Armbruster
Quoted 15 lines
Quoted 14 lines
migration/colo.c static void colo_incoming_process_checkpoint(MigrationIncomingState *mis, · line 802
Quoted 10 lines
+++
b/migration/colo.cmigration/colo.c +1
-3@@ -798,9 +798,7 @@ static void colo_incoming_process_checkpoint(MigrationIncomingState *mis,colo_send_message (mis->to_src_file,COLO_MESSAGE_VMSTATE_LOADED , &local_err); -if (local_err) { -error_propagate (errp, local_err); - } +error_propagate (errp, local_err); }As this is mechanical, it is fine. But there is now a further cleanup possible of passing errp directly to
colo_send_message, and possibly droppinglocal_erraltogether.
Quoted 7 lines
Quoted 5 lines
True.
The patch is small and simple enough for squashing in further manual cleanups. I'd like to first check whether a followup patch created with the machinery I used for eliminating
error_propagate()comes out better.Vladimir's
scripts/coccinelle/errp-guard.cocciwill take care of it.
Good to know. Then I'm fine deferring those cleanups to the mechanical patches down the road, rather than a manual effort now.
Quoted 3 lines
Eliminating error propagation altogether would be even better, but it's also more work: several void functions need to return bool instead.
Correct, but also doesn't change the fact that this patch is ready to go regardless of how much further cleanup we plan on doing.
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
Reviewed-by Eric Blake <[email protected]>Thanks!
Signature · 3 lines
Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
PATCH 4/4 error: Use error_fatal to simplify obvious fatal errors (again)
In reply to Markus ArmbrusterPatch created mechanically by rerunning:
$ spatch --in-place --sp-file scripts/coccinelle/use-error_fatal.cocci \ --macro-file scripts/cocci-macro-file.h --use-gitgrep .
Variables now unused dropped manually.
--- exec.c | 11 +++-------- hw/s390x/s390-virtio-ccw.c | 6 +----- hw/virtio/vhost.c | 10 +++------- 3 files changed, 7 insertions(+), 20 deletions(-)
exec.c +3 -8
@@ -627,8 +627,7 @@ static void tcg_register_iommu_notifier(CPUState *cpu,*/ MemoryRegion *mr =MEMORY_REGION (iommu_mr);TCGIOMMUNotifier *notifier; -Error *err =NULL ; -int i, ret; +int i;for (i =0 ; i < cpu->iommu_notifiers->len; i++) { notifier = g_array_index(cpu->iommu_notifiers, TCGIOMMUNotifier *, i);
@@ -657,12 +656,8 @@ static void tcg_register_iommu_notifier(CPUState *cpu,0 ,HWADDR_MAX , iommu_idx); - ret =memory_region_register_iommu_notifier (notifier->mr, ¬ifier->n, - &err); -if (ret) { -error_report_err (err); -exit (1 ); - } +memory_region_register_iommu_notifier (notifier->mr, ¬ifier->n, + &error_fatal); }if (!notifier->active) {
hw/s390x/s390-virtio-ccw.c +1 -5
@@ -170,11 +170,7 @@ static void s390_memory_init(MemoryRegion *ram)* Configure the maximum page size. As no memory devices were created * yet, this is the page size of initial memory only. */ -s390_set_max_pagesize (qemu_maxrampagesize (), &local_err); -if (local_err) { -error_report_err (local_err); -exit (EXIT_FAILURE ); - } +s390_set_max_pagesize (qemu_maxrampagesize (), &error_fatal);/* Initialize storage key device */ s390_skeys_init ();/* Initialize storage attributes device */
hw/virtio/vhost.c +3 -7
@@ -712,9 +712,8 @@ static void vhost_iommu_region_add(MemoryListener *listener, iommu_listener);struct vhost_iommu *iommu;Int128 end; -int iommu_idx, ret; +int iommu_idx;IOMMUMemoryRegion *iommu_mr; -Error *err =NULL ;if (!memory_region_is_iommu (section->mr)) {return ;
@@ -737,11 +736,8 @@ static void vhost_iommu_region_add(MemoryListener *listener, iommu->iommu_offset = section->offset_within_address_space - section->offset_within_region; iommu->hdev = dev; - ret =memory_region_register_iommu_notifier (section->mr, &iommu->n, &err); -if (ret) { -error_report_err (err); -exit (1 ); - } +memory_region_register_iommu_notifier (section->mr, &iommu->n, + &error_fatal);QLIST_INSERT_HEAD (&dev->iommu_list, iommu, iommu_next);/* TODO: can replay help performance here? */ }
Signature · 1 line
2.26.2
Re: [PATCH 4/4] error: Use error_fatal to simplify obvious fatal errors (again)
Quoted 82 lines · Markus Armbruster
Patch created mechanically by rerunning:
$ spatch --in-place --sp-file scripts/coccinelle/use-error_fatal.cocci \ --macro-file scripts/cocci-macro-file.h --use-gitgrep .Variables now unused dropped manually.
Cc Eric Auger <[email protected]>Cc David Hildenbrand <[email protected]>Signed-off-by Markus Armbruster <[email protected]>--- exec.c | 11 +++-------- hw/s390x/s390-virtio-ccw.c | 6 +----- hw/virtio/vhost.c | 10 +++------- 3 files changed, 7 insertions(+), 20 deletions(-)exec.c +3
-8@@ -627,8 +627,7 @@ static void tcg_register_iommu_notifier(CPUState *cpu,*/ MemoryRegion *mr =MEMORY_REGION (iommu_mr);TCGIOMMUNotifier *notifier; -Error *err =NULL ; -int i, ret; +int i;for (i =0 ; i < cpu->iommu_notifiers->len; i++) { notifier = g_array_index(cpu->iommu_notifiers, TCGIOMMUNotifier *, i);@@ -657,12 +656,8 @@ static void tcg_register_iommu_notifier(CPUState *cpu,0 ,HWADDR_MAX , iommu_idx); - ret =memory_region_register_iommu_notifier (notifier->mr, ¬ifier->n, - &err); -if (ret) { -error_report_err (err); -exit (1 ); - } +memory_region_register_iommu_notifier (notifier->mr, ¬ifier->n, + &error_fatal); }if (!notifier->active) {hw/s390x/s390-virtio-ccw.c +1
-5@@ -170,11 +170,7 @@ static void s390_memory_init(MemoryRegion *ram)* Configure the maximum page size. As no memory devices were created * yet, this is the page size of initial memory only. */ -s390_set_max_pagesize (qemu_maxrampagesize (), &local_err); -if (local_err) { -error_report_err (local_err); -exit (EXIT_FAILURE ); - } +s390_set_max_pagesize (qemu_maxrampagesize (), &error_fatal);/* Initialize storage key device */ s390_skeys_init ();/* Initialize storage attributes device */ hw/virtio/vhost.c +1
-2@@ -712,9 +712,8 @@ static void vhost_iommu_region_add(MemoryListener *listener, iommu_listener);struct vhost_iommu *iommu;Int128 end; -int iommu_idx, ret; +int iommu_idx;IOMMUMemoryRegion *iommu_mr; -Error *err =NULL ;if (!memory_region_is_iommu (section->mr)) {return ;@@ -737,11 +736,8 @@ static void vhost_iommu_region_add(MemoryListener *listener, iommu->iommu_offset = section->offset_within_address_space - section->offset_within_region; iommu->hdev = dev;
hw/virtio/vhost.c static void vhost_iommu_region_add(MemoryListener *listener, · line 743
Quoted 10 lines
hw/virtio/vhost.c +2
-5- ret =memory_region_register_iommu_notifier (section->mr, &iommu->n, &err); -if (ret) { -error_report_err (err); -exit (1 ); - } +memory_region_register_iommu_notifier (section->mr, &iommu->n, + &error_fatal);QLIST_INSERT_HEAD (&dev->iommu_list, iommu, iommu_next);/* TODO: can replay help performance here? */ }
Signature · 3 lines
Thanks, David / dhildenb
Quoted 5 lines · Markus Armbruster
Markus Armbruster (4):
coccinelle/err-bad-newline: Fix for Python 3, and add patterns
error: Strip trailing '\n' from error string arguments (again)
error: Remove NULL checks onerror_propagate()calls (again)
error: Useerror_fatalto simplify obvious fatal errors (again)
PATCH 1+2 queued for 5.1, PATCH 3+4 queued for 5.2.