From: Jan Höppner Date: Thu, 16 Oct 2025 07:47:15 +0000 (+0200) Subject: s390/tape: Fix return value of ccw helper functions X-Git-Tag: v6.19-rc1~206^2~35^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e039400f75f1a88675132abc57a18d090cf75209;p=thirdparty%2Flinux.git s390/tape: Fix return value of ccw helper functions In contrast to all other helper functions used to build CCW chains, tape_ccw_cc_idal() and tape_ccw_end_idal() return values using post-increments, which results in returning the same CCW pointer. Though, the intent of the CCW helper functions is to return the _next_ CCW in the chain, which can then be processed. There is currently no actual issue, as tape_ccw_cc_idal() is not used yet and tape_ccw_end_idal() is only used at the end of a chain. Change both functions return statement to ccw + 1 and bring them in line with the other helper functions. Signed-off-by: Jan Höppner Reviewed-by: Jens Remus Signed-off-by: Heiko Carstens --- diff --git a/drivers/s390/char/tape.h b/drivers/s390/char/tape.h index dc04518b7beca..0596a9758662b 100644 --- a/drivers/s390/char/tape.h +++ b/drivers/s390/char/tape.h @@ -352,7 +352,7 @@ tape_ccw_cc_idal(struct ccw1 *ccw, __u8 cmd_code, struct idal_buffer *idal) ccw->cmd_code = cmd_code; ccw->flags = CCW_FLAG_CC; idal_buffer_set_cda(idal, ccw); - return ccw++; + return ccw + 1; } static inline struct ccw1 * @@ -361,7 +361,7 @@ tape_ccw_end_idal(struct ccw1 *ccw, __u8 cmd_code, struct idal_buffer *idal) ccw->cmd_code = cmd_code; ccw->flags = 0; idal_buffer_set_cda(idal, ccw); - return ccw++; + return ccw + 1; } /* Global vars */