[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220924093424.65529-1-qianweili@huawei.com>
Date: Sat, 24 Sep 2022 17:34:24 +0800
From: Weili Qian <qianweili@...wei.com>
To: <herbert@...dor.apana.org.au>
CC: <linux-kernel@...r.kernel.org>, <linux-crypto@...r.kernel.org>,
<wangzhou1@...ilicon.com>, <liulongfang@...wei.com>,
<yangyicong@...wei.com>, Yicong Yang <yangyicong@...ilicon.com>,
Weili Qian <qianweili@...wei.com>
Subject: [PATCH] crypto: hisilicon/qm: drop unnecessary IS_ENABLE(CONFIG_NUMA) check
From: Yicong Yang <yangyicong@...ilicon.com>
dev_to_node() can handle the case when CONFIG_NUMA is not set, so the
check of CONFIG_NUMA is redundant and can be removed.
Signed-off-by: Yicong Yang <yangyicong@...ilicon.com>
Signed-off-by: Weili Qian <qianweili@...wei.com>
---
drivers/crypto/hisilicon/qm.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c
index 8b387de69d22..9a38e170fb1d 100644
--- a/drivers/crypto/hisilicon/qm.c
+++ b/drivers/crypto/hisilicon/qm.c
@@ -4277,16 +4277,14 @@ static int hisi_qm_sort_devices(int node, struct list_head *head,
struct hisi_qm *qm;
struct list_head *n;
struct device *dev;
- int dev_node = 0;
+ int dev_node;
list_for_each_entry(qm, &qm_list->list, list) {
dev = &qm->pdev->dev;
- if (IS_ENABLED(CONFIG_NUMA)) {
- dev_node = dev_to_node(dev);
- if (dev_node < 0)
- dev_node = 0;
- }
+ dev_node = dev_to_node(dev);
+ if (dev_node < 0)
+ dev_node = 0;
res = kzalloc(sizeof(*res), GFP_KERNEL);
if (!res)
--
2.33.0
Powered by blists - more mailing lists