diff mbox series

[12/38] crypto: virtio: Replace deprecated CPU-hotplug functions.

Message ID 20210803141621.780504-13-bigeasy@linutronix.de
State Accepted
Commit d01a9f7009c3812a8955b7ae5798470cd6ab3590
Headers show
Series Replace deprecated CPU-hotplug | expand

Commit Message

Sebastian Andrzej Siewior Aug. 3, 2021, 2:15 p.m. UTC
The functions get_online_cpus() and put_online_cpus() have been
deprecated during the CPU hotplug rework. They map directly to
cpus_read_lock() and cpus_read_unlock().

Replace deprecated CPU-hotplug functions with the official version.
The behavior remains unchanged.

Cc: Gonglei <arei.gonglei@huawei.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: virtualization@lists.linux-foundation.org
Cc: linux-crypto@vger.kernel.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 drivers/crypto/virtio/virtio_crypto_core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Herbert Xu Aug. 12, 2021, 11:36 a.m. UTC | #1
On Tue, Aug 03, 2021 at 04:15:55PM +0200, Sebastian Andrzej Siewior wrote:
> The functions get_online_cpus() and put_online_cpus() have been

> deprecated during the CPU hotplug rework. They map directly to

> cpus_read_lock() and cpus_read_unlock().

> 

> Replace deprecated CPU-hotplug functions with the official version.

> The behavior remains unchanged.

> 

> Cc: Gonglei <arei.gonglei@huawei.com>

> Cc: "Michael S. Tsirkin" <mst@redhat.com>

> Cc: Jason Wang <jasowang@redhat.com>

> Cc: Herbert Xu <herbert@gondor.apana.org.au>

> Cc: "David S. Miller" <davem@davemloft.net>

> Cc: virtualization@lists.linux-foundation.org

> Cc: linux-crypto@vger.kernel.org

> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

> ---

>  drivers/crypto/virtio/virtio_crypto_core.c | 4 ++--

>  1 file changed, 2 insertions(+), 2 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
diff mbox series

Patch

diff --git a/drivers/crypto/virtio/virtio_crypto_core.c b/drivers/crypto/virtio/virtio_crypto_core.c
index 080955a1dd9c0..e2375d9923087 100644
--- a/drivers/crypto/virtio/virtio_crypto_core.c
+++ b/drivers/crypto/virtio/virtio_crypto_core.c
@@ -187,9 +187,9 @@  static int virtcrypto_init_vqs(struct virtio_crypto *vi)
 	if (ret)
 		goto err_free;
 
-	get_online_cpus();
+	cpus_read_lock();
 	virtcrypto_set_affinity(vi);
-	put_online_cpus();
+	cpus_read_unlock();
 
 	return 0;