public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] virtio: remove the duplicate might_sleep()
@ 2024-11-18 12:40 xiaowuding_jaguarmicro
  2024-11-19  2:37 ` Xuan Zhuo
  0 siblings, 1 reply; 2+ messages in thread
From: xiaowuding_jaguarmicro @ 2024-11-18 12:40 UTC (permalink / raw)
  To: mst, jasowang
  Cc: xuanzhuo, eperezma, virtualization, linux-kernel, angus.chen,
	Xiaowu Ding

From: Xiaowu Ding <xiaowu.ding@jaguarmicro.com>

The virtio_add_status function have done might_sleep(),so we can remove
the duplicate calls.

Signed-off-by: Xiaowu Ding <xiaowu.ding@jaguarmicro.com>
---
 drivers/virtio/virtio.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
index b9095751e..8352dfc1a 100644
--- a/drivers/virtio/virtio.c
+++ b/drivers/virtio/virtio.c
@@ -205,8 +205,6 @@ static int virtio_features_ok(struct virtio_device *dev)
 {
 	unsigned int status;
 
-	might_sleep();
-
 	if (virtio_check_mem_acc_cb(dev)) {
 		if (!virtio_has_feature(dev, VIRTIO_F_VERSION_1)) {
 			dev_warn(&dev->dev,
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] virtio: remove the duplicate might_sleep()
  2024-11-18 12:40 [PATCH] virtio: remove the duplicate might_sleep() xiaowuding_jaguarmicro
@ 2024-11-19  2:37 ` Xuan Zhuo
  0 siblings, 0 replies; 2+ messages in thread
From: Xuan Zhuo @ 2024-11-19  2:37 UTC (permalink / raw)
  To: xiaowuding_jaguarmicro
  Cc: eperezma, virtualization, linux-kernel, angus.chen, Xiaowu Ding,
	mst, jasowang

On Mon, 18 Nov 2024 20:40:56 +0800, "xiaowuding_jaguarmicro" <xiaowu.ding@jaguarmicro.com> wrote:
> From: Xiaowu Ding <xiaowu.ding@jaguarmicro.com>
>
> The virtio_add_status function have done might_sleep(),so we can remove
> the duplicate calls.


Is there any problem here? If not, I think we can keep it.

Thanks.

>
> Signed-off-by: Xiaowu Ding <xiaowu.ding@jaguarmicro.com>
> ---
>  drivers/virtio/virtio.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
> index b9095751e..8352dfc1a 100644
> --- a/drivers/virtio/virtio.c
> +++ b/drivers/virtio/virtio.c
> @@ -205,8 +205,6 @@ static int virtio_features_ok(struct virtio_device *dev)
>  {
>  	unsigned int status;
>
> -	might_sleep();
> -
>  	if (virtio_check_mem_acc_cb(dev)) {
>  		if (!virtio_has_feature(dev, VIRTIO_F_VERSION_1)) {
>  			dev_warn(&dev->dev,
> --
> 2.27.0
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-11-19  2:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-18 12:40 [PATCH] virtio: remove the duplicate might_sleep() xiaowuding_jaguarmicro
2024-11-19  2:37 ` Xuan Zhuo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox