* [PATCH] crypto: hisilicon/qm: drop unnecessary IS_ENABLE(CONFIG_NUMA) check
@ 2022-09-24 9:34 Weili Qian
2022-10-21 11:32 ` Herbert Xu
0 siblings, 1 reply; 2+ messages in thread
From: Weili Qian @ 2022-09-24 9:34 UTC (permalink / raw)
To: herbert
Cc: linux-kernel, linux-crypto, wangzhou1, liulongfang, yangyicong,
Yicong Yang, Weili Qian
From: Yicong Yang <yangyicong@hisilicon.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@hisilicon.com>
Signed-off-by: Weili Qian <qianweili@huawei.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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] crypto: hisilicon/qm: drop unnecessary IS_ENABLE(CONFIG_NUMA) check
2022-09-24 9:34 [PATCH] crypto: hisilicon/qm: drop unnecessary IS_ENABLE(CONFIG_NUMA) check Weili Qian
@ 2022-10-21 11:32 ` Herbert Xu
0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2022-10-21 11:32 UTC (permalink / raw)
To: Weili Qian
Cc: linux-kernel, linux-crypto, wangzhou1, liulongfang, yangyicong,
Yicong Yang
On Sat, Sep 24, 2022 at 05:34:24PM +0800, Weili Qian wrote:
> From: Yicong Yang <yangyicong@hisilicon.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@hisilicon.com>
> Signed-off-by: Weili Qian <qianweili@huawei.com>
> ---
> drivers/crypto/hisilicon/qm.c | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-21 11:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-24 9:34 [PATCH] crypto: hisilicon/qm: drop unnecessary IS_ENABLE(CONFIG_NUMA) check Weili Qian
2022-10-21 11:32 ` Herbert Xu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.