diff options
author | Yicong Yang <yangyicong@hisilicon.com> | 2022-09-24 12:34:24 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2022-10-21 14:05:23 +0300 |
commit | 7001141d34e550854425afa76e960513cf150a62 (patch) | |
tree | e4f3f6915c43c9bf2b7f6e5f32c65b2c3c98b09a /drivers/crypto/hisilicon | |
parent | 45e6319bd5f2154d8b8c9f1eaa4ac030ba0d330c (diff) | |
download | linux-7001141d34e550854425afa76e960513cf150a62.tar.xz |
crypto: hisilicon/qm - drop unnecessary IS_ENABLE(CONFIG_NUMA) check
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>
Diffstat (limited to 'drivers/crypto/hisilicon')
-rw-r--r-- | drivers/crypto/hisilicon/qm.c | 10 |
1 files 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) |