From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Date: Sun, 25 Oct 2015 12:40:45 +0000 Subject: [U-Boot] [PATCH 2/2] musb: sunxi: Implement dfu_usb_get_reset() In-Reply-To: <20151025124630.68a2f2e6@lilith> References: <1445748287-12421-1-git-send-email-siarhei.siamashka@gmail.com> <1445748287-12421-3-git-send-email-siarhei.siamashka@gmail.com> <201510251200.09867.marex@denx.de> <20151025124630.68a2f2e6@lilith> Message-ID: <1445776845.28851.5.camel@hellion.org.uk> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sun, 2015-10-25 at 12:46 +0100, Albert ARIBAUD wrote: > > > +static u8 last_int_usb; > > > + > > > +bool dfu_usb_get_reset(void) > > > +{ > > > + return !!(last_int_usb & MUSB_INTR_RESET); > > > > The !! is not needed. > > Except if you want to be sure that you return 0 or 1 rather than 0 or > (1 << something). Doesn't the bool return type already cause that to happen? (from the PoV of the caller@least) Ian.