Commit 8a23dbc6 authored by Luo Jiaxing's avatar Luo Jiaxing Committed by Martin K. Petersen

scsi: pm8001: Clean up white space

checkpatch reports the following:

    ERROR: space prohibited before that ',' (ctx:WxW)
    +int pm8001_mpi_general_event(struct pm8001_hba_info *pm8001_ha , void *piomb);

Remove unnecessary whitespace.

Link: https://lore.kernel.org/r/1617886593-36421-2-git-send-email-luojiaxing@huawei.comAcked-by: default avatarJack Wang <jinpu.wang@ionos.com>
Signed-off-by: default avatarLuo Jiaxing <luojiaxing@huawei.com>
Signed-off-by: default avatarJianqin Xie <xiejianqin@hisilicon.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 40fa7394
...@@ -369,24 +369,22 @@ static ssize_t pm8001_ctl_aap_log_show(struct device *cdev, ...@@ -369,24 +369,22 @@ static ssize_t pm8001_ctl_aap_log_show(struct device *cdev,
struct Scsi_Host *shost = class_to_shost(cdev); struct Scsi_Host *shost = class_to_shost(cdev);
struct sas_ha_struct *sha = SHOST_TO_SAS_HA(shost); struct sas_ha_struct *sha = SHOST_TO_SAS_HA(shost);
struct pm8001_hba_info *pm8001_ha = sha->lldd_ha; struct pm8001_hba_info *pm8001_ha = sha->lldd_ha;
u8 *ptr = (u8 *)pm8001_ha->memoryMap.region[AAP1].virt_ptr;
int i; int i;
#define AAP1_MEMMAP(r, c) \
(*(u32 *)((u8*)pm8001_ha->memoryMap.region[AAP1].virt_ptr + (r) * 32 \
+ (c)))
char *str = buf; char *str = buf;
int max = 2; int max = 2;
for (i = 0; i < max; i++) { for (i = 0; i < max; i++) {
str += sprintf(str, "0x%08x 0x%08x 0x%08x 0x%08x 0x%08x 0x%08x" str += sprintf(str, "0x%08x 0x%08x 0x%08x 0x%08x 0x%08x 0x%08x"
"0x%08x 0x%08x\n", "0x%08x 0x%08x\n",
AAP1_MEMMAP(i, 0), pm8001_ctl_aap1_memmap(ptr, i, 0),
AAP1_MEMMAP(i, 4), pm8001_ctl_aap1_memmap(ptr, i, 4),
AAP1_MEMMAP(i, 8), pm8001_ctl_aap1_memmap(ptr, i, 8),
AAP1_MEMMAP(i, 12), pm8001_ctl_aap1_memmap(ptr, i, 12),
AAP1_MEMMAP(i, 16), pm8001_ctl_aap1_memmap(ptr, i, 16),
AAP1_MEMMAP(i, 20), pm8001_ctl_aap1_memmap(ptr, i, 20),
AAP1_MEMMAP(i, 24), pm8001_ctl_aap1_memmap(ptr, i, 24),
AAP1_MEMMAP(i, 28)); pm8001_ctl_aap1_memmap(ptr, i, 28));
} }
return str - buf; return str - buf;
......
...@@ -59,5 +59,10 @@ ...@@ -59,5 +59,10 @@
#define SYSFS_OFFSET 1024 #define SYSFS_OFFSET 1024
#define PM80XX_IB_OB_QUEUE_SIZE (32 * 1024) #define PM80XX_IB_OB_QUEUE_SIZE (32 * 1024)
#define PM8001_IB_OB_QUEUE_SIZE (16 * 1024) #define PM8001_IB_OB_QUEUE_SIZE (16 * 1024)
static inline u32 pm8001_ctl_aap1_memmap(u8 *ptr, int idx, int off)
{
return *(u32 *)(ptr + idx * 32 + off);
}
#endif /* PM8001_CTL_H_INCLUDED */ #endif /* PM8001_CTL_H_INCLUDED */
...@@ -1826,7 +1826,7 @@ static void pm8001_send_read_log(struct pm8001_hba_info *pm8001_ha, ...@@ -1826,7 +1826,7 @@ static void pm8001_send_read_log(struct pm8001_hba_info *pm8001_ha,
* that the task has been finished. * that the task has been finished.
*/ */
static void static void
mpi_ssp_completion(struct pm8001_hba_info *pm8001_ha , void *piomb) mpi_ssp_completion(struct pm8001_hba_info *pm8001_ha, void *piomb)
{ {
struct sas_task *t; struct sas_task *t;
struct pm8001_ccb_info *ccb; struct pm8001_ccb_info *ccb;
...@@ -2058,7 +2058,7 @@ mpi_ssp_completion(struct pm8001_hba_info *pm8001_ha , void *piomb) ...@@ -2058,7 +2058,7 @@ mpi_ssp_completion(struct pm8001_hba_info *pm8001_ha , void *piomb)
} }
/*See the comments for mpi_ssp_completion */ /*See the comments for mpi_ssp_completion */
static void mpi_ssp_event(struct pm8001_hba_info *pm8001_ha , void *piomb) static void mpi_ssp_event(struct pm8001_hba_info *pm8001_ha, void *piomb)
{ {
struct sas_task *t; struct sas_task *t;
unsigned long flags; unsigned long flags;
...@@ -2294,9 +2294,9 @@ mpi_sata_completion(struct pm8001_hba_info *pm8001_ha, void *piomb) ...@@ -2294,9 +2294,9 @@ mpi_sata_completion(struct pm8001_hba_info *pm8001_ha, void *piomb)
(status != IO_UNDERFLOW)) { (status != IO_UNDERFLOW)) {
if (!((t->dev->parent) && if (!((t->dev->parent) &&
(dev_is_expander(t->dev->parent->dev_type)))) { (dev_is_expander(t->dev->parent->dev_type)))) {
for (i = 0 , j = 4; j <= 7 && i <= 3; i++ , j++) for (i = 0, j = 4; j <= 7 && i <= 3; i++, j++)
sata_addr_low[i] = pm8001_ha->sas_addr[j]; sata_addr_low[i] = pm8001_ha->sas_addr[j];
for (i = 0 , j = 0; j <= 3 && i <= 3; i++ , j++) for (i = 0, j = 0; j <= 3 && i <= 3; i++, j++)
sata_addr_hi[i] = pm8001_ha->sas_addr[j]; sata_addr_hi[i] = pm8001_ha->sas_addr[j];
memcpy(&temp_sata_addr_low, sata_addr_low, memcpy(&temp_sata_addr_low, sata_addr_low,
sizeof(sata_addr_low)); sizeof(sata_addr_low));
...@@ -2625,7 +2625,7 @@ mpi_sata_completion(struct pm8001_hba_info *pm8001_ha, void *piomb) ...@@ -2625,7 +2625,7 @@ mpi_sata_completion(struct pm8001_hba_info *pm8001_ha, void *piomb)
} }
/*See the comments for mpi_ssp_completion */ /*See the comments for mpi_ssp_completion */
static void mpi_sata_event(struct pm8001_hba_info *pm8001_ha , void *piomb) static void mpi_sata_event(struct pm8001_hba_info *pm8001_ha, void *piomb)
{ {
struct sas_task *t; struct sas_task *t;
struct task_status_struct *ts; struct task_status_struct *ts;
...@@ -3602,7 +3602,7 @@ int pm8001_mpi_fw_flash_update_resp(struct pm8001_hba_info *pm8001_ha, ...@@ -3602,7 +3602,7 @@ int pm8001_mpi_fw_flash_update_resp(struct pm8001_hba_info *pm8001_ha,
return 0; return 0;
} }
int pm8001_mpi_general_event(struct pm8001_hba_info *pm8001_ha , void *piomb) int pm8001_mpi_general_event(struct pm8001_hba_info *pm8001_ha, void *piomb)
{ {
u32 status; u32 status;
int i; int i;
...@@ -3685,7 +3685,7 @@ int pm8001_mpi_task_abort_resp(struct pm8001_hba_info *pm8001_ha, void *piomb) ...@@ -3685,7 +3685,7 @@ int pm8001_mpi_task_abort_resp(struct pm8001_hba_info *pm8001_ha, void *piomb)
* @pm8001_ha: our hba card information * @pm8001_ha: our hba card information
* @piomb: IO message buffer * @piomb: IO message buffer
*/ */
static int mpi_hw_event(struct pm8001_hba_info *pm8001_ha, void* piomb) static int mpi_hw_event(struct pm8001_hba_info *pm8001_ha, void *piomb)
{ {
unsigned long flags; unsigned long flags;
struct hw_event_resp *pPayload = struct hw_event_resp *pPayload =
......
...@@ -877,8 +877,8 @@ static void pm8001_dev_gone_notify(struct domain_device *dev) ...@@ -877,8 +877,8 @@ static void pm8001_dev_gone_notify(struct domain_device *dev)
pm8001_dev->device_id, pm8001_dev->dev_type); pm8001_dev->device_id, pm8001_dev->dev_type);
if (atomic_read(&pm8001_dev->running_req)) { if (atomic_read(&pm8001_dev->running_req)) {
spin_unlock_irqrestore(&pm8001_ha->lock, flags); spin_unlock_irqrestore(&pm8001_ha->lock, flags);
pm8001_exec_internal_task_abort(pm8001_ha, pm8001_dev , pm8001_exec_internal_task_abort(pm8001_ha, pm8001_dev,
dev, 1, 0); dev, 1, 0);
while (atomic_read(&pm8001_dev->running_req)) while (atomic_read(&pm8001_dev->running_req))
msleep(20); msleep(20);
spin_lock_irqsave(&pm8001_ha->lock, flags); spin_lock_irqsave(&pm8001_ha->lock, flags);
...@@ -1014,8 +1014,8 @@ int pm8001_I_T_nexus_reset(struct domain_device *dev) ...@@ -1014,8 +1014,8 @@ int pm8001_I_T_nexus_reset(struct domain_device *dev)
goto out; goto out;
} }
msleep(2000); msleep(2000);
rc = pm8001_exec_internal_task_abort(pm8001_ha, pm8001_dev , rc = pm8001_exec_internal_task_abort(pm8001_ha, pm8001_dev,
dev, 1, 0); dev, 1, 0);
if (rc) { if (rc) {
pm8001_dbg(pm8001_ha, EH, "task abort failed %x\n" pm8001_dbg(pm8001_ha, EH, "task abort failed %x\n"
"with rc %d\n", pm8001_dev->device_id, rc); "with rc %d\n", pm8001_dev->device_id, rc);
...@@ -1060,8 +1060,8 @@ int pm8001_I_T_nexus_event_handler(struct domain_device *dev) ...@@ -1060,8 +1060,8 @@ int pm8001_I_T_nexus_event_handler(struct domain_device *dev)
goto out; goto out;
} }
/* send internal ssp/sata/smp abort command to FW */ /* send internal ssp/sata/smp abort command to FW */
rc = pm8001_exec_internal_task_abort(pm8001_ha, pm8001_dev , rc = pm8001_exec_internal_task_abort(pm8001_ha, pm8001_dev,
dev, 1, 0); dev, 1, 0);
msleep(100); msleep(100);
/* deregister the target device */ /* deregister the target device */
...@@ -1076,8 +1076,8 @@ int pm8001_I_T_nexus_event_handler(struct domain_device *dev) ...@@ -1076,8 +1076,8 @@ int pm8001_I_T_nexus_event_handler(struct domain_device *dev)
wait_for_completion(&completion_setstate); wait_for_completion(&completion_setstate);
} else { } else {
/* send internal ssp/sata/smp abort command to FW */ /* send internal ssp/sata/smp abort command to FW */
rc = pm8001_exec_internal_task_abort(pm8001_ha, pm8001_dev , rc = pm8001_exec_internal_task_abort(pm8001_ha, pm8001_dev,
dev, 1, 0); dev, 1, 0);
msleep(100); msleep(100);
/* deregister the target device */ /* deregister the target device */
...@@ -1105,8 +1105,8 @@ int pm8001_lu_reset(struct domain_device *dev, u8 *lun) ...@@ -1105,8 +1105,8 @@ int pm8001_lu_reset(struct domain_device *dev, u8 *lun)
DECLARE_COMPLETION_ONSTACK(completion_setstate); DECLARE_COMPLETION_ONSTACK(completion_setstate);
if (dev_is_sata(dev)) { if (dev_is_sata(dev)) {
struct sas_phy *phy = sas_get_local_phy(dev); struct sas_phy *phy = sas_get_local_phy(dev);
rc = pm8001_exec_internal_task_abort(pm8001_ha, pm8001_dev , rc = pm8001_exec_internal_task_abort(pm8001_ha, pm8001_dev,
dev, 1, 0); dev, 1, 0);
rc = sas_phy_reset(phy, 1); rc = sas_phy_reset(phy, 1);
sas_put_local_phy(phy); sas_put_local_phy(phy);
pm8001_dev->setds_completion = &completion_setstate; pm8001_dev->setds_completion = &completion_setstate;
......
...@@ -704,7 +704,7 @@ int pm8001_mpi_reg_resp(struct pm8001_hba_info *pm8001_ha, void *piomb); ...@@ -704,7 +704,7 @@ int pm8001_mpi_reg_resp(struct pm8001_hba_info *pm8001_ha, void *piomb);
int pm8001_mpi_dereg_resp(struct pm8001_hba_info *pm8001_ha, void *piomb); int pm8001_mpi_dereg_resp(struct pm8001_hba_info *pm8001_ha, void *piomb);
int pm8001_mpi_fw_flash_update_resp(struct pm8001_hba_info *pm8001_ha, int pm8001_mpi_fw_flash_update_resp(struct pm8001_hba_info *pm8001_ha,
void *piomb); void *piomb);
int pm8001_mpi_general_event(struct pm8001_hba_info *pm8001_ha , void *piomb); int pm8001_mpi_general_event(struct pm8001_hba_info *pm8001_ha, void *piomb);
int pm8001_mpi_task_abort_resp(struct pm8001_hba_info *pm8001_ha, void *piomb); int pm8001_mpi_task_abort_resp(struct pm8001_hba_info *pm8001_ha, void *piomb);
struct sas_task *pm8001_alloc_task(void); struct sas_task *pm8001_alloc_task(void);
void pm8001_task_done(struct sas_task *task); void pm8001_task_done(struct sas_task *task);
......
...@@ -90,7 +90,7 @@ ssize_t pm80xx_get_fatal_dump(struct device *cdev, ...@@ -90,7 +90,7 @@ ssize_t pm80xx_get_fatal_dump(struct device *cdev,
struct sas_ha_struct *sha = SHOST_TO_SAS_HA(shost); struct sas_ha_struct *sha = SHOST_TO_SAS_HA(shost);
struct pm8001_hba_info *pm8001_ha = sha->lldd_ha; struct pm8001_hba_info *pm8001_ha = sha->lldd_ha;
void __iomem *fatal_table_address = pm8001_ha->fatal_tbl_addr; void __iomem *fatal_table_address = pm8001_ha->fatal_tbl_addr;
u32 accum_len , reg_val, index, *temp; u32 accum_len, reg_val, index, *temp;
u32 status = 1; u32 status = 1;
unsigned long start; unsigned long start;
u8 *direct_data; u8 *direct_data;
...@@ -1904,7 +1904,7 @@ static void pm80xx_send_read_log(struct pm8001_hba_info *pm8001_ha, ...@@ -1904,7 +1904,7 @@ static void pm80xx_send_read_log(struct pm8001_hba_info *pm8001_ha,
* that the task has been finished. * that the task has been finished.
*/ */
static void static void
mpi_ssp_completion(struct pm8001_hba_info *pm8001_ha , void *piomb) mpi_ssp_completion(struct pm8001_hba_info *pm8001_ha, void *piomb)
{ {
struct sas_task *t; struct sas_task *t;
struct pm8001_ccb_info *ccb; struct pm8001_ccb_info *ccb;
...@@ -2194,7 +2194,7 @@ mpi_ssp_completion(struct pm8001_hba_info *pm8001_ha , void *piomb) ...@@ -2194,7 +2194,7 @@ mpi_ssp_completion(struct pm8001_hba_info *pm8001_ha , void *piomb)
} }
/*See the comments for mpi_ssp_completion */ /*See the comments for mpi_ssp_completion */
static void mpi_ssp_event(struct pm8001_hba_info *pm8001_ha , void *piomb) static void mpi_ssp_event(struct pm8001_hba_info *pm8001_ha, void *piomb)
{ {
struct sas_task *t; struct sas_task *t;
unsigned long flags; unsigned long flags;
...@@ -2444,9 +2444,9 @@ mpi_sata_completion(struct pm8001_hba_info *pm8001_ha, void *piomb) ...@@ -2444,9 +2444,9 @@ mpi_sata_completion(struct pm8001_hba_info *pm8001_ha, void *piomb)
(status != IO_UNDERFLOW)) { (status != IO_UNDERFLOW)) {
if (!((t->dev->parent) && if (!((t->dev->parent) &&
(dev_is_expander(t->dev->parent->dev_type)))) { (dev_is_expander(t->dev->parent->dev_type)))) {
for (i = 0 , j = 4; i <= 3 && j <= 7; i++ , j++) for (i = 0, j = 4; i <= 3 && j <= 7; i++, j++)
sata_addr_low[i] = pm8001_ha->sas_addr[j]; sata_addr_low[i] = pm8001_ha->sas_addr[j];
for (i = 0 , j = 0; i <= 3 && j <= 3; i++ , j++) for (i = 0, j = 0; i <= 3 && j <= 3; i++, j++)
sata_addr_hi[i] = pm8001_ha->sas_addr[j]; sata_addr_hi[i] = pm8001_ha->sas_addr[j];
memcpy(&temp_sata_addr_low, sata_addr_low, memcpy(&temp_sata_addr_low, sata_addr_low,
sizeof(sata_addr_low)); sizeof(sata_addr_low));
...@@ -2788,7 +2788,7 @@ mpi_sata_completion(struct pm8001_hba_info *pm8001_ha, void *piomb) ...@@ -2788,7 +2788,7 @@ mpi_sata_completion(struct pm8001_hba_info *pm8001_ha, void *piomb)
} }
/*See the comments for mpi_ssp_completion */ /*See the comments for mpi_ssp_completion */
static void mpi_sata_event(struct pm8001_hba_info *pm8001_ha , void *piomb) static void mpi_sata_event(struct pm8001_hba_info *pm8001_ha, void *piomb)
{ {
struct sas_task *t; struct sas_task *t;
struct task_status_struct *ts; struct task_status_struct *ts;
...@@ -4918,7 +4918,7 @@ static void mpi_set_phy_profile_req(struct pm8001_hba_info *pm8001_ha, ...@@ -4918,7 +4918,7 @@ static void mpi_set_phy_profile_req(struct pm8001_hba_info *pm8001_ha,
u32 operation, u32 phyid, u32 operation, u32 phyid,
u32 length, u32 *buf) u32 length, u32 *buf)
{ {
u32 tag , i, j = 0; u32 tag, i, j = 0;
int rc; int rc;
struct set_phy_profile_req payload; struct set_phy_profile_req payload;
struct inbound_queue_table *circularQ; struct inbound_queue_table *circularQ;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment