Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752362AbcLEUw5 (ORCPT ); Mon, 5 Dec 2016 15:52:57 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:18432 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752296AbcLEUww (ORCPT ); Mon, 5 Dec 2016 15:52:52 -0500 Date: Mon, 5 Dec 2016 23:52:26 +0300 From: Dan Carpenter To: Laurentiu Tudor Cc: Stuart Yoder , "gregkh@linuxfoundation.org" , "devel@driverdev.osuosl.org" , "agraf@suse.de" , Ruxandra Ioana Radulescu , "arnd@arndb.de" , Roy Pledge , "linux-kernel@vger.kernel.org" , Leo Li , Catalin Horghidan , Ioana Ciornei Subject: Re: [PATCH v3 4/9] bus: fsl-mc: dpio: add frame descriptor and scatter/gather APIs Message-ID: <20161205205226.GB31322@mwanda> References: <1480632094-3621-1-git-send-email-stuart.yoder@nxp.com> <1480632094-3621-5-git-send-email-stuart.yoder@nxp.com> <5841651D.5080703@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5841651D.5080703@nxp.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 462 Lines: 12 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