Commit 4ba6366d authored by Jan Höppner's avatar Jan Höppner Committed by Jens Axboe

s390/dasd: Remove %p format specifier from error messages

Printing pointer in error messages doesn't add any value since the
addresses are hashed. Remove the %p format specifier and adapt the error
messages slightly.

Replace %p with %px in ERP to get the actual addresses since ERP is used
for debugging purposes only anyway.
Signed-off-by: default avatarJan Höppner <hoeppner@linux.ibm.com>
Reviewed-by: default avatarStefan Haberland <sth@linux.ibm.com>
Signed-off-by: default avatarStefan Haberland <sth@linux.ibm.com>
Link: https://lore.kernel.org/r/20240208164248.540985-8-sth@linux.ibm.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 0b3644b4
...@@ -1379,7 +1379,7 @@ int dasd_start_IO(struct dasd_ccw_req *cqr) ...@@ -1379,7 +1379,7 @@ int dasd_start_IO(struct dasd_ccw_req *cqr)
} }
if (cqr->retries < 0) { if (cqr->retries < 0) {
dev_err(&device->cdev->dev, dev_err(&device->cdev->dev,
"Start I/O ran out of retries %p\n", cqr); "Start I/O ran out of retries\n");
cqr->status = DASD_CQR_ERROR; cqr->status = DASD_CQR_ERROR;
return -EIO; return -EIO;
} }
...@@ -1907,7 +1907,7 @@ static void __dasd_process_cqr(struct dasd_device *device, ...@@ -1907,7 +1907,7 @@ static void __dasd_process_cqr(struct dasd_device *device,
break; break;
default: default:
dev_err(&device->cdev->dev, dev_err(&device->cdev->dev,
"Unexpected CQR status %p %02x", cqr, cqr->status); "Unexpected CQR status %02x", cqr->status);
BUG(); BUG();
} }
if (cqr->callback) if (cqr->callback)
...@@ -1972,16 +1972,14 @@ static void __dasd_device_check_expire(struct dasd_device *device) ...@@ -1972,16 +1972,14 @@ static void __dasd_device_check_expire(struct dasd_device *device)
if (device->discipline->term_IO(cqr) != 0) { if (device->discipline->term_IO(cqr) != 0) {
/* Hmpf, try again in 5 sec */ /* Hmpf, try again in 5 sec */
dev_err(&device->cdev->dev, dev_err(&device->cdev->dev,
"cqr %p timed out (%lus) but cannot be " "CQR timed out (%lus) but cannot be ended, retrying in 5s\n",
"ended, retrying in 5 s\n", (cqr->expires / HZ));
cqr, (cqr->expires/HZ));
cqr->expires += 5*HZ; cqr->expires += 5*HZ;
dasd_device_set_timer(device, 5*HZ); dasd_device_set_timer(device, 5*HZ);
} else { } else {
dev_err(&device->cdev->dev, dev_err(&device->cdev->dev,
"cqr %p timed out (%lus), %i retries " "CQR timed out (%lus), %i retries remaining\n",
"remaining\n", cqr, (cqr->expires/HZ), (cqr->expires / HZ), cqr->retries);
cqr->retries);
} }
__dasd_device_check_autoquiesce_timeout(device, cqr); __dasd_device_check_autoquiesce_timeout(device, cqr);
} }
...@@ -2102,8 +2100,7 @@ int dasd_flush_device_queue(struct dasd_device *device) ...@@ -2102,8 +2100,7 @@ int dasd_flush_device_queue(struct dasd_device *device)
if (rc) { if (rc) {
/* unable to terminate requeust */ /* unable to terminate requeust */
dev_err(&device->cdev->dev, dev_err(&device->cdev->dev,
"Flushing the DASD request queue " "Flushing the DASD request queue failed\n");
"failed for request %p\n", cqr);
/* stop flush processing */ /* stop flush processing */
goto finished; goto finished;
} }
...@@ -2619,8 +2616,7 @@ static int __dasd_cancel_req(struct dasd_ccw_req *cqr) ...@@ -2619,8 +2616,7 @@ static int __dasd_cancel_req(struct dasd_ccw_req *cqr)
rc = device->discipline->term_IO(cqr); rc = device->discipline->term_IO(cqr);
if (rc) { if (rc) {
dev_err(&device->cdev->dev, dev_err(&device->cdev->dev,
"Cancelling request %p failed with rc=%d\n", "Cancelling request failed with rc=%d\n", rc);
cqr, rc);
} else { } else {
cqr->stopclk = get_tod_clock(); cqr->stopclk = get_tod_clock();
} }
......
...@@ -2659,7 +2659,7 @@ dasd_3990_erp_further_erp(struct dasd_ccw_req *erp) ...@@ -2659,7 +2659,7 @@ dasd_3990_erp_further_erp(struct dasd_ccw_req *erp)
* necessary * necessary
*/ */
dev_err(&device->cdev->dev, dev_err(&device->cdev->dev,
"ERP %p has run out of retries and failed\n", erp); "ERP %px has run out of retries and failed\n", erp);
erp->status = DASD_CQR_FAILED; erp->status = DASD_CQR_FAILED;
} }
...@@ -2782,11 +2782,9 @@ dasd_3990_erp_action(struct dasd_ccw_req * cqr) ...@@ -2782,11 +2782,9 @@ dasd_3990_erp_action(struct dasd_ccw_req * cqr)
"ERP chain at BEGINNING of ERP-ACTION\n"); "ERP chain at BEGINNING of ERP-ACTION\n");
for (temp_erp = cqr; for (temp_erp = cqr;
temp_erp != NULL; temp_erp = temp_erp->refers) { temp_erp != NULL; temp_erp = temp_erp->refers) {
dev_err(&device->cdev->dev, dev_err(&device->cdev->dev,
"ERP %p (%02x) refers to %p\n", "ERP %px (%02x) refers to %px\n",
temp_erp, temp_erp->status, temp_erp, temp_erp->status, temp_erp->refers);
temp_erp->refers);
} }
} }
...@@ -2833,11 +2831,9 @@ dasd_3990_erp_action(struct dasd_ccw_req * cqr) ...@@ -2833,11 +2831,9 @@ dasd_3990_erp_action(struct dasd_ccw_req * cqr)
"ERP chain at END of ERP-ACTION\n"); "ERP chain at END of ERP-ACTION\n");
for (temp_erp = erp; for (temp_erp = erp;
temp_erp != NULL; temp_erp = temp_erp->refers) { temp_erp != NULL; temp_erp = temp_erp->refers) {
dev_err(&device->cdev->dev, dev_err(&device->cdev->dev,
"ERP %p (%02x) refers to %p\n", "ERP %px (%02x) refers to %px\n",
temp_erp, temp_erp->status, temp_erp, temp_erp->status, temp_erp->refers);
temp_erp->refers);
} }
} }
......
...@@ -170,12 +170,12 @@ dasd_log_sense(struct dasd_ccw_req *cqr, struct irb *irb) ...@@ -170,12 +170,12 @@ dasd_log_sense(struct dasd_ccw_req *cqr, struct irb *irb)
device = cqr->startdev; device = cqr->startdev;
if (cqr->intrc == -ETIMEDOUT) { if (cqr->intrc == -ETIMEDOUT) {
dev_err(&device->cdev->dev, dev_err(&device->cdev->dev,
"A timeout error occurred for cqr %p\n", cqr); "A timeout error occurred for cqr %px\n", cqr);
return; return;
} }
if (cqr->intrc == -ENOLINK) { if (cqr->intrc == -ENOLINK) {
dev_err(&device->cdev->dev, dev_err(&device->cdev->dev,
"A transport error occurred for cqr %p\n", cqr); "A transport error occurred for cqr %px\n", cqr);
return; return;
} }
/* dump sense data */ /* dump sense data */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment