Re: [PATCH] [trivial] perf: Spelling s/EACCESS/EACCES/

From: Ingo Molnar
Date: Mon May 27 2019 - 11:19:01 EST



* Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote:

> Hi Ingo,
>
> On Mon, May 27, 2019 at 4:12 PM Ingo Molnar <mingo@xxxxxxxxxx> wrote:
> > * Geert Uytterhoeven <geert+renesas@xxxxxxxxx> wrote:
> > > The correct spelling is EACCES:
> > >
> > > include/uapi/asm-generic/errno-base.h:#define EACCES 13 /* Permission denied */
> > >
> > > Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
>
> > > --- a/include/linux/perf_event.h
> > > +++ b/include/linux/perf_event.h
> > > @@ -289,7 +289,7 @@ struct pmu {
> > > * -EBUSY -- @event is for this PMU but PMU temporarily unavailable
> > > * -EINVAL -- @event is for this PMU but @event is not valid
> > > * -EOPNOTSUPP -- @event is for this PMU, @event is valid, but not supported
> > > - * -EACCESS -- @event is for this PMU, @event is valid, but no privilidges
> > > + * -EACCES -- @event is for this PMU, @event is valid, but no privilidges
> > > *
> > > * 0 -- @event is for this PMU and valid
> > > *
> >
> >
> > Actually, -EACCES got typoed itself and survived due to historic reasons.
>
> Quite possible... Someone pointed out a while ago it is part of POSIX,
> hence it cannot be changed.
>
> Probably we can do "#define EACCESS EACCES"?

Don't think that's a good idea, nor is it necessary: it's only a comment,
right? But yeah, I guess we can do.

> > I think we can tolerate the 'typo' fixed in documentation, can we?
>
> IMHO we cannot, as e.g. "git grep -w" won't match both.
> Do you really want the documentation to differ from the implementation?
>
> > Also, the *far* bigger typo is, in the same line:
> >
> > s/privilidges
> > /privileges
>
> Thanks, that one didn't show up with "git grep -w EACCESS" ;-)
> Will send v2...

:-)

Thanks,

Ingo