Commit a0cf5ce4 authored by Lee Jones's avatar Lee Jones Committed by Martin K. Petersen

scsi: pm8001: Move function header and supply some missing parameter descriptions

Functions must follow directly after the header that documents them.

Fixes the following W=1 kernel build warning(s):

from  drivers/scsi/pm8001/pm8001_sas.c:41:
inlined from ‘pm8001_issue_ssp_tmf’ at  drivers/scsi/pm8001/pm8001_sas.c:919:2:
 drivers/scsi/pm8001/pm8001_sas.c:379: warning: Function parameter or member 'pm8001_dev' not described in 'DEV_IS_GONE'
 drivers/scsi/pm8001/pm8001_sas.c:379: warning: Excess function parameter 'task' description in 'DEV_IS_GONE'
 drivers/scsi/pm8001/pm8001_sas.c:379: warning: Excess function parameter 'num' description in 'DEV_IS_GONE'
 drivers/scsi/pm8001/pm8001_sas.c:379: warning: Excess function parameter 'gfp_flags' description in 'DEV_IS_GONE'
 drivers/scsi/pm8001/pm8001_sas.c:379: warning: Excess function parameter 'is_tmf' description in 'DEV_IS_GONE'
 drivers/scsi/pm8001/pm8001_sas.c:379: warning: Excess function parameter 'tmf' description in 'DEV_IS_GONE'
 drivers/scsi/pm8001/pm8001_sas.c:583: warning: Function parameter or member 'device_id' not described in 'pm8001_find_dev'
 drivers/scsi/pm8001/pm8001_sas.c:1000: warning: Function parameter or member 'dev' not described in 'pm8001_I_T_nexus_reset'

Link: https://lore.kernel.org/r/20200721164148.2617584-11-lee.jones@linaro.org
Cc: Jack Wang <jinpu.wang@cloud.ionos.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 45c21cec
...@@ -129,6 +129,7 @@ int pm8001_mem_alloc(struct pci_dev *pdev, void **virt_addr, ...@@ -129,6 +129,7 @@ int pm8001_mem_alloc(struct pci_dev *pdev, void **virt_addr,
*pphys_addr_lo = lower_32_bits(phys_align); *pphys_addr_lo = lower_32_bits(phys_align);
return 0; return 0;
} }
/** /**
* pm8001_find_ha_by_dev - from domain device which come from sas layer to * pm8001_find_ha_by_dev - from domain device which come from sas layer to
* find out our hba struct. * find out our hba struct.
...@@ -366,17 +367,15 @@ static int sas_find_local_port_id(struct domain_device *dev) ...@@ -366,17 +367,15 @@ static int sas_find_local_port_id(struct domain_device *dev)
return 0; return 0;
} }
#define DEV_IS_GONE(pm8001_dev) \
((!pm8001_dev || (pm8001_dev->dev_type == SAS_PHY_UNUSED)))
/** /**
* pm8001_task_exec - queue the task(ssp, smp && ata) to the hardware. * pm8001_task_exec - queue the task(ssp, smp && ata) to the hardware.
* @task: the task to be execute. * @task: the task to be execute.
* @num: if can_queue great than 1, the task can be queued up. for SMP task,
* we always execute one one time.
* @gfp_flags: gfp_flags. * @gfp_flags: gfp_flags.
* @is_tmf: if it is task management task. * @is_tmf: if it is task management task.
* @tmf: the task management IU * @tmf: the task management IU
*/ */
#define DEV_IS_GONE(pm8001_dev) \
((!pm8001_dev || (pm8001_dev->dev_type == SAS_PHY_UNUSED)))
static int pm8001_task_exec(struct sas_task *task, static int pm8001_task_exec(struct sas_task *task,
gfp_t gfp_flags, int is_tmf, struct pm8001_tmf_task *tmf) gfp_t gfp_flags, int is_tmf, struct pm8001_tmf_task *tmf)
{ {
...@@ -577,6 +576,7 @@ static struct pm8001_device *pm8001_alloc_dev(struct pm8001_hba_info *pm8001_ha) ...@@ -577,6 +576,7 @@ static struct pm8001_device *pm8001_alloc_dev(struct pm8001_hba_info *pm8001_ha)
/** /**
* pm8001_find_dev - find a matching pm8001_device * pm8001_find_dev - find a matching pm8001_device
* @pm8001_ha: our hba card information * @pm8001_ha: our hba card information
* @device_id: device ID to match against
*/ */
struct pm8001_device *pm8001_find_dev(struct pm8001_hba_info *pm8001_ha, struct pm8001_device *pm8001_find_dev(struct pm8001_hba_info *pm8001_ha,
u32 device_id) u32 device_id)
...@@ -995,6 +995,7 @@ void pm8001_open_reject_retry( ...@@ -995,6 +995,7 @@ void pm8001_open_reject_retry(
/** /**
* Standard mandates link reset for ATA (type 0) and hard reset for * Standard mandates link reset for ATA (type 0) and hard reset for
* SSP (type 1) , only for RECOVERY * SSP (type 1) , only for RECOVERY
* @dev: the device structure for the device to reset.
*/ */
int pm8001_I_T_nexus_reset(struct domain_device *dev) int pm8001_I_T_nexus_reset(struct domain_device *dev)
{ {
......
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