Skip to content

Commit bb6beab

Browse files
rddunlapmartinkpetersen
authored andcommitted
scsi: pm8001: Clean up kernel-doc and comments
Fix kernel-doc warnings then test again, wash, rinse, find more, then repeat more/again. Also fix spellos, some grammar, and some punctuation. ../drivers/scsi/pm8001/pm8001_ctl.c:557: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst ** pm8001_ctl_fatal_log_show - fatal error logging ../drivers/scsi/pm8001/pm8001_ctl.c:577: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst ** non_fatal_log_show - non fatal error logging ../drivers/scsi/pm8001/pm8001_ctl.c:622: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst ** pm8001_ctl_gsm_log_show - gsm dump collection Link: https://lore.kernel.org/r/[email protected] Cc: Jack Wang <[email protected]> Cc: [email protected] Cc: "James E.J. Bottomley" <[email protected]> Cc: "Martin K. Petersen" <[email protected]> Acked-by: Jack Wang <[email protected]> Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 8b3bdd9 commit bb6beab

File tree

5 files changed

+97
-89
lines changed

5 files changed

+97
-89
lines changed

drivers/scsi/pm8001/pm8001_ctl.c

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ DEVICE_ATTR(interface_rev, S_IRUGO, pm8001_ctl_mpi_interface_rev_show, NULL);
7777
* @attr: device attribute (unused)
7878
* @buf: the buffer returned
7979
*
80-
* A sysfs 'read only' shost attribute.
80+
* A sysfs 'read-only' shost attribute.
8181
*/
8282
static ssize_t controller_fatal_error_show(struct device *cdev,
8383
struct device_attribute *attr, char *buf)
@@ -149,7 +149,7 @@ static ssize_t pm8001_ctl_ila_version_show(struct device *cdev,
149149
static DEVICE_ATTR(ila_version, 0444, pm8001_ctl_ila_version_show, NULL);
150150

151151
/**
152-
* pm8001_ctl_inactive_fw_version_show - Inacative firmware version number
152+
* pm8001_ctl_inactive_fw_version_show - Inactive firmware version number
153153
* @cdev: pointer to embedded class device
154154
* @attr: device attribute (unused)
155155
* @buf: the buffer returned
@@ -396,6 +396,7 @@ static DEVICE_ATTR(aap_log, S_IRUGO, pm8001_ctl_aap_log_show, NULL);
396396
* @cdev:pointer to embedded class device
397397
* @attr: device attribute (unused)
398398
* @buf: the buffer returned
399+
*
399400
* A sysfs 'read-only' shost attribute.
400401
*/
401402
static ssize_t pm8001_ctl_ib_queue_log_show(struct device *cdev,
@@ -430,6 +431,7 @@ static DEVICE_ATTR(ib_log, S_IRUGO, pm8001_ctl_ib_queue_log_show, NULL);
430431
* @cdev:pointer to embedded class device
431432
* @attr: device attribute (unused)
432433
* @buf: the buffer returned
434+
*
433435
* A sysfs 'read-only' shost attribute.
434436
*/
435437

@@ -464,6 +466,7 @@ static DEVICE_ATTR(ob_log, S_IRUGO, pm8001_ctl_ob_queue_log_show, NULL);
464466
* @cdev:pointer to embedded class device
465467
* @attr: device attribute (unused)
466468
* @buf:the buffer returned
469+
*
467470
* A sysfs 'read-only' shost attribute.
468471
*/
469472
static ssize_t pm8001_ctl_bios_version_show(struct device *cdev,
@@ -555,13 +558,13 @@ static ssize_t pm8001_ctl_iop_log_show(struct device *cdev,
555558
static DEVICE_ATTR(iop_log, S_IRUGO, pm8001_ctl_iop_log_show, NULL);
556559

557560
/**
558-
** pm8001_ctl_fatal_log_show - fatal error logging
559-
** @cdev:pointer to embedded class device
560-
** @attr: device attribute
561-
** @buf: the buffer returned
562-
**
563-
** A sysfs 'read-only' shost attribute.
564-
**/
561+
* pm8001_ctl_fatal_log_show - fatal error logging
562+
* @cdev:pointer to embedded class device
563+
* @attr: device attribute
564+
* @buf: the buffer returned
565+
*
566+
* A sysfs 'read-only' shost attribute.
567+
*/
565568

566569
static ssize_t pm8001_ctl_fatal_log_show(struct device *cdev,
567570
struct device_attribute *attr, char *buf)
@@ -575,13 +578,13 @@ static ssize_t pm8001_ctl_fatal_log_show(struct device *cdev,
575578
static DEVICE_ATTR(fatal_log, S_IRUGO, pm8001_ctl_fatal_log_show, NULL);
576579

577580
/**
578-
** non_fatal_log_show - non fatal error logging
579-
** @cdev:pointer to embedded class device
580-
** @attr: device attribute
581-
** @buf: the buffer returned
582-
**
583-
** A sysfs 'read-only' shost attribute.
584-
**/
581+
* non_fatal_log_show - non fatal error logging
582+
* @cdev:pointer to embedded class device
583+
* @attr: device attribute
584+
* @buf: the buffer returned
585+
*
586+
* A sysfs 'read-only' shost attribute.
587+
*/
585588
static ssize_t non_fatal_log_show(struct device *cdev,
586589
struct device_attribute *attr, char *buf)
587590
{
@@ -620,12 +623,13 @@ static ssize_t non_fatal_count_store(struct device *cdev,
620623
static DEVICE_ATTR_RW(non_fatal_count);
621624

622625
/**
623-
** pm8001_ctl_gsm_log_show - gsm dump collection
624-
** @cdev:pointer to embedded class device
625-
** @attr: device attribute (unused)
626-
** @buf: the buffer returned
627-
** A sysfs 'read-only' shost attribute.
628-
**/
626+
* pm8001_ctl_gsm_log_show - gsm dump collection
627+
* @cdev:pointer to embedded class device
628+
* @attr: device attribute (unused)
629+
* @buf: the buffer returned
630+
*
631+
* A sysfs 'read-only' shost attribute.
632+
*/
629633
static ssize_t pm8001_ctl_gsm_log_show(struct device *cdev,
630634
struct device_attribute *attr, char *buf)
631635
{

drivers/scsi/pm8001/pm8001_hwi.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ static void update_outbnd_queue_table(struct pm8001_hba_info *pm8001_ha,
384384

385385
/**
386386
* pm8001_bar4_shift - function is called to shift BAR base address
387-
* @pm8001_ha : our hba card infomation
387+
* @pm8001_ha : our hba card information
388388
* @shiftValue : shifting value in memory bar.
389389
*/
390390
int pm8001_bar4_shift(struct pm8001_hba_info *pm8001_ha, u32 shiftValue)
@@ -1151,7 +1151,7 @@ static void pm8001_hw_chip_rst(struct pm8001_hba_info *pm8001_ha)
11511151
}
11521152

11531153
/**
1154-
* pm8001_chip_iounmap - which maped when initialized.
1154+
* pm8001_chip_iounmap - which mapped when initialized.
11551155
* @pm8001_ha: our hba card information
11561156
*/
11571157
void pm8001_chip_iounmap(struct pm8001_hba_info *pm8001_ha)
@@ -1187,10 +1187,10 @@ pm8001_chip_intx_interrupt_enable(struct pm8001_hba_info *pm8001_ha)
11871187
pm8001_cw32(pm8001_ha, 0, MSGU_ODCR, ODCR_CLEAR_ALL);
11881188
}
11891189

1190-
/**
1191-
* pm8001_chip_intx_interrupt_disable- disable PM8001 chip interrupt
1192-
* @pm8001_ha: our hba card information
1193-
*/
1190+
/**
1191+
* pm8001_chip_intx_interrupt_disable - disable PM8001 chip interrupt
1192+
* @pm8001_ha: our hba card information
1193+
*/
11941194
static void
11951195
pm8001_chip_intx_interrupt_disable(struct pm8001_hba_info *pm8001_ha)
11961196
{
@@ -1876,8 +1876,8 @@ static void pm8001_send_read_log(struct pm8001_hba_info *pm8001_ha,
18761876
* @piomb: the message contents of this outbound message.
18771877
*
18781878
* When FW has completed a ssp request for example a IO request, after it has
1879-
* filled the SG data with the data, it will trigger this event represent
1880-
* that he has finished the job,please check the coresponding buffer.
1879+
* filled the SG data with the data, it will trigger this event representing
1880+
* that he has finished the job; please check the corresponding buffer.
18811881
* So we will tell the caller who maybe waiting the result to tell upper layer
18821882
* that the task has been finished.
18831883
*/
@@ -3522,7 +3522,7 @@ hw_event_phy_down(struct pm8001_hba_info *pm8001_ha, void *piomb)
35223522
*
35233523
* when sas layer find a device it will notify LLDD, then the driver register
35243524
* the domain device to FW, this event is the return device ID which the FW
3525-
* has assigned, from now,inter-communication with FW is no longer using the
3525+
* has assigned, from now, inter-communication with FW is no longer using the
35263526
* SAS address, use device ID which FW assigned.
35273527
*/
35283528
int pm8001_mpi_reg_resp(struct pm8001_hba_info *pm8001_ha, void *piomb)

drivers/scsi/pm8001/pm8001_init.c

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ static irqreturn_t pm8001_interrupt_handler_msix(int irq, void *opaque)
233233
/**
234234
* pm8001_interrupt_handler_intx - main INTx interrupt handler.
235235
* @irq: interrupt number
236-
* @dev_id: sas_ha structure. The HBA is retrieved from sas_has structure.
236+
* @dev_id: sas_ha structure. The HBA is retrieved from sas_ha structure.
237237
*/
238238

239239
static irqreturn_t pm8001_interrupt_handler_intx(int irq, void *dev_id)
@@ -439,9 +439,9 @@ static int pm8001_alloc(struct pm8001_hba_info *pm8001_ha,
439439
}
440440

441441
/**
442-
* pm8001_ioremap - remap the pci high physical address to kernal virtual
442+
* pm8001_ioremap - remap the pci high physical address to kernel virtual
443443
* address so that we can access them.
444-
* @pm8001_ha:our hba structure.
444+
* @pm8001_ha: our hba structure.
445445
*/
446446
static int pm8001_ioremap(struct pm8001_hba_info *pm8001_ha)
447447
{
@@ -652,7 +652,7 @@ static void pm8001_post_sas_ha_init(struct Scsi_Host *shost,
652652
* pm8001_init_sas_add - initialize sas address
653653
* @pm8001_ha: our ha struct.
654654
*
655-
* Currently we just set the fixed SAS address to our HBA,for manufacture,
655+
* Currently we just set the fixed SAS address to our HBA, for manufacture,
656656
* it should read from the EEPROM
657657
*/
658658
static void pm8001_init_sas_add(struct pm8001_hba_info *pm8001_ha)
@@ -790,7 +790,7 @@ struct pm8001_mpi3_phy_pg_trx_config {
790790
};
791791

792792
/**
793-
* pm8001_get_internal_phy_settings : Retrieves the internal PHY settings
793+
* pm8001_get_internal_phy_settings - Retrieves the internal PHY settings
794794
* @pm8001_ha : our adapter
795795
* @phycfg : PHY config page to populate
796796
*/
@@ -810,7 +810,7 @@ void pm8001_get_internal_phy_settings(struct pm8001_hba_info *pm8001_ha,
810810
}
811811

812812
/**
813-
* pm8001_get_external_phy_settings : Retrieves the external PHY settings
813+
* pm8001_get_external_phy_settings - Retrieves the external PHY settings
814814
* @pm8001_ha : our adapter
815815
* @phycfg : PHY config page to populate
816816
*/
@@ -830,7 +830,7 @@ void pm8001_get_external_phy_settings(struct pm8001_hba_info *pm8001_ha,
830830
}
831831

832832
/**
833-
* pm8001_get_phy_mask : Retrieves the mask that denotes if a PHY is int/ext
833+
* pm8001_get_phy_mask - Retrieves the mask that denotes if a PHY is int/ext
834834
* @pm8001_ha : our adapter
835835
* @phymask : The PHY mask
836836
*/
@@ -868,7 +868,7 @@ void pm8001_get_phy_mask(struct pm8001_hba_info *pm8001_ha, int *phymask)
868868
}
869869

870870
/**
871-
* pm8001_set_phy_settings_ven_117c_12G() : Configure ATTO 12Gb PHY settings
871+
* pm8001_set_phy_settings_ven_117c_12G() - Configure ATTO 12Gb PHY settings
872872
* @pm8001_ha : our adapter
873873
*/
874874
static
@@ -903,7 +903,7 @@ int pm8001_set_phy_settings_ven_117c_12G(struct pm8001_hba_info *pm8001_ha)
903903
}
904904

905905
/**
906-
* pm8001_configure_phy_settings : Configures PHY settings based on vendor ID.
906+
* pm8001_configure_phy_settings - Configures PHY settings based on vendor ID.
907907
* @pm8001_ha : our hba.
908908
*/
909909
static int pm8001_configure_phy_settings(struct pm8001_hba_info *pm8001_ha)
@@ -1053,8 +1053,8 @@ static u32 pm8001_request_irq(struct pm8001_hba_info *pm8001_ha)
10531053
* @ent: pci device id
10541054
*
10551055
* This function is the main initialization function, when register a new
1056-
* pci driver it is invoked, all struct an hardware initilization should be done
1057-
* here, also, register interrupt
1056+
* pci driver it is invoked, all struct and hardware initialization should be
1057+
* done here, also, register interrupt.
10581058
*/
10591059
static int pm8001_pci_probe(struct pci_dev *pdev,
10601060
const struct pci_device_id *ent)
@@ -1172,10 +1172,11 @@ static int pm8001_pci_probe(struct pci_dev *pdev,
11721172
return rc;
11731173
}
11741174

1175-
/*
1175+
/**
11761176
* pm8001_init_ccb_tag - allocate memory to CCB and tag.
11771177
* @pm8001_ha: our hba card information.
11781178
* @shost: scsi host which has been allocated outside.
1179+
* @pdev: pci device.
11791180
*/
11801181
static int
11811182
pm8001_init_ccb_tag(struct pm8001_hba_info *pm8001_ha, struct Scsi_Host *shost,
@@ -1270,7 +1271,7 @@ static void pm8001_pci_remove(struct pci_dev *pdev)
12701271
* pm8001_pci_suspend - power management suspend main entry point
12711272
* @dev: Device struct
12721273
*
1273-
* Returns 0 success, anything else error.
1274+
* Return: 0 on success, anything else on error.
12741275
*/
12751276
static int __maybe_unused pm8001_pci_suspend(struct device *dev)
12761277
{
@@ -1315,7 +1316,7 @@ static int __maybe_unused pm8001_pci_suspend(struct device *dev)
13151316
* pm8001_pci_resume - power management resume main entry point
13161317
* @dev: Device struct
13171318
*
1318-
* Returns 0 success, anything else error.
1319+
* Return: 0 on success, anything else on error.
13191320
*/
13201321
static int __maybe_unused pm8001_pci_resume(struct device *dev)
13211322
{

drivers/scsi/pm8001/pm8001_sas.c

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,16 @@ void pm8001_tag_init(struct pm8001_hba_info *pm8001_ha)
9898
pm8001_tag_free(pm8001_ha, i);
9999
}
100100

101-
/**
102-
* pm8001_mem_alloc - allocate memory for pm8001.
103-
* @pdev: pci device.
104-
* @virt_addr: the allocated virtual address
105-
* @pphys_addr_hi: the physical address high byte address.
106-
* @pphys_addr_lo: the physical address low byte address.
107-
* @mem_size: memory size.
108-
*/
101+
/**
102+
* pm8001_mem_alloc - allocate memory for pm8001.
103+
* @pdev: pci device.
104+
* @virt_addr: the allocated virtual address
105+
* @pphys_addr: DMA address for this device
106+
* @pphys_addr_hi: the physical address high byte address.
107+
* @pphys_addr_lo: the physical address low byte address.
108+
* @mem_size: memory size.
109+
* @align: requested byte alignment
110+
*/
109111
int pm8001_mem_alloc(struct pci_dev *pdev, void **virt_addr,
110112
dma_addr_t *pphys_addr, u32 *pphys_addr_hi,
111113
u32 *pphys_addr_lo, u32 mem_size, u32 align)
@@ -339,7 +341,7 @@ static int pm8001_task_prep_ssp_tm(struct pm8001_hba_info *pm8001_ha,
339341
}
340342

341343
/**
342-
* pm8001_task_prep_ssp - the dispatcher function,prepare ssp data for ssp task
344+
* pm8001_task_prep_ssp - the dispatcher function, prepare ssp data for ssp task
343345
* @pm8001_ha: our hba card information
344346
* @ccb: the ccb which attached to ssp task
345347
*/
@@ -554,10 +556,10 @@ void pm8001_ccb_task_free(struct pm8001_hba_info *pm8001_ha,
554556
pm8001_tag_free(pm8001_ha, ccb_idx);
555557
}
556558

557-
/**
558-
* pm8001_alloc_dev - find a empty pm8001_device
559-
* @pm8001_ha: our hba card information
560-
*/
559+
/**
560+
* pm8001_alloc_dev - find a empty pm8001_device
561+
* @pm8001_ha: our hba card information
562+
*/
561563
static struct pm8001_device *pm8001_alloc_dev(struct pm8001_hba_info *pm8001_ha)
562564
{
563565
u32 dev;
@@ -705,7 +707,7 @@ static void pm8001_tmf_timedout(struct timer_list *t)
705707
* @parameter: ssp task parameter.
706708
*
707709
* when errors or exception happened, we may want to do something, for example
708-
* abort the issued task which result in this execption, it is done by calling
710+
* abort the issued task which result in this exception, it is done by calling
709711
* this function, note it is also with the task execute interface.
710712
*/
711713
static int pm8001_exec_internal_tmf_task(struct domain_device *dev,
@@ -984,11 +986,12 @@ void pm8001_open_reject_retry(
984986
}
985987

986988
/**
987-
* pm8001_I_T_nexus_reset()
988-
* Standard mandates link reset for ATA (type 0) and hard reset for
989-
* SSP (type 1) , only for RECOVERY
990-
* @dev: the device structure for the device to reset.
991-
*/
989+
* pm8001_I_T_nexus_reset() - reset the initiator/target connection
990+
* @dev: the device structure for the device to reset.
991+
*
992+
* Standard mandates link reset for ATA (type 0) and hard reset for
993+
* SSP (type 1), only for RECOVERY
994+
*/
992995
int pm8001_I_T_nexus_reset(struct domain_device *dev)
993996
{
994997
int rc = TMF_RESP_FUNC_FAILED;

0 commit comments

Comments
 (0)