crypto: hisilicon/qm - drop unnecessary IS_ENABLE(CONFIG_NUMA) check
authorYicong Yang <yangyicong@hisilicon.com>
Sat, 24 Sep 2022 09:34:24 +0000 (17:34 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 21 Oct 2022 11:05:23 +0000 (19:05 +0800)
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@hisilicon.com>
Signed-off-by: Weili Qian <qianweili@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/hisilicon/qm.c

index 8b387de..9a38e17 100644 (file)
@@ -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)