Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757704AbcLBAEO (ORCPT ); Thu, 1 Dec 2016 19:04:14 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:34458 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757499AbcLBAEM (ORCPT ); Thu, 1 Dec 2016 19:04:12 -0500 Subject: Re: [PATCH v4 1/3] lib: add bitrev8x4() To: Anatolij Gustschin References: <20161201234523.3bed63dc@crub> 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 From: Joshua Clayton Message-ID: <8fb2f1c2-c39c-b74f-d5c8-d6731cbd67c8@gmail.com> Date: Thu, 1 Dec 2016 16:04:09 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20161201234523.3bed63dc@crub> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 964 Lines: 35 Hello Anatolij, Thanks for the review. On 12/01/2016 02:45 PM, Anatolij Gustschin wrote: > On Thu, 1 Dec 2016 09:04:50 -0800 > Joshua Clayton stillcompiling@gmail.com wrote: > ... >> diff --git a/arch/arm/include/asm/bitrev.h b/arch/arm/include/asm/bitrev.h >> index ec291c3..6d2e9ca 100644 >> --- a/arch/arm/include/asm/bitrev.h >> +++ b/arch/arm/include/asm/bitrev.h >> @@ -17,4 +17,9 @@ static __always_inline __attribute_const__ u8 __arch_bitrev8(u8 x) >> return __arch_bitrev32((u32)x) >> 24; >> } >> >> +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] > > -- > Anatolij I wonder why I do not see this warning when compiling. The inlining, maybe? Joshua