[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20211008113543.GB26495@gondor.apana.org.au>
Date: Fri, 8 Oct 2021 19:35:43 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Kai Ye <yekai13@...wei.com>
Cc: linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
wangzhou1@...ilicon.com
Subject: Re: [PATCH] crypto: hisilicon - replace 'smp_processor_id' with
'get_cpu' in preemptible
On Thu, Sep 30, 2021 at 04:55:46PM +0800, Kai Ye wrote:
>
> diff --git a/drivers/crypto/hisilicon/hpre/hpre_main.c b/drivers/crypto/hisilicon/hpre/hpre_main.c
> index 65a641396c07..d1754e7b7a9c 100644
> --- a/drivers/crypto/hisilicon/hpre/hpre_main.c
> +++ b/drivers/crypto/hisilicon/hpre/hpre_main.c
> @@ -277,10 +277,11 @@ static inline int hpre_cluster_core_mask(struct hisi_qm *qm)
>
> struct hisi_qp *hpre_create_qp(u8 type)
> {
> - int node = cpu_to_node(smp_processor_id());
> + int node = cpu_to_node(get_cpu());
> struct hisi_qp *qp = NULL;
> int ret;
>
> + put_cpu();
This looks wrong. You're just changing the code to make the warning
go away.
Cheers,
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists