[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [virtio-dev] [PATCH] introduction: document #define syntax
On Tue, Mar 16, 2021 at 05:13:17PM -0400, Michael S. Tsirkin wrote: > We use the C #define syntax to refer to numeric values. > Let's document that. > > Signed-off-by: Michael S. Tsirkin <mst@redhat.com> > --- > introduction.tex | 21 +++++++++++++++++++++ > 1 file changed, 21 insertions(+) > > diff --git a/introduction.tex b/introduction.tex > index cc38e29..4febed2 100644 > --- a/introduction.tex > +++ b/introduction.tex > @@ -210,6 +210,27 @@ \section{Structure Specifications} > \begin{lstlisting} > CPU_TO_BE16(B << 15 | A) > \end{lstlisting} > +\section{Constant Specifications} > + > +In many cases, numberic values used in the interface between the device > +and the driver are documented using the C #define and /* */ > +comment syntax. Multiple related values are grouped together with > +a common name as a prefix, using _ as a separator. > +Using _XXX as a suffix refers to all values in a group. This sentence confused me. It's not talking about C #define syntax. It's a convention for referring to the #defines in the spec text. This could be clarified: Multiple constants with the same prefix are referred to in the text using a _XXX a suffix as a shorthand for all constants that share the prefix. I suggest moving this down to the bottom where the VIRTIO_VALUE_XXX example is given.
Attachment:
signature.asc
Description: PGP signature
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]