[PATCH v1 1/3] KVM: s390: Silence potential warnings in _gmap_crstep_xchg_atomic()

From: Claudio Imbrenda

Date: Tue Jun 09 2026 - 12:31:14 EST


While dat_crstep_xchg_atomic() is marked as __must_check, in this
particular case the return value should be ignored.

Add an explicit (void) cast to silence potential compiler warnings, and
a comment to explain why it is ok to do so.

Fixes: d1adc098ce08 ("KVM: s390: Fix _gmap_crstep_xchg_atomic()")
Signed-off-by: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx>
CC: stable@xxxxxxxxxxxxxxx # 7.1
---
arch/s390/kvm/gmap.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/s390/kvm/gmap.h b/arch/s390/kvm/gmap.h
index 5374f21aaf8d..4e6979783e16 100644
--- a/arch/s390/kvm/gmap.h
+++ b/arch/s390/kvm/gmap.h
@@ -279,7 +279,11 @@ static inline bool __must_check _gmap_crstep_xchg_atomic(struct gmap *gmap, unio
gmap_handle_vsie_unshadow_event(gmap, gfn);
else
_gmap_handle_vsie_unshadow_event(gmap, gfn);
- dat_crstep_xchg_atomic(crstep, oldcrste, newcrste, gfn, gmap->asce);
+ /*
+ * Ignore the result, it's just a best effort clearing of the
+ * vsie_notif bit. The caller will have to try again regardless.
+ */
+ (void)dat_crstep_xchg_atomic(crstep, oldcrste, newcrste, gfn, gmap->asce);
return false;
}
if (!oldcrste.s.fc1.d && newcrste.s.fc1.d && !newcrste.s.fc1.s)
--
2.54.0