Re: [PATCH 1/2] Compiler Attributes: Add __access macro

From: David Laight

Date: Wed Apr 22 2026 - 09:08:30 EST


On Wed, 22 Apr 2026 12:25:32 +0200
Miguel Ojeda <miguel.ojeda.sandonis@xxxxxxxxx> wrote:

> On Wed, Apr 22, 2026 at 12:01 PM David Laight
> <david.laight.linux@xxxxxxxxx> wrote:
> >
> > Putting the actual syntax in the comment would help, eg as:
> > __access__(read_only|read_write|write_only|none, param_number[, size])
>
> I guess you mean as a quick reminder for those that already know about
> the attribute?
>
> That sounds OK for an attribute like this, though generally speaking I
> would avoid duplicating the compiler docs. (Hopefully people will
> still read the actual docs... :)

It might save someone who is just 'wondering what it is about' from having
to read the gcc docs - particularly if reading the file where you don't have
a browser handy, or in an editor that doesn't support following links.

I also had to read a lot of the 'actual doc' to get a hint of what it
all meant.

> By the way, that could be `__access`, i.e. documenting our side, i.e. the macro.

True, and ', size' should be ', count'.

David

>
> Cheers,
> Miguel