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.0 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 16E09C07E95 for ; Fri, 16 Jul 2021 12:53:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D9564613F5 for ; Fri, 16 Jul 2021 12:53:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234357AbhGPM4q (ORCPT ); Fri, 16 Jul 2021 08:56:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:51147 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232757AbhGPM4n (ORCPT ); Fri, 16 Jul 2021 08:56:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626440028; 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=ZPTvg/IdQ5a8q1Cw2aONE7wqYd41qCqeyO8lI1tAOio=; b=Aki8yLEkr7NTZkRBvMqCtGIL05++in5lb1I9bWKic0jM6QOechHWiICFwzrAyJXqzqrJq9 NcNprWTqF2AS2uieRGlfdb4Jx8jevZqac6O8+MgZa48o5/chWMYBhV8SxJ3RpCrvL6I6W4 XK9xiWHIjA3jAYzZk1srFgwOJVOkUyw= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-549-fFSt400nMzmEUDWFFMy0rA-1; Fri, 16 Jul 2021 08:53:45 -0400 X-MC-Unique: fFSt400nMzmEUDWFFMy0rA-1 Received: by mail-wr1-f72.google.com with SMTP id k3-20020a5d52430000b0290138092aea94so4794006wrc.20 for ; Fri, 16 Jul 2021 05:53:44 -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:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=ZPTvg/IdQ5a8q1Cw2aONE7wqYd41qCqeyO8lI1tAOio=; b=NIgopcLZ1KaHCEOYSJL2rpw4DaYbVa2287WROoh+GMG/IJme/mlUPnGqThA1nS/XbD ny2SwLKSEQ5McaxSAkcavAq8QhXNCC1QWrzrpkp7pZ4Vrqc09bcrzSlNnv0gtFLowRLE 65sODkEK/RqWVcSYXPpIFlxWiHg1v1rcs3IQRGIm1uoanIS13tgVVzQH6X84S1+F5vwl aahwTONQWeC+qEwrUxLrbXW2jUamNlJsX5OiDPF8MzGv8Immg8gQ9b7L/X1fT5g0iqOk R0tKYuw8XsAZU/nxfrHN+pEI0r8bij0ZLUWep59XuiUfFqs/V5AHfkT8I+CqlHH41IDc DLYA== X-Gm-Message-State: AOAM531n2aTelmpaoQeboBvF70/V3kJ50OPkis7w9yxwSJa+18gZqjkx Qy7+KjW7XktjFyHqRLMgdLDTtTEYo0f3j0OrxjtzRzqEw6lhBQNt29SnMzoX14iXgFe4e4V5S/n KTyCzYRQ+TBXU57irOXGj0h+Mrw0nb2OGgGl5R22/kjwoiMWciR3K3o8sP/1R6izKWXheeqJH X-Received: by 2002:a5d:428d:: with SMTP id k13mr12290466wrq.269.1626440023983; Fri, 16 Jul 2021 05:53:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6BW5q2g15VlrWMWnSGVnKtR76dMaQz5P9c1z3WEUts29V8IRrZ432wuNnnmC9NNxuPsb/EQ== X-Received: by 2002:a5d:428d:: with SMTP id k13mr12290445wrq.269.1626440023790; Fri, 16 Jul 2021 05:53:43 -0700 (PDT) Received: from [192.168.3.132] (p5b0c621f.dip0.t-ipconnect.de. [91.12.98.31]) by smtp.gmail.com with ESMTPSA id z16sm9867946wrh.58.2021.07.16.05.53.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 16 Jul 2021 05:53:42 -0700 (PDT) Subject: Re: [PATCH] virtio-balloon: Use virtio_find_vqs() helper To: tianxianting , Xianting Tian , mst@redhat.com, jasowang@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: David Hildenbrand Organization: Red Hat Message-ID: <95d7f688-79fc-05dc-87ca-da46e0179f0e@redhat.com> Date: Fri, 16 Jul 2021 14:53:42 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=gbk; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16.07.21 14:46, tianxianting wrote: > Do you interest in this patch? just little improvment:) I am, especially when I'm cc'ed and aware of it ;) Reviewed-by: David Hildenbrand One nit below > > ÔÚ 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); ^ we tend to indent this such that it is aligned with the line above (see the old code), unless the code becomes unreadable -- Thanks, David / dhildenb 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 30112C636CA for ; Fri, 16 Jul 2021 12:53:54 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (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 C426C613F3 for ; Fri, 16 Jul 2021 12:53:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C426C613F3 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 smtp4.osuosl.org (Postfix) with ESMTP id 7EE7C4053F; Fri, 16 Jul 2021 12:53:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZhImOKwz-tOE; Fri, 16 Jul 2021 12:53:52 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp4.osuosl.org (Postfix) with ESMTPS id A19CC40536; Fri, 16 Jul 2021 12:53:51 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 7362AC0010; Fri, 16 Jul 2021 12:53:51 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 473C6C000E for ; Fri, 16 Jul 2021 12:53:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 202C440536 for ; Fri, 16 Jul 2021 12:53:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gFKBL0qEH1zX for ; Fri, 16 Jul 2021 12:53:48 +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 smtp4.osuosl.org (Postfix) with ESMTPS id EC5BE404FD for ; Fri, 16 Jul 2021 12:53:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626440026; 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=ZPTvg/IdQ5a8q1Cw2aONE7wqYd41qCqeyO8lI1tAOio=; b=AQUH9sPJRUoWQjF51dsTGTiBZyVn+OQ14MRN+TUPKFoXFaAN4eeGAjT2ygyPnGOwiSWX0J ASznKgIpUF6hbb4EWWCYrtkVkfbnSsEDMGlfxjMKTNyd+vIfmxS0zgPfKh4rUG+cREGnJy 9IYiFxe70WHi8/T5c/TmydgDya2MOqU= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-84-Di3LZ1KNOMmArIkSqqw3eA-1; Fri, 16 Jul 2021 08:53:45 -0400 X-MC-Unique: Di3LZ1KNOMmArIkSqqw3eA-1 Received: by mail-wm1-f71.google.com with SMTP id o21-20020a05600c4fd5b029023448cbd285so2488203wmq.2 for ; Fri, 16 Jul 2021 05:53:44 -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:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=ZPTvg/IdQ5a8q1Cw2aONE7wqYd41qCqeyO8lI1tAOio=; b=N7nT0XhIxuemuqZd7jkq0VxEk3tJg6vyrlplR3lASQu4Df8WmkhAZkDQ54l9LZQM1N SBqTMpf+V1fGPebVKMVDl3/+lBArzGW5JtXEY1Ml8GN2CyTEx2QG6+X0kB4kfWNpXYnR MAIL7sCk54QXue9pJMkOroPlQqAo3SH+zCdLlrBBgEaLdVHeqJbliNSBoCqyRi5MkKzz mP0KuYfow5GRiKvVFHiKLYTxV1R+etLOaxR4EzqVJrkJ6GFn20cqoIS3+jhgEaq172d3 NdGh2cdAf99mf4CbdO9FlkwojdgQ+KzpF0H70YfkKcKm/eBGPmKcJiZ4zpoQWvYkzWCM oQpQ== X-Gm-Message-State: AOAM5334UnAe63Q3E0A812G6huiEJiNGbWOU4ZJD1iWwniZCer0wxJEV oS7L9kaKQxknJW6U1zN9YTtdn10rPF20ejVo2PTGRR6d2/QqriugZ51Zpx/4/6h4qKIITPcQtDI M4D671HsfwBr8xSHK3xHY2y/mtRh7NIaymZxvoviOYg== X-Received: by 2002:a5d:428d:: with SMTP id k13mr12290462wrq.269.1626440023951; Fri, 16 Jul 2021 05:53:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6BW5q2g15VlrWMWnSGVnKtR76dMaQz5P9c1z3WEUts29V8IRrZ432wuNnnmC9NNxuPsb/EQ== X-Received: by 2002:a5d:428d:: with SMTP id k13mr12290445wrq.269.1626440023790; Fri, 16 Jul 2021 05:53:43 -0700 (PDT) Received: from [192.168.3.132] (p5b0c621f.dip0.t-ipconnect.de. [91.12.98.31]) by smtp.gmail.com with ESMTPSA id z16sm9867946wrh.58.2021.07.16.05.53.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 16 Jul 2021 05:53:42 -0700 (PDT) Subject: Re: [PATCH] virtio-balloon: Use virtio_find_vqs() helper To: tianxianting , Xianting Tian , mst@redhat.com, jasowang@redhat.com References: <1626190724-7942-1-git-send-email-xianting_tian@126.com> From: David Hildenbrand Organization: Red Hat Message-ID: <95d7f688-79fc-05dc-87ca-da46e0179f0e@redhat.com> Date: Fri, 16 Jul 2021 14:53:42 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; 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=david@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="gbk"; Format="flowed" Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" T24gMTYuMDcuMjEgMTQ6NDYsIHRpYW54aWFudGluZyB3cm90ZToKPiBEbyB5b3UgaW50ZXJlc3Qg aW4gdGhpcyBwYXRjaD8ganVzdCBsaXR0bGUgaW1wcm92bWVudDopCgpJIGFtLCBlc3BlY2lhbGx5 IHdoZW4gSSdtIGNjJ2VkIGFuZCBhd2FyZSBvZiBpdCA7KQoKUmV2aWV3ZWQtYnk6IERhdmlkIEhp bGRlbmJyYW5kIDxkYXZpZEByZWRoYXQuY29tPgoKT25lIG5pdCBiZWxvdwoKPiAKPiDU2iAyMDIx LzcvMTMgz8LO5zExOjM4LCBYaWFudGluZyBUaWFuINC0tcA6Cj4+IEZyb206IFhpYW50aW5nIFRp YW4gPHhpYW50aW5nLnRpYW5AbGludXguYWxpYmFiYS5jb20+Cj4+Cj4+IFVzZSB0aGUgaGVscGVy IHZpcnRpb19maW5kX3ZxcygpLgo+Pgo+PiBTaWduZWQtb2ZmLWJ5OiBYaWFudGluZyBUaWFuIDx4 aWFudGluZy50aWFuQGxpbnV4LmFsaWJhYmEuY29tPgo+PiAtLS0KPj4gICAgZHJpdmVycy92aXJ0 aW8vdmlydGlvX2JhbGxvb24uYyB8IDQgKystLQo+PiAgICAxIGZpbGUgY2hhbmdlZCwgMiBpbnNl cnRpb25zKCspLCAyIGRlbGV0aW9ucygtKQo+Pgo+PiBkaWZmIC0tZ2l0IGEvZHJpdmVycy92aXJ0 aW8vdmlydGlvX2JhbGxvb24uYyBiL2RyaXZlcnMvdmlydGlvL3ZpcnRpb19iYWxsb29uLmMKPj4g aW5kZXggNTEwZTkzMS4uMThlMGJmMyAxMDA2NDQKPj4gLS0tIGEvZHJpdmVycy92aXJ0aW8vdmly dGlvX2JhbGxvb24uYwo+PiArKysgYi9kcml2ZXJzL3ZpcnRpby92aXJ0aW9fYmFsbG9vbi5jCj4+ IEBAIC01MzEsOCArNTMxLDggQEAgc3RhdGljIGludCBpbml0X3ZxcyhzdHJ1Y3QgdmlydGlvX2Jh bGxvb24gKnZiKQo+PiAgICAJCWNhbGxiYWNrc1tWSVJUSU9fQkFMTE9PTl9WUV9SRVBPUlRJTkdd ID0gYmFsbG9vbl9hY2s7Cj4+ICAgIAl9Cj4+ICAgIAo+PiAtCWVyciA9IHZiLT52ZGV2LT5jb25m aWctPmZpbmRfdnFzKHZiLT52ZGV2LCBWSVJUSU9fQkFMTE9PTl9WUV9NQVgsCj4+IC0JCQkJCSB2 cXMsIGNhbGxiYWNrcywgbmFtZXMsIE5VTEwsIE5VTEwpOwo+PiArCWVyciA9IHZpcnRpb19maW5k X3Zxcyh2Yi0+dmRldiwgVklSVElPX0JBTExPT05fVlFfTUFYLCB2cXMsCj4+ICsJCQkJY2FsbGJh Y2tzLCBuYW1lcywgTlVMTCk7CgkJCQleCndlIHRlbmQgdG8gaW5kZW50IHRoaXMgc3VjaCB0aGF0 IGl0IGlzIGFsaWduZWQgd2l0aCB0aGUgbGluZSBhYm92ZSAoc2VlIAp0aGUgb2xkIGNvZGUpLCB1 bmxlc3MgdGhlIGNvZGUgYmVjb21lcyB1bnJlYWRhYmxlCgoKLS0gClRoYW5rcywKCkRhdmlkIC8g ZGhpbGRlbmIKCl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f ClZpcnR1YWxpemF0aW9uIG1haWxpbmcgbGlzdApWaXJ0dWFsaXphdGlvbkBsaXN0cy5saW51eC1m b3VuZGF0aW9uLm9yZwpodHRwczovL2xpc3RzLmxpbnV4Zm91bmRhdGlvbi5vcmcvbWFpbG1hbi9s aXN0aW5mby92aXJ0dWFsaXphdGlvbg==