Commit 267bce71 authored by wangyuan's avatar wangyuan
Browse files

crypto: hisilicon/qm - drop unnecessary IS_ENABLE(CONFIG_NUMA) check

driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8ZA13


CVE: NA

--------------------------------------------------------------------

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: default avatarwangyuan <wangyuan46@huawei.com>
parent 992b5fc1
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -3503,16 +3503,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->numa_node;
		dev_node = dev_to_node(dev);
		if (dev_node < 0)
			dev_node = 0;
		}

		if (qm_list->check && !qm_list->check(qm))
			continue;