Re: [PATCH 20/20] scsi_error: format abort error message

Yoshihiro YUNOMAE
2014-09-05T04:23:30Z

(2014/09/03 19:06), Hannes Reinecke wrote:
> Decode the return value if the command abort failed.
>
> Suggested-by: Robert Elliot <elliot@hp.com>
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> ---
> drivers/scsi/scsi_error.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
> index 8a6d382..eca63b2 100644
> --- a/drivers/scsi/scsi_error.c
> +++ b/drivers/scsi/scsi_error.c
> @@ -157,8 +157,8 @@ scmd_eh_abort_handler(struct work_struct *work)
> } else {
> SCSI_LOG_ERROR_RECOVERY(3,
> scmd_printk(KERN_INFO, scmd,
> - "scmd %p abort failed, rtn %d\n",
> - scmd, rtn));
> + "scmd %p abort failed, rtn %s\n",
> + scmd, scsi_retval_string(rtn)));

If CONFIG_SCSI_CONSTANTS is disabled, scsi_retval_string() returns NULL.
So, if so, we had better output the raw value here.

Thanks,
Yoshihiro YUNOMAE

--
Yoshihiro YUNOMAE
Software Platform Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: yoshihiro.yunomae.ez@hitachi.com