Torsten Duwe 5936a4
From 462584ca17b4ca85721475cf2744d3229d4006cd Mon Sep 17 00:00:00 2001
Torsten Duwe 5936a4
From: Marco Chiappero <marco.chiappero@intel.com>
Torsten Duwe 5936a4
Date: Thu, 12 Aug 2021 21:21:11 +0100
Torsten Duwe 5936a4
Subject: [PATCH] crypto: qat - remove empty sriov_configure()
Torsten Duwe 5936a4
Git-commit: 462584ca17b4ca85721475cf2744d3229d4006cd
Torsten Duwe 5936a4
Patch-mainline: v5.15-rc1
Torsten Duwe 5936a4
References: jsc#PED-1073
Torsten Duwe 5936a4
Torsten Duwe 5936a4
Remove the empty implementation of sriov_configure() and set the
Torsten Duwe 5936a4
sriov_configure member of the pci_driver structure to NULL.
Torsten Duwe 5936a4
This way, if a user tries to enable VFs on a device, when kernel and
Torsten Duwe 5936a4
driver are built with CONFIG_PCI_IOV=n, the kernel reports an error
Torsten Duwe 5936a4
message saying that the driver does not support SRIOV configuration via
Torsten Duwe 5936a4
sysfs.
Torsten Duwe 5936a4
Torsten Duwe 5936a4
Signed-off-by: Marco Chiappero <marco.chiappero@intel.com>
Torsten Duwe 5936a4
Co-developed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Torsten Duwe 5936a4
Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Torsten Duwe 5936a4
Reviewed-by: Fiona Trahe <fiona.trahe@intel.com>
Torsten Duwe 5936a4
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Torsten Duwe 5936a4
Signed-off-by: Torsten Duwe <duwe@suse.de>
Torsten Duwe 5936a4
Torsten Duwe 5936a4
---
Torsten Duwe 5936a4
 drivers/crypto/qat/qat_common/adf_common_drv.h | 5 +----
Torsten Duwe 5936a4
 1 file changed, 1 insertion(+), 4 deletions(-)
Torsten Duwe 5936a4
Torsten Duwe 5936a4
diff --git a/drivers/crypto/qat/qat_common/adf_common_drv.h b/drivers/crypto/qat/qat_common/adf_common_drv.h
Torsten Duwe 5936a4
index c61476553728d..c7deca7f06072 100644
Torsten Duwe 5936a4
--- a/drivers/crypto/qat/qat_common/adf_common_drv.h
Torsten Duwe 5936a4
+++ b/drivers/crypto/qat/qat_common/adf_common_drv.h
Torsten Duwe 5936a4
@@ -205,10 +205,7 @@ void adf_exit_pf_wq(void);
Torsten Duwe 5936a4
 int adf_init_vf_wq(void);
Torsten Duwe 5936a4
 void adf_exit_vf_wq(void);
Torsten Duwe 5936a4
 #else
Torsten Duwe 5936a4
-static inline int adf_sriov_configure(struct pci_dev *pdev, int numvfs)
Torsten Duwe 5936a4
-{
Torsten Duwe 5936a4
-	return 0;
Torsten Duwe 5936a4
-}
Torsten Duwe 5936a4
+#define adf_sriov_configure NULL
Torsten Duwe 5936a4
 
Torsten Duwe 5936a4
 static inline void adf_disable_sriov(struct adf_accel_dev *accel_dev)
Torsten Duwe 5936a4
 {
Torsten Duwe 5936a4
-- 
Torsten Duwe 5936a4
2.35.3
Torsten Duwe 5936a4