Skip to content

Commit

Permalink
block: remove useless caller argument to print_req_error()
Browse files Browse the repository at this point in the history
We have exactly one caller of this, just get rid of adding the useless
function name to the output.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Jens Axboe committed Oct 18, 2021
1 parent d4aa57a commit c477b79
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions block/blk-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,18 +216,17 @@ int blk_status_to_errno(blk_status_t status)
}
EXPORT_SYMBOL_GPL(blk_status_to_errno);

static void print_req_error(struct request *req, blk_status_t status,
const char *caller)
static void print_req_error(struct request *req, blk_status_t status)
{
int idx = (__force int)status;

if (WARN_ON_ONCE(idx >= ARRAY_SIZE(blk_errors)))
return;

printk_ratelimited(KERN_ERR
"%s: %s error, dev %s, sector %llu op 0x%x:(%s) flags 0x%x "
"%s error, dev %s, sector %llu op 0x%x:(%s) flags 0x%x "
"phys_seg %u prio class %u\n",
caller, blk_errors[idx].name,
blk_errors[idx].name,
req->rq_disk ? req->rq_disk->disk_name : "?",
blk_rq_pos(req), req_op(req), blk_op_str(req_op(req)),
req->cmd_flags & ~REQ_OP_MASK,
Expand Down Expand Up @@ -1471,7 +1470,7 @@ bool blk_update_request(struct request *req, blk_status_t error,

if (unlikely(error && !blk_rq_is_passthrough(req) &&
!(req->rq_flags & RQF_QUIET)))
print_req_error(req, error, __func__);
print_req_error(req, error);

blk_account_io_completion(req, nr_bytes);

Expand Down

0 comments on commit c477b79

Please sign in to comment.