提交 82e9c59c 编写于 作者: C chenxiang 提交者: Xie XiuQi

scsi: hisi_sas: some misc tidy-up related to coding standard

Do some code cleanup according to HUAWEI coding standard. It includes:
- Make the type of return vaule is the same as the function;
- Keep spaces between annotations and annotator;
- Add necessary spaces between operator and variable;
- Remove some un-necessary initialized variable;
Signed-off-by: NXiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: NJohn Garry <john.garry@huawei.com>

Feature or Bugfix:Bugfix
Signed-off-by: Nchenxiang (M) <chenxiang66@hisilicon.com>
Reviewed-by: Ntanxiaofei <tanxiaofei@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 fd98df2a
...@@ -144,7 +144,7 @@ EXPORT_SYMBOL_GPL(hisi_sas_get_ncq_tag); ...@@ -144,7 +144,7 @@ EXPORT_SYMBOL_GPL(hisi_sas_get_ncq_tag);
*/ */
u8 hisi_sas_get_prog_phy_linkrate_mask(enum sas_linkrate max) u8 hisi_sas_get_prog_phy_linkrate_mask(enum sas_linkrate max)
{ {
u16 rate = 0; u8 rate = 0;
int i; int i;
max -= SAS_LINK_RATE_1_5_GBPS; max -= SAS_LINK_RATE_1_5_GBPS;
...@@ -681,7 +681,7 @@ static void hisi_sas_bytes_dmaed(struct hisi_hba *hisi_hba, int phy_no) ...@@ -681,7 +681,7 @@ static void hisi_sas_bytes_dmaed(struct hisi_hba *hisi_hba, int phy_no)
id->initiator_bits = SAS_PROTOCOL_ALL; id->initiator_bits = SAS_PROTOCOL_ALL;
id->target_bits = phy->identify.target_port_protocols; id->target_bits = phy->identify.target_port_protocols;
} else if (phy->phy_type & PORT_TYPE_SATA) { } else if (phy->phy_type & PORT_TYPE_SATA) {
/*Nothing*/ /* Nothing */
} }
sas_phy->frame_rcvd_size = phy->frame_rcvd_size; sas_phy->frame_rcvd_size = phy->frame_rcvd_size;
...@@ -1174,7 +1174,7 @@ static int hisi_sas_exec_internal_tmf_task(struct domain_device *device, ...@@ -1174,7 +1174,7 @@ static int hisi_sas_exec_internal_tmf_task(struct domain_device *device,
task->task_done = hisi_sas_task_done; task->task_done = hisi_sas_task_done;
task->slow_task->timer.function = hisi_sas_tmf_timedout; task->slow_task->timer.function = hisi_sas_tmf_timedout;
task->slow_task->timer.expires = jiffies + TASK_TIMEOUT*HZ; task->slow_task->timer.expires = jiffies + TASK_TIMEOUT * HZ;
add_timer(&task->slow_task->timer); add_timer(&task->slow_task->timer);
res = hisi_sas_task_exec(task, GFP_KERNEL, 1, tmf); res = hisi_sas_task_exec(task, GFP_KERNEL, 1, tmf);
...@@ -1685,7 +1685,7 @@ static int hisi_sas_abort_task_set(struct domain_device *device, u8 *lun) ...@@ -1685,7 +1685,7 @@ static int hisi_sas_abort_task_set(struct domain_device *device, u8 *lun)
struct hisi_hba *hisi_hba = dev_to_hisi_hba(device); struct hisi_hba *hisi_hba = dev_to_hisi_hba(device);
struct device *dev = hisi_hba->dev; struct device *dev = hisi_hba->dev;
struct hisi_sas_tmf_task tmf_task; struct hisi_sas_tmf_task tmf_task;
int rc = TMF_RESP_FUNC_FAILED; int rc;
rc = hisi_sas_internal_task_abort(hisi_hba, device, rc = hisi_sas_internal_task_abort(hisi_hba, device,
HISI_SAS_INT_ABT_DEV, 0); HISI_SAS_INT_ABT_DEV, 0);
...@@ -1706,7 +1706,7 @@ static int hisi_sas_abort_task_set(struct domain_device *device, u8 *lun) ...@@ -1706,7 +1706,7 @@ static int hisi_sas_abort_task_set(struct domain_device *device, u8 *lun)
static int hisi_sas_clear_aca(struct domain_device *device, u8 *lun) static int hisi_sas_clear_aca(struct domain_device *device, u8 *lun)
{ {
int rc = TMF_RESP_FUNC_FAILED; int rc;
struct hisi_sas_tmf_task tmf_task; struct hisi_sas_tmf_task tmf_task;
tmf_task.tmf = TMF_CLEAR_ACA; tmf_task.tmf = TMF_CLEAR_ACA;
...@@ -1757,7 +1757,7 @@ static int hisi_sas_I_T_nexus_reset(struct domain_device *device) ...@@ -1757,7 +1757,7 @@ static int hisi_sas_I_T_nexus_reset(struct domain_device *device)
{ {
struct hisi_hba *hisi_hba = dev_to_hisi_hba(device); struct hisi_hba *hisi_hba = dev_to_hisi_hba(device);
struct device *dev = hisi_hba->dev; struct device *dev = hisi_hba->dev;
int rc = TMF_RESP_FUNC_FAILED; int rc;
rc = hisi_sas_internal_task_abort(hisi_hba, device, rc = hisi_sas_internal_task_abort(hisi_hba, device,
HISI_SAS_INT_ABT_DEV, 0); HISI_SAS_INT_ABT_DEV, 0);
...@@ -2010,7 +2010,7 @@ _hisi_sas_internal_task_abort(struct hisi_hba *hisi_hba, ...@@ -2010,7 +2010,7 @@ _hisi_sas_internal_task_abort(struct hisi_hba *hisi_hba,
task->task_proto = device->tproto; task->task_proto = device->tproto;
task->task_done = hisi_sas_task_done; task->task_done = hisi_sas_task_done;
task->slow_task->timer.function = hisi_sas_tmf_timedout; task->slow_task->timer.function = hisi_sas_tmf_timedout;
task->slow_task->timer.expires = jiffies + INTERNAL_ABORT_TIMEOUT*HZ; task->slow_task->timer.expires = jiffies + INTERNAL_ABORT_TIMEOUT * HZ;
add_timer(&task->slow_task->timer); add_timer(&task->slow_task->timer);
res = hisi_sas_internal_abort_task_exec(hisi_hba, sas_dev->device_id, res = hisi_sas_internal_abort_task_exec(hisi_hba, sas_dev->device_id,
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include "hisi_sas.h" #include "hisi_sas.h"
#define DRV_NAME "hisi_sas_v3_hw" #define DRV_NAME "hisi_sas_v3_hw"
/* global registers need init*/ /* global registers need init */
#define DLVRY_QUEUE_ENABLE 0x0 #define DLVRY_QUEUE_ENABLE 0x0
#define IOST_BASE_ADDR_LO 0x8 #define IOST_BASE_ADDR_LO 0x8
#define IOST_BASE_ADDR_HI 0xc #define IOST_BASE_ADDR_HI 0xc
...@@ -769,7 +769,7 @@ static void clear_itct_v3_hw(struct hisi_hba *hisi_hba, ...@@ -769,7 +769,7 @@ static void clear_itct_v3_hw(struct hisi_hba *hisi_hba,
hisi_sas_write32(hisi_hba, ENT_INT_SRC3, hisi_sas_write32(hisi_hba, ENT_INT_SRC3,
ENT_INT_SRC3_ITC_INT_MSK); ENT_INT_SRC3_ITC_INT_MSK);
/* clear the itct table*/ /* clear the itct table */
reg_val = ITCT_CLR_EN_MSK | (dev_id & ITCT_DEV_MSK); reg_val = ITCT_CLR_EN_MSK | (dev_id & ITCT_DEV_MSK);
hisi_sas_write32(hisi_hba, ITCT_CLR, reg_val); hisi_sas_write32(hisi_hba, ITCT_CLR, reg_val);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册