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=-7.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 2A15BC2B9F4 for ; Thu, 17 Jun 2021 11:46:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 129B36140C for ; Thu, 17 Jun 2021 11:46:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232402AbhFQLsV (ORCPT ); Thu, 17 Jun 2021 07:48:21 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:24324 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231386AbhFQLsU (ORCPT ); Thu, 17 Jun 2021 07:48:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623930373; 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=Ujv31ni+pedAzRqkqN94IhUeHH6igQoDkhQGmN9rbYg=; b=M6L1mTafPswJKarRnC+9Rg9l27Jrnsm2dzFzftOWOU3J6x3FYItDzIioiE1I95G+3C9zZ5 QgGhMN/D5n7yalKArgMLAYiO3P2lac2c9pHsKyRJ9QV4Gu1fhEtLMibrOY4GjKDdKL8JeV GuJyY2yx5BcwDSFHUYo6BGu/vLEkr6M= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-510-wQCeSA2zMZixc_1LuT0a7w-1; Thu, 17 Jun 2021 07:46:11 -0400 X-MC-Unique: wQCeSA2zMZixc_1LuT0a7w-1 Received: by mail-ej1-f69.google.com with SMTP id jy19-20020a1709077633b02903eb7acdb38cso2050698ejc.14 for ; Thu, 17 Jun 2021 04:46:11 -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-language :content-transfer-encoding; bh=Ujv31ni+pedAzRqkqN94IhUeHH6igQoDkhQGmN9rbYg=; b=jNOuaJZ4e9OLeh3fWPsWu21VghrjqyMV3PN3IKuAegapYtAVRcbAMctBIayBUUM7LE +hf29Kj8M17E64B4CRH3sMfqnhaRRbW2t2nei2Un2g2StlnHsxoavB9lrlGD5zwTYq/I qncAxHj4j/hmpqhAUnXyCya7szxFD4+Lfo55eNbqRsqZC8YFnnTGT4qvAEJQIrHBhFnd 6OoDMKHD0G9CoN+W9L/4jiou6mH2iXlG4muvabZ3EZjJPirgKLP2KacCDNBg+hucmgn3 ZqyMC0O6nwQsJpokijPJPu1szTYQq89O0XAwpRP2vHfbiA7BOhMf0ZXxu4/dXtorxTNo 9NjQ== X-Gm-Message-State: AOAM532Lkj9EvsHKnyc0iVcxfVtvmersRDN+xrxJ6l3brLJYwih+QWAH a5Znxb9FlaLsiGz74dhyswX2zEWgSJyRm9fDM3vkIDxRwl3wWO+5J5q/GEA0WA4nig1vSCbh2/e C7uPQGkoO/Dcvx2uW8E2P7U9Cqzdb X-Received: by 2002:aa7:cf0d:: with SMTP id a13mr5826474edy.384.1623930370630; Thu, 17 Jun 2021 04:46:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGp0u6bbKTpBWAweRlzIakuy+NTS2L7DG9uaEaAYNed1OyNxc+QE79jbRlb3hr0uHlxKTUpw== X-Received: by 2002:aa7:cf0d:: with SMTP id a13mr5826434edy.384.1623930370434; Thu, 17 Jun 2021 04:46:10 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:c8dd:75d4:99ab:290a? ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id t14sm1472804edr.36.2021.06.17.04.46.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Jun 2021 04:46:09 -0700 (PDT) Subject: Re: [PATCH v10 3/5] KVM: stats: Add documentation for binary statistics interface To: Greg KH , "Gustavo A. R. Silva" Cc: Jing Zhang , KVM , KVMARM , LinuxMIPS , KVMPPC , LinuxS390 , Linuxkselftest , Marc Zyngier , James Morse , Julien Thierry , Suzuki K Poulose , Will Deacon , Huacai Chen , Aleksandar Markovic , Thomas Bogendoerfer , Paul Mackerras , Christian Borntraeger , Janosch Frank , David Hildenbrand , Cornelia Huck , Claudio Imbrenda , Sean Christopherson , Vitaly Kuznetsov , Jim Mattson , Peter Shier , Oliver Upton , David Rientjes , Emanuele Giuseppe Esposito , David Matlack , Ricardo Koller , Krish Sadhukhan , Fuad Tabba References: <20210617044146.2667540-1-jingzhangos@google.com> <20210617044146.2667540-4-jingzhangos@google.com> <0d959828-da89-bceb-f7cc-35622a60c431@redhat.com> From: Paolo Bonzini Message-ID: <348aa108-076b-04dd-9fd2-e840a7a85f5d@redhat.com> Date: Thu, 17 Jun 2021 13:46:08 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org On 17/06/21 13:42, Greg KH wrote: > On Thu, Jun 17, 2021 at 01:29:22PM +0200, Paolo Bonzini wrote: >> On 17/06/21 07:56, Greg KH wrote: >>> On Thu, Jun 17, 2021 at 04:41:44AM +0000, Jing Zhang wrote: >>>> +string starts at the end of ``struct kvm_stats_desc``. >>>> +The maximum length (including trailing '\0') is indicated by ``name_size`` >>>> +in ``struct kvm_stats_header``. >>> >>> I thought we were replacing [0] arrays with [], are you sure you should >>> be declaring this as [0]? Same for all structures in this document (and >>> code). >> >> In C code [0] is a bit more flexible than []. I think in this particular >> case [] won't work due to how the structures are declared. In the >> documentation [] is certainly clearer. > > Look at all of the patches that Gustavo has been doing all over the tree > for this work, you do not want to make him do this again here. > > Gustavo, is [0] ok for fields like these? I should be able to get back to KVM stuff later today, I'll check myself if [] can be applied and reply. I had queued an early version of these for my local build to play with them but I haven't been able to do a complete review. Paolo