diff mbox series

[vfio] pds_core: Fix function header descriptions

Message ID 20230817224212.14266-1-brett.creeley@amd.com (mailing list archive)
State New, archived
Headers show
Series [vfio] pds_core: Fix function header descriptions | expand

Commit Message

Brett Creeley Aug. 17, 2023, 10:42 p.m. UTC
The pds-vfio-pci series made a small interface change to
pds_client_register() and pds_client_unregister(), but forgot to update
the function header descriptions. Fix that.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202308180411.OSqJPtMz-lkp@intel.com/
Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
Signed-off-by: Brett Creeley <brett.creeley@amd.com>
---
 drivers/net/ethernet/amd/pds_core/auxbus.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

kernel test robot Aug. 18, 2023, 4:09 a.m. UTC | #1
Hi Brett,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.5-rc6 next-20230817]
[cannot apply to horms-ipvs/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Brett-Creeley/pds_core-Fix-function-header-descriptions/20230818-064424
base:   linus/master
patch link:    https://lore.kernel.org/r/20230817224212.14266-1-brett.creeley%40amd.com
patch subject: [PATCH vfio] pds_core: Fix function header descriptions
config: powerpc-allyesconfig (https://download.01.org/0day-ci/archive/20230818/202308181138.U4cZ1nIO-lkp@intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230818/202308181138.U4cZ1nIO-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308181138.U4cZ1nIO-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/net/ethernet/amd/pds_core/auxbus.c:18: warning: Function parameter or member 'pf_pdev' not described in 'pds_client_register'
>> drivers/net/ethernet/amd/pds_core/auxbus.c:18: warning: Excess function parameter 'pf' description in 'pds_client_register'
>> drivers/net/ethernet/amd/pds_core/auxbus.c:63: warning: Function parameter or member 'pf_pdev' not described in 'pds_client_unregister'
>> drivers/net/ethernet/amd/pds_core/auxbus.c:63: warning: Excess function parameter 'pf' description in 'pds_client_unregister'


vim +18 drivers/net/ethernet/amd/pds_core/auxbus.c

4569cce43bc61e Shannon Nelson 2023-04-19   8  
10659034c62273 Shannon Nelson 2023-04-19   9  /**
10659034c62273 Shannon Nelson 2023-04-19  10   * pds_client_register - Link the client to the firmware
5808b1c50a443e Brett Creeley  2023-08-17  11   * @pf:		ptr to the PF driver's private data struct
10659034c62273 Shannon Nelson 2023-04-19  12   * @devname:	name that includes service into, e.g. pds_core.vDPA
10659034c62273 Shannon Nelson 2023-04-19  13   *
10659034c62273 Shannon Nelson 2023-04-19  14   * Return: 0 on success, or
10659034c62273 Shannon Nelson 2023-04-19  15   *         negative for error
10659034c62273 Shannon Nelson 2023-04-19  16   */
10659034c62273 Shannon Nelson 2023-04-19  17  int pds_client_register(struct pci_dev *pf_pdev, char *devname)
10659034c62273 Shannon Nelson 2023-04-19 @18  {
10659034c62273 Shannon Nelson 2023-04-19  19  	union pds_core_adminq_comp comp = {};
10659034c62273 Shannon Nelson 2023-04-19  20  	union pds_core_adminq_cmd cmd = {};
10659034c62273 Shannon Nelson 2023-04-19  21  	struct pdsc *pf;
10659034c62273 Shannon Nelson 2023-04-19  22  	int err;
10659034c62273 Shannon Nelson 2023-04-19  23  	u16 ci;
10659034c62273 Shannon Nelson 2023-04-19  24  
10659034c62273 Shannon Nelson 2023-04-19  25  	pf = pci_get_drvdata(pf_pdev);
10659034c62273 Shannon Nelson 2023-04-19  26  	if (pf->state)
10659034c62273 Shannon Nelson 2023-04-19  27  		return -ENXIO;
10659034c62273 Shannon Nelson 2023-04-19  28  
10659034c62273 Shannon Nelson 2023-04-19  29  	cmd.client_reg.opcode = PDS_AQ_CMD_CLIENT_REG;
10659034c62273 Shannon Nelson 2023-04-19  30  	strscpy(cmd.client_reg.devname, devname,
10659034c62273 Shannon Nelson 2023-04-19  31  		sizeof(cmd.client_reg.devname));
10659034c62273 Shannon Nelson 2023-04-19  32  
10659034c62273 Shannon Nelson 2023-04-19  33  	err = pdsc_adminq_post(pf, &cmd, &comp, false);
10659034c62273 Shannon Nelson 2023-04-19  34  	if (err) {
10659034c62273 Shannon Nelson 2023-04-19  35  		dev_info(pf->dev, "register dev_name %s with DSC failed, status %d: %pe\n",
10659034c62273 Shannon Nelson 2023-04-19  36  			 devname, comp.status, ERR_PTR(err));
10659034c62273 Shannon Nelson 2023-04-19  37  		return err;
10659034c62273 Shannon Nelson 2023-04-19  38  	}
10659034c62273 Shannon Nelson 2023-04-19  39  
10659034c62273 Shannon Nelson 2023-04-19  40  	ci = le16_to_cpu(comp.client_reg.client_id);
10659034c62273 Shannon Nelson 2023-04-19  41  	if (!ci) {
10659034c62273 Shannon Nelson 2023-04-19  42  		dev_err(pf->dev, "%s: device returned null client_id\n",
10659034c62273 Shannon Nelson 2023-04-19  43  			__func__);
10659034c62273 Shannon Nelson 2023-04-19  44  		return -EIO;
10659034c62273 Shannon Nelson 2023-04-19  45  	}
10659034c62273 Shannon Nelson 2023-04-19  46  
10659034c62273 Shannon Nelson 2023-04-19  47  	dev_dbg(pf->dev, "%s: device returned client_id %d for %s\n",
10659034c62273 Shannon Nelson 2023-04-19  48  		__func__, ci, devname);
10659034c62273 Shannon Nelson 2023-04-19  49  
10659034c62273 Shannon Nelson 2023-04-19  50  	return ci;
10659034c62273 Shannon Nelson 2023-04-19  51  }
10659034c62273 Shannon Nelson 2023-04-19  52  EXPORT_SYMBOL_GPL(pds_client_register);
10659034c62273 Shannon Nelson 2023-04-19  53  
10659034c62273 Shannon Nelson 2023-04-19  54  /**
10659034c62273 Shannon Nelson 2023-04-19  55   * pds_client_unregister - Unlink the client from the firmware
5808b1c50a443e Brett Creeley  2023-08-17  56   * @pf:		ptr to the PF driver's private data struct
10659034c62273 Shannon Nelson 2023-04-19  57   * @client_id:	id returned from pds_client_register()
10659034c62273 Shannon Nelson 2023-04-19  58   *
10659034c62273 Shannon Nelson 2023-04-19  59   * Return: 0 on success, or
10659034c62273 Shannon Nelson 2023-04-19  60   *         negative for error
10659034c62273 Shannon Nelson 2023-04-19  61   */
10659034c62273 Shannon Nelson 2023-04-19  62  int pds_client_unregister(struct pci_dev *pf_pdev, u16 client_id)
10659034c62273 Shannon Nelson 2023-04-19 @63  {
10659034c62273 Shannon Nelson 2023-04-19  64  	union pds_core_adminq_comp comp = {};
10659034c62273 Shannon Nelson 2023-04-19  65  	union pds_core_adminq_cmd cmd = {};
10659034c62273 Shannon Nelson 2023-04-19  66  	struct pdsc *pf;
10659034c62273 Shannon Nelson 2023-04-19  67  	int err;
10659034c62273 Shannon Nelson 2023-04-19  68  
10659034c62273 Shannon Nelson 2023-04-19  69  	pf = pci_get_drvdata(pf_pdev);
10659034c62273 Shannon Nelson 2023-04-19  70  	if (pf->state)
10659034c62273 Shannon Nelson 2023-04-19  71  		return -ENXIO;
10659034c62273 Shannon Nelson 2023-04-19  72  
10659034c62273 Shannon Nelson 2023-04-19  73  	cmd.client_unreg.opcode = PDS_AQ_CMD_CLIENT_UNREG;
10659034c62273 Shannon Nelson 2023-04-19  74  	cmd.client_unreg.client_id = cpu_to_le16(client_id);
10659034c62273 Shannon Nelson 2023-04-19  75  
10659034c62273 Shannon Nelson 2023-04-19  76  	err = pdsc_adminq_post(pf, &cmd, &comp, false);
10659034c62273 Shannon Nelson 2023-04-19  77  	if (err)
10659034c62273 Shannon Nelson 2023-04-19  78  		dev_info(pf->dev, "unregister client_id %d failed, status %d: %pe\n",
10659034c62273 Shannon Nelson 2023-04-19  79  			 client_id, comp.status, ERR_PTR(err));
10659034c62273 Shannon Nelson 2023-04-19  80  
10659034c62273 Shannon Nelson 2023-04-19  81  	return err;
10659034c62273 Shannon Nelson 2023-04-19  82  }
10659034c62273 Shannon Nelson 2023-04-19  83  EXPORT_SYMBOL_GPL(pds_client_unregister);
10659034c62273 Shannon Nelson 2023-04-19  84
Alex Williamson Aug. 18, 2023, 3:17 p.m. UTC | #2
On Thu, 17 Aug 2023 15:42:12 -0700
Brett Creeley <brett.creeley@amd.com> wrote:

> The pds-vfio-pci series made a small interface change to
> pds_client_register() and pds_client_unregister(), but forgot to update
> the function header descriptions. Fix that.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202308180411.OSqJPtMz-lkp@intel.com/
> Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
> Signed-off-by: Brett Creeley <brett.creeley@amd.com>

I think we also want:

Fixes: b021d05e106e ("pds_core: Require callers of register/unregister to pass PF drvdata")

I'll add that on commit.  Thanks,

Alex

> ---
>  drivers/net/ethernet/amd/pds_core/auxbus.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/amd/pds_core/auxbus.c b/drivers/net/ethernet/amd/pds_core/auxbus.c
> index 63d28c0a7e08..4ebc8ad87b41 100644
> --- a/drivers/net/ethernet/amd/pds_core/auxbus.c
> +++ b/drivers/net/ethernet/amd/pds_core/auxbus.c
> @@ -8,7 +8,7 @@
>  
>  /**
>   * pds_client_register - Link the client to the firmware
> - * @pf_pdev:	ptr to the PF driver struct
> + * @pf:		ptr to the PF driver's private data struct
>   * @devname:	name that includes service into, e.g. pds_core.vDPA
>   *
>   * Return: 0 on success, or
> @@ -48,7 +48,7 @@ EXPORT_SYMBOL_GPL(pds_client_register);
>  
>  /**
>   * pds_client_unregister - Unlink the client from the firmware
> - * @pf_pdev:	ptr to the PF driver struct
> + * @pf:		ptr to the PF driver's private data struct
>   * @client_id:	id returned from pds_client_register()
>   *
>   * Return: 0 on success, or
Alex Williamson Aug. 18, 2023, 4:03 p.m. UTC | #3
On Fri, 18 Aug 2023 09:17:05 -0600
Alex Williamson <alex.williamson@redhat.com> wrote:

> On Thu, 17 Aug 2023 15:42:12 -0700
> Brett Creeley <brett.creeley@amd.com> wrote:
> 
> > The pds-vfio-pci series made a small interface change to
> > pds_client_register() and pds_client_unregister(), but forgot to update
> > the function header descriptions. Fix that.
> > 
> > Reported-by: kernel test robot <lkp@intel.com>
> > Closes: https://lore.kernel.org/oe-kbuild-all/202308180411.OSqJPtMz-lkp@intel.com/
> > Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
> > Signed-off-by: Brett Creeley <brett.creeley@amd.com>  
> 
> I think we also want:
> 
> Fixes: b021d05e106e ("pds_core: Require callers of register/unregister to pass PF drvdata")
> 
> I'll add that on commit.  Thanks,

Applied to vfio next branch for v6.6.  Thanks,

Alex

> > ---
> >  drivers/net/ethernet/amd/pds_core/auxbus.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/net/ethernet/amd/pds_core/auxbus.c b/drivers/net/ethernet/amd/pds_core/auxbus.c
> > index 63d28c0a7e08..4ebc8ad87b41 100644
> > --- a/drivers/net/ethernet/amd/pds_core/auxbus.c
> > +++ b/drivers/net/ethernet/amd/pds_core/auxbus.c
> > @@ -8,7 +8,7 @@
> >  
> >  /**
> >   * pds_client_register - Link the client to the firmware
> > - * @pf_pdev:	ptr to the PF driver struct
> > + * @pf:		ptr to the PF driver's private data struct
> >   * @devname:	name that includes service into, e.g. pds_core.vDPA
> >   *
> >   * Return: 0 on success, or
> > @@ -48,7 +48,7 @@ EXPORT_SYMBOL_GPL(pds_client_register);
> >  
> >  /**
> >   * pds_client_unregister - Unlink the client from the firmware
> > - * @pf_pdev:	ptr to the PF driver struct
> > + * @pf:		ptr to the PF driver's private data struct
> >   * @client_id:	id returned from pds_client_register()
> >   *
> >   * Return: 0 on success, or  
>
diff mbox series

Patch

diff --git a/drivers/net/ethernet/amd/pds_core/auxbus.c b/drivers/net/ethernet/amd/pds_core/auxbus.c
index 63d28c0a7e08..4ebc8ad87b41 100644
--- a/drivers/net/ethernet/amd/pds_core/auxbus.c
+++ b/drivers/net/ethernet/amd/pds_core/auxbus.c
@@ -8,7 +8,7 @@ 
 
 /**
  * pds_client_register - Link the client to the firmware
- * @pf_pdev:	ptr to the PF driver struct
+ * @pf:		ptr to the PF driver's private data struct
  * @devname:	name that includes service into, e.g. pds_core.vDPA
  *
  * Return: 0 on success, or
@@ -48,7 +48,7 @@  EXPORT_SYMBOL_GPL(pds_client_register);
 
 /**
  * pds_client_unregister - Unlink the client from the firmware
- * @pf_pdev:	ptr to the PF driver struct
+ * @pf:		ptr to the PF driver's private data struct
  * @client_id:	id returned from pds_client_register()
  *
  * Return: 0 on success, or