RE: [PATCH 26/27] scsi: correct return values for .eh_abort_handler implementations

Elliott, Robert (Server Storage)
2014-10-28T23:49:20Z

> -----Original Message-----
> From: Hannes Reinecke [mailto:hare@suse.de]
> Sent: Friday, 24 October, 2014 7:27 AM
> To: James Bottomley
> Cc: Christoph Hellwig; Elliott, Robert (Server Storage); linux-
> scsi@vger.kernel.org; Hannes Reinecke; stable@vger.kernel.org
> Subject: [PATCH 26/27] scsi: correct return values for
> .eh_abort_handler implementations
>
> The .eh_abort_handler needs to return SUCCESS, FAILED, or
> FAST_IO_FAIL. So fixup all callers to adhere to this requirement.
>
> Cc: Robert Elliott <elliott@hp.com>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> ---
> drivers/scsi/NCR5380.c | 2 +-
> drivers/scsi/aha1740.c | 2 +-
> drivers/scsi/esas2r/esas2r_main.c | 2 +-
> drivers/scsi/megaraid.c | 8 ++++----
> 4 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c
> index 50873bb..e2c9e73 100644
> --- a/drivers/scsi/NCR5380.c
> +++ b/drivers/scsi/NCR5380.c
> @@ -2703,7 +2703,7 @@ static int NCR5380_abort(Scsi_Cmnd * cmd) {
> * aborted flag and get back into our main loop.
> */
>
> - return 0;
> + return SUCCESS;
> }
> #endif

The comment above this function still says:
* Returns : 0 - success, -1 on failure.

The same comment problem also exists in
atari_NCR5380.c and sun3_NCR5380.c, which have
functions with this same name.

With all those comments also updated...