From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yijing Wang Subject: Re: [PATCH 2/2] clocksource: Make clocksource register functions void Date: Mon, 10 Feb 2014 09:13:55 +0800 Message-ID: <52F827D3.5080906@huawei.com> References: <1390461166-36440-1-git-send-email-wangyijing@huawei.com> <52E0C889.6000106@prisktech.co.nz> <063D6719AE5E284EB5DD2968C1650D6D46489C@AcuExch.aculab.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-subscribe: List-owner: List-post: List-archive: To: Thomas Gleixner , David Laight Cc: 'Tony Prisk' , John Stultz , "linux-mips@linux-mips.org" , Daniel Lezcano , Kevin Hilman , "linux@lists.openrisc.net" , Sekhar Nori , Paul Mackerras , "H. Peter Anvin" , Daniel Walker , Hans-Christian Egtvedt , Jonas Bonn , Kukjin Kim , Russell King , Richard Weinberger , "x86@kernel.org" , Tony Lindgren , Ingo Molnar , "linux-arm-msm@vger.kernel.org" List-Id: linux-omap@vger.kernel.org On 2014/2/6 4:40, Thomas Gleixner wrote: > Yijing, > > On Thu, 23 Jan 2014, David Laight wrote: > >> From: Linuxppc-dev Tony Prisk >>> On 23/01/14 20:12, Yijing Wang wrote: >>>> Currently, clocksource_register() and __clocksource_register_scale() >>>> functions always return 0, it's pointless, make functions void. >>>> And remove the dead code that check the clocksource_register_hz() >>>> return value. >>> ...... >>>> -static inline int clocksource_register_hz(struct clocksource *cs, u32 hz) >>>> +static inline void clocksource_register_hz(struct clocksource *cs, u32 hz) >>>> { >>>> return __clocksource_register_scale(cs, 1, hz); >>>> } >>> >>> This doesn't make sense - you are still returning a value on a function >>> declared void, and the return is now from a function that doesn't return >>> anything either ?!?! >>> Doesn't this throw a compile-time warning?? >> >> It depends on the compiler. >> Recent gcc allow it. >> I don't know if it is actually valid C though. >> >> There is no excuse for it on lines like the above though. > > Can you please resend with that fixed against 3.14-rc1 ? OK, I will resend later. Thanks! Yijing. > > . > -- Thanks! Yijing