lkml.org 
[lkml]   [2016]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 4/9] bus: fsl-mc: dpio: add frame descriptor and scatter/gather APIs
On Fri, Dec 02, 2016 at 12:12:14PM +0000, Laurentiu Tudor wrote:
> > +static inline bool dpaa2_sg_is_final(const struct dpaa2_sg_entry *sg)
> > +{
> > + return !!(le16_to_cpu(sg->format_offset) >> SG_FINAL_FLAG_SHIFT);
>
> In other places in this file we don't use the '!!' to convert to bool. Maybe we should drop it here too.

I like the explicit "!!". I think it makes the code more obvious since
all the information is on one line.

regards,
dan carpenter

\
 
 \ /
  Last update: 2016-12-05 21:53    [W:0.079 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site