RE: [PATCH 02/10] crypto: qat - remove empty sriov_configure()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
> Sent: Thursday, June 3, 2021 1:16 PM
> To: Chiappero, Marco <marco.chiappero@xxxxxxxxx>
> Cc: linux-crypto@xxxxxxxxxxxxxxx; qat-linux <qat-linux@xxxxxxxxx>; Cabiddu,
> Giovanni <giovanni.cabiddu@xxxxxxxxx>
> Subject: Re: [PATCH 02/10] crypto: qat - remove empty sriov_configure()
> 
> On Thu, May 27, 2021 at 08:12:43PM +0100, Marco Chiappero wrote:
> > Remove the empty implementation of sriov_configure() and set the
> > sriov_configure member of the pci_driver structure to NULL.
> > This way, if a user tries to enable VFs on a device, when kernel and
> > driver are built with CONFIG_PCI_IOV=n, the kernel reports an error
> > message saying that the driver does not support SRIOV configuration
> > via sysfs.
> >
> > Signed-off-by: Marco Chiappero <marco.chiappero@xxxxxxxxx>
> > Co-developed-by: Giovanni Cabiddu <giovanni.cabiddu@xxxxxxxxx>
> > Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@xxxxxxxxx>
> > ---
> >  drivers/crypto/qat/qat_4xxx/adf_drv.c          | 2 ++
> >  drivers/crypto/qat/qat_c3xxx/adf_drv.c         | 2 ++
> >  drivers/crypto/qat/qat_c62x/adf_drv.c          | 2 ++
> >  drivers/crypto/qat/qat_common/adf_common_drv.h | 5 -----
> >  drivers/crypto/qat/qat_dh895xcc/adf_drv.c      | 2 ++
> >  5 files changed, 8 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/crypto/qat/qat_4xxx/adf_drv.c
> > b/drivers/crypto/qat/qat_4xxx/adf_drv.c
> > index a8805c815d16..b77290d3da10 100644
> > --- a/drivers/crypto/qat/qat_4xxx/adf_drv.c
> > +++ b/drivers/crypto/qat/qat_4xxx/adf_drv.c
> > @@ -309,7 +309,9 @@ static struct pci_driver adf_driver = {
> >  	.name = ADF_4XXX_DEVICE_NAME,
> >  	.probe = adf_probe,
> >  	.remove = adf_remove,
> > +#ifdef CONFIG_PCI_IOV
> >  	.sriov_configure = adf_sriov_configure,
> > +#endif
> 
> How about #defining adf_sriov_configure to NULL?
 
OK, looks good to me.

Best regards,
Marco




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux