From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from server.prisktech.co.nz (server.prisktech.co.nz [115.188.14.127]) by ozlabs.org (Postfix) with ESMTP id 2606B2C00A5 for ; Thu, 23 Jan 2014 19:04:13 +1100 (EST) Message-ID: <52E0CD18.5080104@prisktech.co.nz> Date: Thu, 23 Jan 2014 21:04:40 +1300 From: Tony Prisk MIME-Version: 1.0 To: Geert Uytterhoeven Subject: Re: [PATCH 2/2] clocksource: Make clocksource register functions void References: <1390461166-36440-1-git-send-email-wangyijing@huawei.com> <52E0C889.6000106@prisktech.co.nz> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Cc: Linux MIPS Mailing List , the arch/x86 maintainers , Kevin Hilman , linux , Sekhar Nori , Michal Simek , Paul Mackerras , Ralf Baechle , "H. Peter Anvin" , Yijing Wang , Daniel Walker , Hans-Christian Egtvedt , Jonas Bonn , Kukjin Kim , Russell King , Richard Weinberger , Daniel Lezcano , Tony Lindgren , Ingo Molnar , microblaze-uclinux@itee.uq.edu.au, David Brown , Haavard Skinnemoen , Mike Frysinger , uml-devel , linux-arm-msm@vger.kernel.org, Jeff Dike , davinci-linux-open-source@linux.davincidsp.com, linux-samsung-soc@vger.kernel.org, John Stultz , uml-user , Thomas Gleixner , "linux-omap@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Barry Song , Jim Cromie , Hanjun Guo , "linux-kernel@vger.kernel.org" , Nicolas Ferre , Bryan Huntsman , "uclinux-dist-devel@blackfin.uclinux.org" , "linuxppc-dev@lists.ozlabs.org" List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 23/01/14 20:58, Geert Uytterhoeven wrote: > On Thu, Jan 23, 2014 at 8:45 AM, Tony Prisk wrote: >>> -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?? > No, passing on void in functions returning void doesn't cause compiler > warnings. > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds Doesn't seem right to me (even if there is no warning) but that's probably because I used to program in Pascal where functions with no return were 'procedures' :) Whether it needs to be changed or not: For the vt8500 part - Acked-by: Tony Prisk Regards Tony Prisk