From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id ED419C433FE for ; Fri, 27 May 2022 07:30:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231389AbiE0HaQ (ORCPT ); Fri, 27 May 2022 03:30:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241885AbiE0HaP (ORCPT ); Fri, 27 May 2022 03:30:15 -0400 Received: from out30-45.freemail.mail.aliyun.com (out30-45.freemail.mail.aliyun.com [115.124.30.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42617F68A9; Fri, 27 May 2022 00:30:13 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04395;MF=xuanzhuo@linux.alibaba.com;NM=1;PH=DS;RN=16;SR=0;TI=SMTPD_---0VEW9CAs_1653636609; Received: from localhost(mailfrom:xuanzhuo@linux.alibaba.com fp:SMTPD_---0VEW9CAs_1653636609) by smtp.aliyun-inc.com(127.0.0.1); Fri, 27 May 2022 15:30:09 +0800 Message-ID: <1653636601.072258-2-xuanzhuo@linux.alibaba.com> Subject: Re: [PATCH V6 2/9] virtio: use virtio_reset_device() when possible Date: Fri, 27 May 2022 15:30:01 +0800 From: Xuan Zhuo To: Jason Wang Cc: tglx@linutronix.de, peterz@infradead.org, paulmck@kernel.org, maz@kernel.org, pasic@linux.ibm.com, cohuck@redhat.com, eperezma@redhat.com, lulu@redhat.com, sgarzare@redhat.com, Vineeth Vijayan , Peter Oberparleiter , linux-s390@vger.kernel.org, mst@redhat.com, jasowang@redhat.com, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org References: <20220527060120.20964-1-jasowang@redhat.com> <20220527060120.20964-3-jasowang@redhat.com> In-Reply-To: <20220527060120.20964-3-jasowang@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-s390@vger.kernel.org On Fri, 27 May 2022 14:01:13 +0800, Jason Wang wrote: > This allows us to do common extension without duplicating code. > > Cc: Thomas Gleixner > Cc: Peter Zijlstra > Cc: "Paul E. McKenney" > Cc: Marc Zyngier > Cc: Halil Pasic > Cc: Cornelia Huck > Cc: Vineeth Vijayan > Cc: Peter Oberparleiter > Cc: linux-s390@vger.kernel.org > Reviewed-by: Cornelia Huck > Signed-off-by: Jason Wang Reviewed-by: Xuan Zhuo > --- > drivers/virtio/virtio.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c > index 938e975029d4..aa1eb5132767 100644 > --- a/drivers/virtio/virtio.c > +++ b/drivers/virtio/virtio.c > @@ -430,7 +430,7 @@ int register_virtio_device(struct virtio_device *dev) > > /* We always start by resetting the device, in case a previous > * driver messed it up. This also tests that code path a little. */ > - dev->config->reset(dev); > + virtio_reset_device(dev); > > /* Acknowledge that we've seen the device. */ > virtio_add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE); > @@ -496,7 +496,7 @@ int virtio_device_restore(struct virtio_device *dev) > > /* We always start by resetting the device, in case a previous > * driver messed it up. */ > - dev->config->reset(dev); > + virtio_reset_device(dev); > > /* Acknowledge that we've seen the device. */ > virtio_add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE); > -- > 2.25.1 >