Re: [PATCH V3 1/5] RDMA/core: Transport-independent access flags

'Christoph Hellwig'
2015-07-07T08:58:45Z

On Mon, Jul 06, 2015 at 09:23:42AM -0500, Steve Wise wrote:
> > Please add an assert for the values that are allowed for attrs.
> >
> > It also would be highly useful to add a kerneldoc comment describing
> > the function and the parameters. Also __bitwise sparse tricks
> > to ensure the right flags are passed wouldn't be a too bad idea.
> >
>
> Can you explain the "__bitwise sparse tricks"? Or point me to an example.

Grep the kernel tree for __bitwise. It allows creating a type with
additional type annotations so that sparse will warn when assigning
incorrect values to it.

> > Why not specfiy these as separate nuerical namespace?
> >
>
> To avoid having to translate them.

But they are different values, so you should translate them.