Re: [PATCH] virtio: remove the duplicate might_sleep()
From: Xuan Zhuo
Date: Mon Nov 18 2024 - 21:38:47 EST
On Mon, 18 Nov 2024 20:40:56 +0800, "xiaowuding_jaguarmicro" <xiaowu.ding@xxxxxxxxxxxxxxx> wrote:
> From: Xiaowu Ding <xiaowu.ding@xxxxxxxxxxxxxxx>
>
> 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@xxxxxxxxxxxxxxx>
> ---
> 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
>