Re: [PATCH v10 3/5] KVM: stats: Add documentation for binary statistics interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [KVM Development]     [KVM ARM]     [KVM ia64]     [Linux Virtualization]     [Linux USB Devel]     [Linux Video]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux