lkml.org 
[lkml]   [2020]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] bitfield.h: add FIELD_MAX() and field_max()
On Fri, 28 Feb 2020 12:06:09 -0600 Alex Elder wrote:
> On 2/28/20 12:04 PM, Alex Elder wrote:
> >
> >
> > I find field_max() to be a good name for what I'm looking for.
>
> Sorry I wanted to add this but clicked "send" too fast.
>
> Yes it's the same as field_mask(), but that name only *implies*
> it is the same as the maximum value. I mean, they're the same,
> but the name I'm suggesting conveys its purpose better.

We got FIELD_FIT tho.. The comparison is part of the macro there,
and it catches negative values if they manage to sneak in.

\
 
 \ /
  Last update: 2020-02-28 19:35    [W:0.056 / U:0.700 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site