Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755639AbcLBHwJ (ORCPT ); Fri, 2 Dec 2016 02:52:09 -0500 Received: from mail-out.m-online.net ([212.18.0.9]:49838 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751711AbcLBHwI (ORCPT ); Fri, 2 Dec 2016 02:52:08 -0500 X-Auth-Info: sffMINA5PcEMe7kJx3sW/RRlsiHyNU5LEPslJsBJeJg= Date: Fri, 2 Dec 2016 08:51:57 +0100 From: Anatolij Gustschin To: Joshua Clayton Cc: Alan Tull , Moritz Fischer , Rob Herring , Mark Rutland , Russell King , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v4 1/3] lib: add bitrev8x4() Message-ID: <20161202085157.1a6ec811@crub> In-Reply-To: <8fb2f1c2-c39c-b74f-d5c8-d6731cbd67c8@gmail.com> References: <20161201234523.3bed63dc@crub> <8fb2f1c2-c39c-b74f-d5c8-d6731cbd67c8@gmail.com> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 748 Lines: 25 Hi Joshua, On Thu, 1 Dec 2016 16:04:09 -0800 Joshua Clayton stillcompiling@gmail.com wrote: ... >>> +static __always_inline __attribute_const__ u32 __arch_bitrev8x4(u32 x) >>> +{ >>> + __asm__ ("rbit %0, %1; rev %0, %0" : "=r" (x) : "r" (x)); >> return x; >Oops thats a little embarrassing; >I'll add a return. >>> +} >> otherwise you get >> >> In function '__arch_bitrev8x4': >> warning: no return statement in function returning non-void [-Wreturn-type] >> > >I wonder why I do not see this warning when compiling. The inlining, maybe? do you have CONFIG_HAVE_ARCH_BITREVERSE=y in your .config? Probably not optimized code is used, otherwise you will send wrong data to FPGA (due to wrong return values from __arch_bitrev8x4). Anatolij