[PATCH v2 7/8] scsi: hisi_sas: fix return value of hisi_sas_task_prep()

2018-03-02 Thread John Garry
From: Xiaofei Tan It is an implicit regulation that error code that function returned should be negative. But hisi_sas_task_prep() doesn't follow this. This may cause problems in the upper layer code. For example, in sas_expander.c of libsas, smp_execute_task_sg() may

[PATCH v2 7/8] scsi: hisi_sas: fix return value of hisi_sas_task_prep()

2018-03-02 Thread John Garry
From: Xiaofei Tan It is an implicit regulation that error code that function returned should be negative. But hisi_sas_task_prep() doesn't follow this. This may cause problems in the upper layer code. For example, in sas_expander.c of libsas, smp_execute_task_sg() may return the number of bytes