From 8af42b40ce6e38667946a9e0097bf047e711ff8f Mon Sep 17 00:00:00 2001 From: Yicong Yang Date: Wed, 30 Nov 2022 18:23:09 +0800 Subject: [PATCH] crypto: hisilicon/qm - drop unnecessary IS_ENABLE(CONFIG_NUMA) check mainline inclusion from v6.1-rc4 commit 7001141d34e550854425afa76e960513cf150a62 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5ZHPY CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7001141d34e550854425afa76e960513cf150a62 ---------------------------------------------------------------------- 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 Signed-off-by: Weili Qian Signed-off-by: Herbert Xu Signed-off-by: Jiangshui Yang Reviewed-by: Xiu Jianfeng Signed-off-by: Zheng Zengkai --- 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 9e6f5004bdaf..e96308ea45b0 100644 --- a/drivers/crypto/hisilicon/qm.c +++ b/drivers/crypto/hisilicon/qm.c @@ -4281,16 +4281,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) -- GitLab