From mboxrd@z Thu Jan 1 00:00:00 1970 From: Igor Grinberg Subject: Re: [PATCH] BUILD FIX:hwspinlock: do not return any value from void funtion Date: Mon, 07 Nov 2011 15:07:25 +0200 Message-ID: <4EB7D80D.2080108@compulab.co.il> References: <1320670686-29286-1-git-send-email-hvaibhav@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from 50.23.254.54-static.reverse.softlayer.com ([50.23.254.54]:53325 "EHLO softlayer.compulab.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754833Ab1KGNHi (ORCPT ); Mon, 7 Nov 2011 08:07:38 -0500 In-Reply-To: <1320670686-29286-1-git-send-email-hvaibhav@ti.com> Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: Vaibhav Hiremath Cc: linux-omap@vger.kernel.org, tony@atomide.com, ohad@wizery.com Hi Vaibhav, On 11/07/11 14:58, Vaibhav Hiremath wrote: > Fixes below compilation error - > > CC arch/arm/mach-omap2/hwspinlock.o > cc1: warnings being treated as errors > In file included from arch/arm/mach-omap2/hwspinlock.c:22:0: > include/linux/hwspinlock.h: In function '__hwspin_unlock': > include/linux/hwspinlock.h:121:2: error: 'return' with a value, in function > returning void > make[1]: *** [arch/arm/mach-omap2/hwspinlock.o] Error 1 > make: *** [arch/arm/mach-omap2] Error 2 > > Signed-off-by: Vaibhav Hiremath > --- > include/linux/hwspinlock.h | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/include/linux/hwspinlock.h b/include/linux/hwspinlock.h > index 08a2fee..192710a 100644 > --- a/include/linux/hwspinlock.h > +++ b/include/linux/hwspinlock.h > @@ -118,7 +118,7 @@ int __hwspin_trylock(struct hwspinlock *hwlock, int mode, unsigned long *flags) > static inline > void __hwspin_unlock(struct hwspinlock *hwlock, int mode, unsigned long *flags) > { > - return 0; > + return; Isn't it better to just remove this line? > } > > static inline int hwspin_lock_get_id(struct hwspinlock *hwlock) -- Regards, Igor.