Skip to content

Commit

Permalink
drivers/pci: fix style issues in function headers
Browse files Browse the repository at this point in the history
fix style issues in function headers, add missing new lines
  • Loading branch information
raiden00pl committed Nov 14, 2024
1 parent d260e7f commit 0061dc3
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 0 deletions.
24 changes: 24 additions & 0 deletions drivers/pci/pci_epc.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ static struct list_node g_pci_epc_device_list =
*
* Returned Value:
* Return epc created if success, NULL if failed
*
****************************************************************************/

FAR struct pci_epc_ctrl_s *pci_get_epc(FAR const char *epc_name)
Expand Down Expand Up @@ -112,6 +113,7 @@ FAR struct pci_epc_ctrl_s *pci_get_epc(FAR const char *epc_name)
*
* Returned Value:
* Return the member if success, negative if failed
*
****************************************************************************/

int pci_epc_get_next_free_bar(
Expand Down Expand Up @@ -166,6 +168,7 @@ int pci_epc_get_next_free_bar(
*
* Returned Value:
* Epc features if success, NULL if failed
*
****************************************************************************/

FAR const struct pci_epc_features_s *
Expand Down Expand Up @@ -199,6 +202,7 @@ pci_epc_get_features(FAR struct pci_epc_ctrl_s *epc, uint8_t funcno)
*
* Returned Value:
* None
*
****************************************************************************/

void pci_epc_stop(FAR struct pci_epc_ctrl_s *epc)
Expand Down Expand Up @@ -226,6 +230,7 @@ void pci_epc_stop(FAR struct pci_epc_ctrl_s *epc)
*
* Returned Value:
* Return 0 if success, negative if failed
*
****************************************************************************/

int pci_epc_start(FAR struct pci_epc_ctrl_s *epc)
Expand Down Expand Up @@ -260,6 +265,7 @@ int pci_epc_start(FAR struct pci_epc_ctrl_s *epc)
*
* Returned Value:
* Return 0 if success, negative if failed
*
****************************************************************************/

int pci_epc_raise_irq(FAR struct pci_epc_ctrl_s *epc, uint8_t funcno,
Expand Down Expand Up @@ -307,6 +313,7 @@ int pci_epc_raise_irq(FAR struct pci_epc_ctrl_s *epc, uint8_t funcno,
*
* Returned Value:
* Return 0 if success, negative if failed
*
****************************************************************************/

int pci_epc_map_msi_irq(FAR struct pci_epc_ctrl_s *epc, uint8_t funcno,
Expand Down Expand Up @@ -352,6 +359,7 @@ int pci_epc_map_msi_irq(FAR struct pci_epc_ctrl_s *epc, uint8_t funcno,
*
* Returned Value:
* Return interrupt number if success, negative if failed
*
****************************************************************************/

int pci_epc_get_msi(FAR struct pci_epc_ctrl_s *epc, uint8_t funcno)
Expand Down Expand Up @@ -397,6 +405,7 @@ int pci_epc_get_msi(FAR struct pci_epc_ctrl_s *epc, uint8_t funcno)
*
* Returned Value:
* Return 0 if success, negative if failed
*
****************************************************************************/

int pci_epc_set_msi(FAR struct pci_epc_ctrl_s *epc, uint8_t funcno,
Expand Down Expand Up @@ -438,6 +447,7 @@ int pci_epc_set_msi(FAR struct pci_epc_ctrl_s *epc, uint8_t funcno,
*
* Returned Value:
* Return interrupt + 1 number if success, negative if failed
*
****************************************************************************/

int pci_epc_get_msix(FAR struct pci_epc_ctrl_s *epc, uint8_t funcno)
Expand Down Expand Up @@ -484,6 +494,7 @@ int pci_epc_get_msix(FAR struct pci_epc_ctrl_s *epc, uint8_t funcno)
*
* Returned Value:
* Return 0 if success, negative if failed
*
****************************************************************************/

int pci_epc_set_msix(FAR struct pci_epc_ctrl_s *epc, uint8_t funcno,
Expand Down Expand Up @@ -519,6 +530,7 @@ int pci_epc_set_msix(FAR struct pci_epc_ctrl_s *epc, uint8_t funcno,
*
* Returned Value:
* None
*
****************************************************************************/

void pci_epc_unmap_addr(FAR struct pci_epc_ctrl_s *epc, uint8_t funcno,
Expand Down Expand Up @@ -552,6 +564,7 @@ void pci_epc_unmap_addr(FAR struct pci_epc_ctrl_s *epc, uint8_t funcno,
*
* Returned Value:
* Return 0 if success, negative if failed
*
****************************************************************************/

int pci_epc_map_addr(FAR struct pci_epc_ctrl_s *epc, uint8_t funcno,
Expand Down Expand Up @@ -587,6 +600,7 @@ int pci_epc_map_addr(FAR struct pci_epc_ctrl_s *epc, uint8_t funcno,
*
* Returned Value:
* None
*
****************************************************************************/

void pci_epc_clear_bar(FAR struct pci_epc_ctrl_s *epc, uint8_t funcno,
Expand Down Expand Up @@ -620,6 +634,7 @@ void pci_epc_clear_bar(FAR struct pci_epc_ctrl_s *epc, uint8_t funcno,
*
* Returned Value:
* Return 0 if success, negative if failed
*
****************************************************************************/

int pci_epc_set_bar(FAR struct pci_epc_ctrl_s *epc, uint8_t funcno,
Expand Down Expand Up @@ -664,6 +679,7 @@ int pci_epc_set_bar(FAR struct pci_epc_ctrl_s *epc, uint8_t funcno,
*
* Returned Value:
* Return 0 if success, negative if failed
*
****************************************************************************/

int pci_epc_write_header(FAR struct pci_epc_ctrl_s *epc, uint8_t funcno,
Expand Down Expand Up @@ -702,6 +718,7 @@ int pci_epc_write_header(FAR struct pci_epc_ctrl_s *epc, uint8_t funcno,
*
* Returned Value:
* Return 0 if success, negative if failed
*
****************************************************************************/

int pci_epc_add_epf(FAR struct pci_epc_ctrl_s *epc,
Expand Down Expand Up @@ -753,6 +770,7 @@ int pci_epc_add_epf(FAR struct pci_epc_ctrl_s *epc,
*
* Returned Value:
* None
*
****************************************************************************/

void pci_epc_remove_epf(FAR struct pci_epc_ctrl_s *epc,
Expand Down Expand Up @@ -785,6 +803,7 @@ void pci_epc_remove_epf(FAR struct pci_epc_ctrl_s *epc,
*
* Returned Value:
* None
*
****************************************************************************/

void pci_epc_linkup(FAR struct pci_epc_ctrl_s *epc)
Expand Down Expand Up @@ -826,6 +845,7 @@ void pci_epc_linkup(FAR struct pci_epc_ctrl_s *epc)
*
* Returned Value:
* None
*
****************************************************************************/

void pci_epc_linkdown(FAR struct pci_epc_ctrl_s *epc)
Expand Down Expand Up @@ -867,6 +887,7 @@ void pci_epc_linkdown(FAR struct pci_epc_ctrl_s *epc)
*
* Returned Value:
* None
*
****************************************************************************/

void pci_epc_init_notify(FAR struct pci_epc_ctrl_s *epc)
Expand Down Expand Up @@ -908,6 +929,7 @@ void pci_epc_init_notify(FAR struct pci_epc_ctrl_s *epc)
*
* Returned Value:
* None
*
****************************************************************************/

void pci_epc_bme_notify(FAR struct pci_epc_ctrl_s *epc)
Expand Down Expand Up @@ -949,6 +971,7 @@ void pci_epc_bme_notify(FAR struct pci_epc_ctrl_s *epc)
*
* Returned Value:
* Return struct pci_epc_ctrl_s * if success, NULL if failed.
*
****************************************************************************/

FAR struct pci_epc_ctrl_s *
Expand Down Expand Up @@ -996,6 +1019,7 @@ pci_epc_create(FAR const char *name, FAR void *priv,
*
* Returned Value:
* None
*
****************************************************************************/

void pci_epc_destroy(FAR struct pci_epc_ctrl_s *epc)
Expand Down
6 changes: 6 additions & 0 deletions drivers/pci/pci_epc_mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
*
* Returned Value:
* Memory window alloced if success, NULL if failed
*
****************************************************************************/

static FAR struct pci_epc_mem_s *
Expand Down Expand Up @@ -91,6 +92,7 @@ pci_epc_mem_find(FAR struct pci_epc_ctrl_s *epc,
*
* Returned Value:
* 0 if success, negative if failed
*
****************************************************************************/

int pci_epc_mem_multi_init(FAR struct pci_epc_ctrl_s *epc,
Expand Down Expand Up @@ -162,6 +164,7 @@ int pci_epc_mem_multi_init(FAR struct pci_epc_ctrl_s *epc,
*
* Returned Value:
* 0 if success, negative if failed
*
****************************************************************************/

int pci_epc_mem_init(FAR struct pci_epc_ctrl_s *epc, FAR void *virt,
Expand Down Expand Up @@ -191,6 +194,7 @@ int pci_epc_mem_init(FAR struct pci_epc_ctrl_s *epc, FAR void *virt,
*
* Returned Value:
* None
*
****************************************************************************/

void pci_epc_mem_exit(FAR struct pci_epc_ctrl_s *epc)
Expand Down Expand Up @@ -229,6 +233,7 @@ void pci_epc_mem_exit(FAR struct pci_epc_ctrl_s *epc)
*
* Returned Value:
* The memory address alloced if success, NULL if failed
*
****************************************************************************/

FAR void *pci_epc_mem_alloc_addr(FAR struct pci_epc_ctrl_s *epc,
Expand Down Expand Up @@ -271,6 +276,7 @@ FAR void *pci_epc_mem_alloc_addr(FAR struct pci_epc_ctrl_s *epc,
*
* Returned Value:
* None
*
****************************************************************************/

void pci_epc_mem_free_addr(FAR struct pci_epc_ctrl_s *epc,
Expand Down
8 changes: 8 additions & 0 deletions drivers/pci/pci_epf.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ pci_epf_match_device(FAR struct pci_epf_device_s *dev,
*
* Returned Value:
* None
*
****************************************************************************/

static void pci_epf_unbind(FAR struct pci_epf_device_s *epf)
Expand Down Expand Up @@ -138,6 +139,7 @@ static void pci_epf_unbind(FAR struct pci_epf_device_s *epf)
*
* Returned Value:
* Return 0 if success, negative if failed
*
****************************************************************************/

static int pci_epf_bind(FAR struct pci_epf_device_s *epf)
Expand Down Expand Up @@ -180,6 +182,7 @@ static int pci_epf_bind(FAR struct pci_epf_device_s *epf)
*
* Returned Value:
* None
*
****************************************************************************/

void pci_epf_free_space(FAR struct pci_epf_device_s *epf,
Expand Down Expand Up @@ -220,6 +223,7 @@ void pci_epf_free_space(FAR struct pci_epf_device_s *epf,
*
* Returned Value:
* Return space address malloced if success, otherwise NULL
*
****************************************************************************/

FAR void *pci_epf_alloc_space(FAR struct pci_epf_device_s *epf, int barno,
Expand Down Expand Up @@ -285,6 +289,7 @@ FAR void *pci_epf_alloc_space(FAR struct pci_epf_device_s *epf, int barno,
*
* Returned Value:
* Return >= 0 if success, < 0 if failed
*
****************************************************************************/

int pci_epf_device_register(FAR struct pci_epf_device_s *epf)
Expand Down Expand Up @@ -356,6 +361,7 @@ int pci_epf_device_register(FAR struct pci_epf_device_s *epf)
*
* Returned Value:
* Return >= 0 if success, < 0 if failed
*
****************************************************************************/

int pci_epf_device_unregister(FAR struct pci_epf_device_s *epf)
Expand Down Expand Up @@ -399,6 +405,7 @@ int pci_epf_device_unregister(FAR struct pci_epf_device_s *epf)
*
* Returned Value:
* Return >= 0 if success, < 0 if failed
*
****************************************************************************/

int pci_epf_register_driver(FAR struct pci_epf_driver_s *drv)
Expand Down Expand Up @@ -484,6 +491,7 @@ int pci_epf_register_driver(FAR struct pci_epf_driver_s *drv)
*
* Returned Value:
* Return >= 0 if success, < 0 if failed
*
****************************************************************************/

int pci_epf_unregister_driver(FAR struct pci_epf_driver_s *drv)
Expand Down
11 changes: 11 additions & 0 deletions drivers/pci/pci_qemu_epc.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ static uint32_t pci_qep_func_base(FAR struct qemu_epc_s *qep,
*
* Returned Value:
* Return 0
*
****************************************************************************/

static int
Expand Down Expand Up @@ -330,6 +331,7 @@ qemu_epc_write_header(FAR struct pci_epc_ctrl_s *epc, uint8_t funcno,
*
* Returned Value:
* Return 0
*
****************************************************************************/

static int qemu_epc_set_bar(FAR struct pci_epc_ctrl_s *epc, uint8_t funcno,
Expand Down Expand Up @@ -364,6 +366,7 @@ static int qemu_epc_set_bar(FAR struct pci_epc_ctrl_s *epc, uint8_t funcno,
* epc - Device name of the endpoint controller
* funcno - The epc's function number
* bar - The bar is used mapping
*
****************************************************************************/

static void
Expand Down Expand Up @@ -395,6 +398,7 @@ qemu_epc_clear_bar(FAR struct pci_epc_ctrl_s *epc, uint8_t funcno,
*
* Returned Value:
* 0 if success, negative if failed
*
****************************************************************************/

static int qemu_epc_map_addr(FAR struct pci_epc_ctrl_s *epc, uint8_t funcno,
Expand Down Expand Up @@ -441,6 +445,7 @@ static int qemu_epc_map_addr(FAR struct pci_epc_ctrl_s *epc, uint8_t funcno,
* epc - Device name of the endpoint controller
* funcno - The epc's function number
* addr - The outbound phy addr
*
****************************************************************************/

static void
Expand Down Expand Up @@ -497,6 +502,7 @@ qemu_epc_get_bar_addr_from_funcno(FAR struct pci_epc_ctrl_s *epc,
*
* Returned Value:
* Return 0 if success, negative number if failed
*
****************************************************************************/

static int
Expand Down Expand Up @@ -607,6 +613,7 @@ qemu_epc_raise_irq(FAR struct pci_epc_ctrl_s *epc, uint8_t funcno,
*
* Returned Value:
* Return 0
*
****************************************************************************/

static int qemu_epc_start(FAR struct pci_epc_ctrl_s *epc)
Expand Down Expand Up @@ -651,6 +658,7 @@ qemu_epc_get_features(FAR struct pci_epc_ctrl_s *epc, uint8_t funcno)
*
* Returned Value:
* Return the number of interrupts
*
****************************************************************************/

static int qemu_epc_get_msi(FAR struct pci_epc_ctrl_s *epc, uint8_t funcno)
Expand Down Expand Up @@ -684,6 +692,7 @@ static int qemu_epc_get_msi(FAR struct pci_epc_ctrl_s *epc, uint8_t funcno)
*
* Returned Value:
* Return 0
*
****************************************************************************/

static int qemu_epc_set_msi(FAR struct pci_epc_ctrl_s *epc, uint8_t funcno,
Expand Down Expand Up @@ -714,6 +723,7 @@ static int qemu_epc_set_msi(FAR struct pci_epc_ctrl_s *epc, uint8_t funcno,
*
* Returned Value:
* Return the number of interrupts
*
****************************************************************************/

static int qemu_epc_get_msix(FAR struct pci_epc_ctrl_s *epc, uint8_t funcno)
Expand Down Expand Up @@ -748,6 +758,7 @@ static int qemu_epc_get_msix(FAR struct pci_epc_ctrl_s *epc, uint8_t funcno)
*
* Returned Value:
* Return 0
*
****************************************************************************/

static int qemu_epc_set_msix(FAR struct pci_epc_ctrl_s *epc, uint8_t funcno,
Expand Down
Loading

0 comments on commit 0061dc3

Please sign in to comment.