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: Thu, 23 Jan 2014 16:17:33 +0800 Message-ID: <52E0D01D.3080403@huawei.com> References: <1390461166-36440-1-git-send-email-wangyijing@huawei.com> <52E0C889.6000106@prisktech.co.nz> <52E0CD18.5080104@prisktech.co.nz> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <52E0CD18.5080104@prisktech.co.nz> 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: Tony Prisk , Geert Uytterhoeven Cc: John Stultz , Thomas Gleixner , Linux MIPS Mailing List , Daniel Lezcano , Kevin Hilman , Benjamin Herrenschmidt , linux , Sekhar Nori , Paul Mackerras , "H. Peter Anvin" , Daniel Walker , Hans-Christian Egtvedt , Jonas Bonn , Kukjin Kim , Russell King , Richard Weinberger , the arch/x86 maintainers , Tony Lindgren , Ingo Molnar , linux-arm-msm@vge List-Id: linux-arm-msm@vger.kernel.org On 2014/1/23 16:04, Tony Prisk wrote: > 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 Thanks! > > Regards > Tony Prisk > > > . > -- Thanks! Yijing From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 23 Jan 2014 09:23:56 +0100 (CET) Received: from szxga02-in.huawei.com ([119.145.14.65]:1735 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S6825722AbaAWIXyFUNT- (ORCPT ); Thu, 23 Jan 2014 09:23:54 +0100 Received: from 172.24.2.119 (EHLO szxeml210-edg.china.huawei.com) ([172.24.2.119]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id BOZ66105; Thu, 23 Jan 2014 16:19:58 +0800 (CST) Received: from SZXEML413-HUB.china.huawei.com (10.82.67.152) by szxeml210-edg.china.huawei.com (172.24.2.183) with Microsoft SMTP Server (TLS) id 14.3.158.1; Thu, 23 Jan 2014 16:17:45 +0800 Received: from [127.0.0.1] (10.177.27.212) by szxeml413-hub.china.huawei.com (10.82.67.152) with Microsoft SMTP Server id 14.3.158.1; Thu, 23 Jan 2014 16:17:39 +0800 Message-ID: <52E0D01D.3080403@huawei.com> Date: Thu, 23 Jan 2014 16:17:33 +0800 From: Yijing Wang User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: Tony Prisk , Geert Uytterhoeven CC: John Stultz , Thomas Gleixner , Linux MIPS Mailing List , Daniel Lezcano , Kevin Hilman , Benjamin Herrenschmidt , linux , Sekhar Nori , Paul Mackerras , "H. Peter Anvin" , Daniel Walker , Hans-Christian Egtvedt , Jonas Bonn , Kukjin Kim , Russell King , "Richard Weinberger" , the arch/x86 maintainers , Tony Lindgren , Ingo Molnar , , David Brown , Haavard Skinnemoen , Mike Frysinger , uml-devel , Nicolas Ferre , Jeff Dike , "Barry Song" , , uml-user , "linux-omap@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , , Michal Simek , Jim Cromie , , Hanjun Guo , "linux-kernel@vger.kernel.org" , Ralf Baechle , Bryan Huntsman , "uclinux-dist-devel@blackfin.uclinux.org" , "linuxppc-dev@lists.ozlabs.org" 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> <52E0CD18.5080104@prisktech.co.nz> In-Reply-To: <52E0CD18.5080104@prisktech.co.nz> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.27.212] X-CFilter-Loop: Reflected Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 39084 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: wangyijing@huawei.com Precedence: bulk List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips X-List-ID: linux-mips List-subscribe: List-owner: List-post: List-archive: X-list: linux-mips On 2014/1/23 16:04, Tony Prisk wrote: > 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 Thanks! > > Regards > Tony Prisk > > > . > -- Thanks! Yijing From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from szxga02-in.huawei.com ([119.145.14.65]:1735 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S6825722AbaAWIXyFUNT- (ORCPT ); Thu, 23 Jan 2014 09:23:54 +0100 Message-ID: <52E0D01D.3080403@huawei.com> Date: Thu, 23 Jan 2014 16:17:33 +0800 From: Yijing Wang MIME-Version: 1.0 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> <52E0CD18.5080104@prisktech.co.nz> In-Reply-To: <52E0CD18.5080104@prisktech.co.nz> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-Path: 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: Tony Prisk , Geert Uytterhoeven Cc: John Stultz , Thomas Gleixner , Linux MIPS Mailing List , Daniel Lezcano , Kevin Hilman , Benjamin Herrenschmidt , linux , Sekhar Nori , Paul Mackerras , "H. Peter Anvin" , Daniel Walker , Hans-Christian Egtvedt , Jonas Bonn , Kukjin Kim , Russell King , Richard Weinberger , the arch/x86 maintainers , Tony Lindgren , Ingo Molnar , linux-arm-msm@vger.kernel.org, David Brown , Haavard Skinnemoen , Mike Frysinger , uml-devel , Nicolas Ferre , Jeff Dike , Barry Song , linux-samsung-soc@vger.kernel.org, uml-user , "linux-omap@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , davinci-linux-open-source@linux.davincidsp.com, Michal Simek , Jim Cromie , microblaze-uclinux@itee.uq.edu.au, Hanjun Guo , "linux-kernel@vger.kernel.org" , Ralf Baechle , Bryan Huntsman , "uclinux-dist-devel@blackfin.uclinux.org" , "linuxppc-dev@lists.ozlabs.org" Message-ID: <20140123081733.azarjDlfB6C8bIWE4_s4LgXz7_hpfiWKe1AdeGNTLtQ@z> On 2014/1/23 16:04, Tony Prisk wrote: > 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 Thanks! > > Regards > Tony Prisk > > > . > -- Thanks! Yijing From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [119.145.14.65]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 322972C0092 for ; Thu, 23 Jan 2014 19:31:13 +1100 (EST) Message-ID: <52E0D01D.3080403@huawei.com> Date: Thu, 23 Jan 2014 16:17:33 +0800 From: Yijing Wang MIME-Version: 1.0 To: Tony Prisk , 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> <52E0CD18.5080104@prisktech.co.nz> In-Reply-To: <52E0CD18.5080104@prisktech.co.nz> Content-Type: text/plain; charset="UTF-8" Cc: Linux MIPS Mailing List , the arch/x86 maintainers , Kevin Hilman , linux , Hanjun Guo , Sekhar Nori , Michal Simek , Paul Mackerras , Ralf Baechle , "H. Peter Anvin" , 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 , "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 2014/1/23 16:04, Tony Prisk wrote: > 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 Thanks! > > Regards > Tony Prisk > > > . > -- Thanks! Yijing From mboxrd@z Thu Jan 1 00:00:00 1970 From: wangyijing@huawei.com (Yijing Wang) Date: Thu, 23 Jan 2014 16:17:33 +0800 Subject: [PATCH 2/2] clocksource: Make clocksource register functions void In-Reply-To: <52E0CD18.5080104@prisktech.co.nz> References: <1390461166-36440-1-git-send-email-wangyijing@huawei.com> <52E0C889.6000106@prisktech.co.nz> <52E0CD18.5080104@prisktech.co.nz> Message-ID: <52E0D01D.3080403@huawei.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 2014/1/23 16:04, Tony Prisk wrote: > 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 at 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 Thanks! > > Regards > Tony Prisk > > > . > -- Thanks! Yijing