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 X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9DAA6C07E95 for ; Tue, 20 Jul 2021 02:42:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6DFCA61165 for ; Tue, 20 Jul 2021 02:42:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345092AbhGTCB2 (ORCPT ); Mon, 19 Jul 2021 22:01:28 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:31883 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345270AbhGTCAf (ORCPT ); Mon, 19 Jul 2021 22:00:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626748874; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9cx9vRaJKoB0elI+pAj8wQCUn2TBTDPaE649XEXqz5I=; b=hmdyk5gEtyRRb86k3BP4cpPzpqwlI+TlV3345xp29UAWOVyICyIYwzBFea7T4/5lIdwB80 c5837Kr0R0/Q1AF1Gd5lg64grqAis/XIpMQORfdtP1gaoLoGjMJQ4rgCxNFL6OV4h3q0Qg iD0LqfElFt1iEU4u9o2Kq/LGG2mVWKc= Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-478-gwK0EfI5MS2pWdGwEFADDw-1; Mon, 19 Jul 2021 22:41:13 -0400 X-MC-Unique: gwK0EfI5MS2pWdGwEFADDw-1 Received: by mail-pf1-f197.google.com with SMTP id s187-20020a625ec40000b02903288ce43fc0so15117709pfb.7 for ; Mon, 19 Jul 2021 19:41:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=9cx9vRaJKoB0elI+pAj8wQCUn2TBTDPaE649XEXqz5I=; b=h1hKNzOHZ2mYjIALUqTG+7vjZVkfAvEK04a6YrgQQZkQh6PrNrw/qXKW/L4welVis9 EedC//jLSgbQbr03jpzBR5BEhjt4pJAP020uQAKEmKSsqnpnymIow4Ed/m7jzUHV+U9X Gw1zDSnbBP7Ilr0lDjj6qc9VT4FuNzMHfNyFd9n4LYYuDRcBMmR374N/v9Zbr8PAz9qH iZaGdLeKP0EALX2PYFO0i30yopO9ww8R21YJ3VA8LHzU38yKWdEg9dUc6pvahTQLl7kf 9s0hrlmHDZUeZCJ5XDxoCNTI1MjxFKb+cPZb5dZiEDvwua3yhwAuS1SLN6rwxSF8U3YB TnEg== X-Gm-Message-State: AOAM532vMkxcoTUIyGVWZcOrP57QuhhcOnSsBUXZ7e9OU7Awtt4nBpR8 lgxFdLVONMhv0qspQr+pUy5YY1S2VmCxXyrIlbVqqk1pQJU/21o+CTaI3RPy6RKs+8M67SQn4sd YRedMDVcHrmwLr1/+s0S0P/KDhwtXLbWkF8iQ5tZAEDQ5QVL2ZqSoGvaKTcFm6JYsyYLyZrFl3z hJ X-Received: by 2002:a63:ed47:: with SMTP id m7mr28577597pgk.194.1626748871763; Mon, 19 Jul 2021 19:41:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgxZiwuj0ggtt60dnHTwjkzia6vpHkhohJNoz9AYWKnuY4DXH4sLv44Eyv8ZJljg3HsqDpLg== X-Received: by 2002:a63:ed47:: with SMTP id m7mr28577572pgk.194.1626748871404; Mon, 19 Jul 2021 19:41:11 -0700 (PDT) Received: from wangxiaodeMacBook-Air.local ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id q2sm10838498pfu.205.2021.07.19.19.41.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Jul 2021 19:41:10 -0700 (PDT) Subject: Re: [PATCH] virtio-balloon: Use virtio_find_vqs() helper To: tianxianting , Xianting Tian , mst@redhat.com, david@redhat.com Cc: virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org References: <1626190724-7942-1-git-send-email-xianting_tian@126.com> From: Jason Wang Message-ID: <76a227a9-1b2c-c433-c8d9-5963fb56028d@redhat.com> Date: Tue, 20 Jul 2021 10:41:03 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2021/7/19 下午12:22, tianxianting 写道: > thanks, > > I checked, actually all virtio drivers have switched to use the helper > after this one merged. Ok. Cool. Thanks > > 在 2021/7/19 上午11:46, Jason Wang 写道: >> >> 在 2021/7/16 下午8:46, tianxianting 写道: >>> Do you interest in this patch? just little improvment:) >>> >>> 在 2021/7/13 下午11:38, Xianting Tian 写道: >>>> From: Xianting Tian >>>> >>>> Use the helper virtio_find_vqs(). >>>> >>>> Signed-off-by: Xianting Tian >>>> --- >>>>   drivers/virtio/virtio_balloon.c | 4 ++-- >>>>   1 file changed, 2 insertions(+), 2 deletions(-) >>>> >>>> diff --git a/drivers/virtio/virtio_balloon.c >>>> b/drivers/virtio/virtio_balloon.c >>>> index 510e931..18e0bf3 100644 >>>> --- a/drivers/virtio/virtio_balloon.c >>>> +++ b/drivers/virtio/virtio_balloon.c >>>> @@ -531,8 +531,8 @@ static int init_vqs(struct virtio_balloon *vb) >>>>           callbacks[VIRTIO_BALLOON_VQ_REPORTING] = balloon_ack; >>>>       } >>>>   -    err = vb->vdev->config->find_vqs(vb->vdev, >>>> VIRTIO_BALLOON_VQ_MAX, >>>> -                     vqs, callbacks, names, NULL, NULL); >>>> +    err = virtio_find_vqs(vb->vdev, VIRTIO_BALLOON_VQ_MAX, vqs, >>>> +                callbacks, names, NULL); >>>>       if (err) >>>>           return err; >>> >> >> Acked-by: Jason Wang >> >> Maybe it's better to convert all the drivers that doesn't use >> virtio_find_vqs{_ctx}. >> >> Thanks > 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 X-Spam-Level: X-Spam-Status: No, score=-15.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78392C07E95 for ; Tue, 20 Jul 2021 02:41:19 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ECBCC6113C for ; Tue, 20 Jul 2021 02:41:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ECBCC6113C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=virtualization-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id A00E96079E; Tue, 20 Jul 2021 02:41:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3cUmlWxj66Cz; Tue, 20 Jul 2021 02:41:17 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTPS id 3EB5460686; Tue, 20 Jul 2021 02:41:17 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 1C9A7C0010; Tue, 20 Jul 2021 02:41:17 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 35CCAC000E for ; Tue, 20 Jul 2021 02:41:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 17CE4833CE for ; Tue, 20 Jul 2021 02:41:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp1.osuosl.org (amavisd-new); dkim=pass (1024-bit key) header.d=redhat.com Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Mp_yejCJFOzS for ; Tue, 20 Jul 2021 02:41:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp1.osuosl.org (Postfix) with ESMTPS id 72AA4833CB for ; Tue, 20 Jul 2021 02:41:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626748874; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9cx9vRaJKoB0elI+pAj8wQCUn2TBTDPaE649XEXqz5I=; b=hmdyk5gEtyRRb86k3BP4cpPzpqwlI+TlV3345xp29UAWOVyICyIYwzBFea7T4/5lIdwB80 c5837Kr0R0/Q1AF1Gd5lg64grqAis/XIpMQORfdtP1gaoLoGjMJQ4rgCxNFL6OV4h3q0Qg iD0LqfElFt1iEU4u9o2Kq/LGG2mVWKc= Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-456-8jBynn9QPeqt7CrkC2h8Kw-1; Mon, 19 Jul 2021 22:41:12 -0400 X-MC-Unique: 8jBynn9QPeqt7CrkC2h8Kw-1 Received: by mail-pf1-f198.google.com with SMTP id 124-20020a6217820000b02902feebfd791eso15054270pfx.19 for ; Mon, 19 Jul 2021 19:41:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=9cx9vRaJKoB0elI+pAj8wQCUn2TBTDPaE649XEXqz5I=; b=e5RmM95aUNAeAty6cTEmGLUVs8m9B2stirjrsC3EagzZkIjIhidX5FqXQl6U/hs+2G 6lgS+Qrf1gSL3jJXfQK9q5yK8ez9o6HmHf2acbODr3yU0uiRhL1F4Y8bCXgSlE7ciTmV /h11Nm+bXqzWUmO5T4gprSvvX2cSYvp8ckdgc85pTbo6zeqNbhdL8nfX/myItqwUe8Zw Z7Hp69VrzSWa88lgTp2prLntz19RFLGt/pm6mMXNpHuimzEmN297RG8X7AE8oE2Jnay3 hDaZpHu3rJedexxVRcwVuJYSCxBZ8v8OZW/3qw6a4dhCbNyTzemIZp/BnqDUMiIjNNVw +/jg== X-Gm-Message-State: AOAM533YutwBUaFv2OuXsOyk61I04LswLZg442QhaQ2baTB4uWZHMiU2 IQLXZsbz/b+Kc3D3qpSLVqGmA9Nj+grWVxFPr1oihv/RNGEV4IkABfDeIn5AnZHJhQhj/6Zj3eY SWaMmrep5wOnRqLqgrohX0wF6/KVF29HJDFR/XmgRLQ== X-Received: by 2002:a63:ed47:: with SMTP id m7mr28577588pgk.194.1626748871679; Mon, 19 Jul 2021 19:41:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgxZiwuj0ggtt60dnHTwjkzia6vpHkhohJNoz9AYWKnuY4DXH4sLv44Eyv8ZJljg3HsqDpLg== X-Received: by 2002:a63:ed47:: with SMTP id m7mr28577572pgk.194.1626748871404; Mon, 19 Jul 2021 19:41:11 -0700 (PDT) Received: from wangxiaodeMacBook-Air.local ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id q2sm10838498pfu.205.2021.07.19.19.41.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Jul 2021 19:41:10 -0700 (PDT) Subject: Re: [PATCH] virtio-balloon: Use virtio_find_vqs() helper To: tianxianting , Xianting Tian , mst@redhat.com, david@redhat.com References: <1626190724-7942-1-git-send-email-xianting_tian@126.com> From: Jason Wang Message-ID: <76a227a9-1b2c-c433-c8d9-5963fb56028d@redhat.com> Date: Tue, 20 Jul 2021 10:41:03 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jasowang@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Cc: linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org X-BeenThere: virtualization@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux virtualization List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: base64 Content-Type: text/plain; charset="utf-8"; Format="flowed" Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" CuWcqCAyMDIxLzcvMTkg5LiL5Y2IMTI6MjIsIHRpYW54aWFudGluZyDlhpnpgZM6Cj4gdGhhbmtz LAo+Cj4gSSBjaGVja2VkLCBhY3R1YWxseSBhbGwgdmlydGlvIGRyaXZlcnMgaGF2ZSBzd2l0Y2hl ZCB0byB1c2UgdGhlIGhlbHBlciAKPiBhZnRlciB0aGlzIG9uZSBtZXJnZWQuCgoKT2suIENvb2wu CgpUaGFua3MKCgo+Cj4g5ZyoIDIwMjEvNy8xOSDkuIrljYgxMTo0NiwgSmFzb24gV2FuZyDlhpnp gZM6Cj4+Cj4+IOWcqCAyMDIxLzcvMTYg5LiL5Y2IODo0NiwgdGlhbnhpYW50aW5nIOWGmemBkzoK Pj4+IERvIHlvdSBpbnRlcmVzdCBpbiB0aGlzIHBhdGNoPyBqdXN0IGxpdHRsZSBpbXByb3ZtZW50 OikKPj4+Cj4+PiDlnKggMjAyMS83LzEzIOS4i+WNiDExOjM4LCBYaWFudGluZyBUaWFuIOWGmemB kzoKPj4+PiBGcm9tOiBYaWFudGluZyBUaWFuIDx4aWFudGluZy50aWFuQGxpbnV4LmFsaWJhYmEu Y29tPgo+Pj4+Cj4+Pj4gVXNlIHRoZSBoZWxwZXIgdmlydGlvX2ZpbmRfdnFzKCkuCj4+Pj4KPj4+ PiBTaWduZWQtb2ZmLWJ5OiBYaWFudGluZyBUaWFuIDx4aWFudGluZy50aWFuQGxpbnV4LmFsaWJh YmEuY29tPgo+Pj4+IC0t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