s390/dasd: handle request magic consistently as unsigned int
Get rid of the rather odd casts to character pointer of the dasd_ccw_req magic member and simply use the unsigned int value unmodified everywhere. Acked-by: Jan Höppner <hoeppner@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Stefan Haberland <sth@linux.ibm.com> Link: https://lore.kernel.org/r/20211020115124.1735254-2-sth@linux.ibm.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
0c98057be9
commit
169bbdacaa
@ -201,7 +201,7 @@ dasd_3990_erp_DCTL(struct dasd_ccw_req * erp, char modifier)
|
||||
struct ccw1 *ccw;
|
||||
struct dasd_ccw_req *dctl_cqr;
|
||||
|
||||
dctl_cqr = dasd_alloc_erp_request((char *) &erp->magic, 1,
|
||||
dctl_cqr = dasd_alloc_erp_request(erp->magic, 1,
|
||||
sizeof(struct DCTL_data),
|
||||
device);
|
||||
if (IS_ERR(dctl_cqr)) {
|
||||
@ -1652,7 +1652,7 @@ dasd_3990_erp_action_1B_32(struct dasd_ccw_req * default_erp, char *sense)
|
||||
}
|
||||
|
||||
/* Build new ERP request including DE/LO */
|
||||
erp = dasd_alloc_erp_request((char *) &cqr->magic,
|
||||
erp = dasd_alloc_erp_request(cqr->magic,
|
||||
2 + 1,/* DE/LO + TIC */
|
||||
sizeof(struct DE_eckd_data) +
|
||||
sizeof(struct LO_eckd_data), device);
|
||||
@ -2388,7 +2388,7 @@ static struct dasd_ccw_req *dasd_3990_erp_add_erp(struct dasd_ccw_req *cqr)
|
||||
}
|
||||
|
||||
/* allocate additional request block */
|
||||
erp = dasd_alloc_erp_request((char *) &cqr->magic,
|
||||
erp = dasd_alloc_erp_request(cqr->magic,
|
||||
cplength, datasize, device);
|
||||
if (IS_ERR(erp)) {
|
||||
if (cqr->retries <= 0) {
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "dasd_int.h"
|
||||
|
||||
struct dasd_ccw_req *
|
||||
dasd_alloc_erp_request(char *magic, int cplength, int datasize,
|
||||
dasd_alloc_erp_request(unsigned int magic, int cplength, int datasize,
|
||||
struct dasd_device * device)
|
||||
{
|
||||
unsigned long flags;
|
||||
@ -33,8 +33,8 @@ dasd_alloc_erp_request(char *magic, int cplength, int datasize,
|
||||
int size;
|
||||
|
||||
/* Sanity checks */
|
||||
BUG_ON( magic == NULL || datasize > PAGE_SIZE ||
|
||||
(cplength*sizeof(struct ccw1)) > PAGE_SIZE);
|
||||
BUG_ON(datasize > PAGE_SIZE ||
|
||||
(cplength*sizeof(struct ccw1)) > PAGE_SIZE);
|
||||
|
||||
size = (sizeof(struct dasd_ccw_req) + 7L) & -8L;
|
||||
if (cplength > 0)
|
||||
@ -62,7 +62,7 @@ dasd_alloc_erp_request(char *magic, int cplength, int datasize,
|
||||
cqr->data = data;
|
||||
memset(cqr->data, 0, datasize);
|
||||
}
|
||||
strncpy((char *) &cqr->magic, magic, 4);
|
||||
cqr->magic = magic;
|
||||
ASCEBC((char *) &cqr->magic, 4);
|
||||
set_bit(DASD_CQR_FLAGS_USE_ERP, &cqr->flags);
|
||||
dasd_get_device(device);
|
||||
|
@ -887,7 +887,7 @@ void dasd_proc_exit(void);
|
||||
/* externals in dasd_erp.c */
|
||||
struct dasd_ccw_req *dasd_default_erp_action(struct dasd_ccw_req *);
|
||||
struct dasd_ccw_req *dasd_default_erp_postaction(struct dasd_ccw_req *);
|
||||
struct dasd_ccw_req *dasd_alloc_erp_request(char *, int, int,
|
||||
struct dasd_ccw_req *dasd_alloc_erp_request(unsigned int, int, int,
|
||||
struct dasd_device *);
|
||||
void dasd_free_erp_request(struct dasd_ccw_req *, struct dasd_device *);
|
||||
void dasd_log_sense(struct dasd_ccw_req *, struct irb *);
|
||||
|
Loading…
Reference in New Issue
Block a user