diff mbox series

[v2,2/2] PCI: endpoint: Add kdoc description of pci_epf_type_add_cfs()

Message ID 20230515074348.595704-3-dlemoal@kernel.org
State New
Headers show
Series Fixup changes to pci_epf_type_add_cfs() | expand

Commit Message

Damien Le Moal May 15, 2023, 7:43 a.m. UTC
Restore an improve the kdoc function description for
pci_epf_type_add_cfs() that was removed with commit
893f14fed7d3 ("PCI: endpoint: Move pci_epf_type_add_cfs() code").

Fixes: 893f14fed7d3 ("PCI: endpoint: Move pci_epf_type_add_cfs() code")
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
---
 drivers/pci/endpoint/pci-ep-cfs.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

Comments

Manivannan Sadhasivam May 17, 2023, 7:45 a.m. UTC | #1
On Mon, May 15, 2023 at 04:43:48PM +0900, Damien Le Moal wrote:
> Restore an improve the kdoc function description for
> pci_epf_type_add_cfs() that was removed with commit
> 893f14fed7d3 ("PCI: endpoint: Move pci_epf_type_add_cfs() code").
> 
> Fixes: 893f14fed7d3 ("PCI: endpoint: Move pci_epf_type_add_cfs() code")
> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>

Reviewed-by: Manivannan Sadhasivami <manivannan.sadhasivam@linaro.org>

- Mani

> ---
>  drivers/pci/endpoint/pci-ep-cfs.c | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/drivers/pci/endpoint/pci-ep-cfs.c b/drivers/pci/endpoint/pci-ep-cfs.c
> index 0bf5be986e9b..be042c3f50b5 100644
> --- a/drivers/pci/endpoint/pci-ep-cfs.c
> +++ b/drivers/pci/endpoint/pci-ep-cfs.c
> @@ -509,6 +509,22 @@ static const struct config_item_type pci_epf_type = {
>  	.ct_owner	= THIS_MODULE,
>  };
>  
> +/**
> + * pci_epf_type_add_cfs() - Help function drivers to expose function specific   
> + *                          attributes in configfs
> + * @epf: the EPF device that has to be configured using configfs
> + * @group: the parent configfs group (corresponding to entries in
> + *         pci_epf_device_id)
> + *
> + * Invoke to expose function specific attributes in configfs.
> + *
> + * Return: A pointer to a config_group structure or NULL if the function driver
> + * does not have anything to expose (attributes configured by user) or if the
> + * the function driver does not implement the add_cfs() method.
> + *
> + * Returns an error pointer if this function is called for an unbound EPF device
> + * or if the EPF driver add_cfs() method fails.
> + */
>  static struct config_group *pci_epf_type_add_cfs(struct pci_epf *epf,
>  						 struct config_group *group)
>  {
> -- 
> 2.40.1
>
diff mbox series

Patch

diff --git a/drivers/pci/endpoint/pci-ep-cfs.c b/drivers/pci/endpoint/pci-ep-cfs.c
index 0bf5be986e9b..be042c3f50b5 100644
--- a/drivers/pci/endpoint/pci-ep-cfs.c
+++ b/drivers/pci/endpoint/pci-ep-cfs.c
@@ -509,6 +509,22 @@  static const struct config_item_type pci_epf_type = {
 	.ct_owner	= THIS_MODULE,
 };
 
+/**
+ * pci_epf_type_add_cfs() - Help function drivers to expose function specific   
+ *                          attributes in configfs
+ * @epf: the EPF device that has to be configured using configfs
+ * @group: the parent configfs group (corresponding to entries in
+ *         pci_epf_device_id)
+ *
+ * Invoke to expose function specific attributes in configfs.
+ *
+ * Return: A pointer to a config_group structure or NULL if the function driver
+ * does not have anything to expose (attributes configured by user) or if the
+ * the function driver does not implement the add_cfs() method.
+ *
+ * Returns an error pointer if this function is called for an unbound EPF device
+ * or if the EPF driver add_cfs() method fails.
+ */
 static struct config_group *pci_epf_type_add_cfs(struct pci_epf *epf,
 						 struct config_group *group)
 {