Re: [PATCH] docs: leds: uleds: Make the documentation match the code.
From: Björn Persson
Date: Sun May 10 2026 - 15:49:55 EST
Lee Jones wrote:
> On Fri, 24 Apr 2026, Björn Persson wrote:
>
> > Lee Jones wrote:
> > > On Thu, 02 Apr 2026, Björn Persson wrote:
> > >
> > > > +The current brightness is found by reading a whole int from the character
> > >
> > > Try not to shorten names in documentation "integer".
> >
> > The type is named "int" in C. There are many integer types, but it would
> > be wrong to try to read a uint16_t or a size_t or any other integer
> > type. The document needs to use the actual type name to make it clear to
> > the reader that they must read sizeof(int) bytes.
>
> Right, but you're not writing in C.
That's technically true, as I wrote my program in C++. It's far from my
favorite, but I had to use a language that can include C header files
and use C types, because /dev/uleds is a very C-centric interface.
If API documentation isn't allowed to name a type, then I withdraw the
patch. It's pointless to continue. The next programmer will also have to
read the code to find out what the true API is, like I did.
Björn Persson
Attachment:
pgpKYubtohkGP.pgp
Description: OpenPGP digital signatur