Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4187100pxv; Mon, 19 Jul 2021 19:44:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw224GPIsFJTp9qlXpIBDzDet/Iz5W8cnBF7X40OME/xRILFBshkPH4hLpJJ6PUsOx8ZnGO X-Received: by 2002:a05:6402:37a:: with SMTP id s26mr38813888edw.114.1626749072442; Mon, 19 Jul 2021 19:44:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626749072; cv=none; d=google.com; s=arc-20160816; b=lz4ZYA3O88zeaVe31H0LX0aywPXhrEnYcb4KzlG5nb8u6jFjqf0t9Hr5/WsafEClSr 7SrERkkJNf2qtwiasBK23IfXRoBNjxBDh/lwwYg2PhtYZZ+3vedcpDG81uzAVB90GnRb 8APKNJtIfr3z/6qL3c/k/mDGbBDaRz4ytlWG/HcqDodOTZKWMGpxAnVIwFlTqDf6z56S 6nFjO0+HTXtfBkIUh8c7zgo5pBhbYbvN9rJsZBE7+mJbt7VEdDnhIVDgbrxRG+58FnFj HL89VornWfCmJ8IMVsKf/07esDgqn6H5n+kHtnOdcW6y0Ml8OVTrBW2q7LWmCvGHiKPG cr6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=9cx9vRaJKoB0elI+pAj8wQCUn2TBTDPaE649XEXqz5I=; b=pLPHmKgTBxyvxuJ/H1CL7RH9qLIZKeeo5wh70pVALsIB6dTl/RHLzm898vVdmbHBL+ jT8kqiUCM9mwi6u/2qZFKO6sNXSf7GQ6h94rmURaZCCeqDCFJK+RU3BObTV1Y4xANJzK yxnZwPhUYyXcM5G3LVgqCIgflxMa75jjppfqZyORoyonCg2W1GU7xa6++oRuNT49pCuJ L5n3Z0foG64T2OTi9eoL8o6kxTpO+U4aetZKOsvhp3UuxbgZ8/ut6K7FJkvefWxV4inX GXjugy5dcPYbkVPhZNBzrj23dd8o/zuz05sncrxlgJs/3A6vJZMWjawsUYamo5zq26mg wzeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hmdyk5gE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r26si23778824edt.275.2021.07.19.19.44.09; Mon, 19 Jul 2021 19:44:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hmdyk5gE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245667AbhGTCBP (ORCPT + 99 others); Mon, 19 Jul 2021 22:01:15 -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-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 >