Re: [PATCH] crypto: hisilicon - replace 'smp_processor_id' with 'get_cpu' in preemptible

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux