mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chenghai Huang <huangchenghai2@huawei.com>
To: <herbert@gondor.apana.org.au>, <davem@davemloft.net>
Cc: <linux-kernel@vger.kernel.org>, <linux-crypto@vger.kernel.org>,
	<fanghao11@huawei.com>, <liulongfang@huawei.com>,
	<shenyang39@huawei.com>, <songzhiqi1@huawei.com>,
	<qianweili@huawei.com>, <liushangbin@hisilicon.com>,
	<linwenkai6@hisilicon.com>, <taoqi10@huawei.com>,
	<wangzhou1@hisilicon.com>, <huangchenghai2@huawei.com>
Subject: [PATCH 1/9] crypto: hisilicon/sec - Add the condition for configuring the sriov function
Date: Wed, 3 Apr 2024 18:00:54 +0800	[thread overview]
Message-ID: <20240403100102.2735306-2-huangchenghai2@huawei.com> (raw)
In-Reply-To: <20240403100102.2735306-1-huangchenghai2@huawei.com>

When CONFIG_PCI_IOV is disabled, the SRIOV configuration
function is not required. An error occurs if this function is
incorrectly called.

Consistent with other modules, add the condition for
configuring the sriov function of sec_pci_driver.

Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com>
---
 drivers/crypto/hisilicon/sec2/sec_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/hisilicon/sec2/sec_main.c b/drivers/crypto/hisilicon/sec2/sec_main.c
index c290d8937b19..f4e10741610f 100644
--- a/drivers/crypto/hisilicon/sec2/sec_main.c
+++ b/drivers/crypto/hisilicon/sec2/sec_main.c
@@ -1324,7 +1324,8 @@ static struct pci_driver sec_pci_driver = {
 	.probe = sec_probe,
 	.remove = sec_remove,
 	.err_handler = &sec_err_handler,
-	.sriov_configure = hisi_qm_sriov_configure,
+	.sriov_configure = IS_ENABLED(CONFIG_PCI_IOV) ?
+				hisi_qm_sriov_configure : NULL,
 	.shutdown = hisi_qm_dev_shutdown,
 	.driver.pm = &sec_pm_ops,
 };
-- 
2.30.0


  reply	other threads:[~2024-04-03 10:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-03 10:00 [PATCH 0/9] crypto: hisilicon - Optimize and fix some driver processes Chenghai Huang
2024-04-03 10:00 ` Chenghai Huang [this message]
2024-04-03 10:00 ` [PATCH 2/9] crypto: hisilicon/debugfs - Fix debugfs uninit process issue Chenghai Huang
2024-04-03 10:00 ` [PATCH 3/9] crypto: hisilicon/sgl - Delete redundant parameter verification Chenghai Huang
2024-04-03 10:00 ` [PATCH 4/9] crypto: hisilicon/debugfs - Fix the processing logic issue in the debugfs creation Chenghai Huang
2024-04-03 10:00 ` [PATCH 5/9] crypto: hisilicon/qm - Add the default processing branch Chenghai Huang
2024-04-03 10:00 ` [PATCH 6/9] crypto: hisilicon - Adjust debugfs creation and release order Chenghai Huang
2024-04-03 10:01 ` [PATCH 7/9] crypto: hisilicon/sec - Fix memory leak for sec resource release Chenghai Huang
2024-04-03 10:01 ` [PATCH 8/9] crypto: hisilicon/debugfs - Resolve the problem of applying for redundant space in sq dump Chenghai Huang
2024-04-03 22:57   ` kernel test robot
2024-04-03 10:01 ` [PATCH 9/9] crypto: hisilicon/debugfs - Add the err memory release process to qm uninit Chenghai Huang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240403100102.2735306-2-huangchenghai2@huawei.com \
    --to=huangchenghai2@huawei.com \
    --cc=davem@davemloft.net \
    --cc=fanghao11@huawei.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linwenkai6@hisilicon.com \
    --cc=liulongfang@huawei.com \
    --cc=liushangbin@hisilicon.com \
    --cc=qianweili@huawei.com \
    --cc=shenyang39@huawei.com \
    --cc=songzhiqi1@huawei.com \
    --cc=taoqi10@huawei.com \
    --cc=wangzhou1@hisilicon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®