Re: [PATCH] keys: Make the KEY_NEED_* perms an enum rather than a mask

From: David Howells
Date: Wed May 13 2020 - 19:16:21 EST


Paul Moore <paul@xxxxxxxxxxxxxx> wrote:

> > + case KEY_NEED_VIEW: perm = KEY__VIEW; break;
> > + case KEY_NEED_READ: perm = KEY__READ; break;
> > + case KEY_NEED_WRITE: perm = KEY__WRITE; break;
> > + case KEY_NEED_SEARCH: perm = KEY__SEARCH; break;
> > + case KEY_NEED_LINK: perm = KEY__LINK; break;
> > + case KEY_NEED_SETATTR: perm = KEY__SETATTR; break;
>
> Please don't put the case statements all on one line, use the more
> traditional multi-line format. For example:
>
> case KEY_NEED_SETATTR:
> perm = KEY__SETATTR;
> break;

Tabulation was invented something like 6000 years ago for just this kind of
purpose;-) It's less readable your way, but whatever...

David