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-arm-msm@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 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 10 Feb 2014 02:15:02 +0100 (CET) Received: from szxga01-in.huawei.com ([119.145.14.64]:28267 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S6822672AbaBJBO5qb4n8 (ORCPT ); Mon, 10 Feb 2014 02:14:57 +0100 Received: from 172.24.2.119 (EHLO szxeml209-edg.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id BRB49701; Mon, 10 Feb 2014 09:14:26 +0800 (CST) Received: from SZXEML404-HUB.china.huawei.com (10.82.67.59) by szxeml209-edg.china.huawei.com (172.24.2.184) with Microsoft SMTP Server (TLS) id 14.3.158.1; Mon, 10 Feb 2014 09:14:11 +0800 Received: from [127.0.0.1] (10.177.27.212) by szxeml404-hub.china.huawei.com (10.82.67.59) with Microsoft SMTP Server id 14.3.158.1; Mon, 10 Feb 2014 09:14:01 +0800 Message-ID: <52F827D3.5080906@huawei.com> Date: Mon, 10 Feb 2014 09:13:55 +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: 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" , David Brown , Haavard Skinnemoen , Mike Frysinger , "user-mode-linux-devel@lists.sourceforge.net" , Nicolas Ferre , Jeff Dike , Barry Song , "linux-samsung-soc@vger.kernel.org" , "user-mode-linux-user@lists.sourceforge.net" , "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" 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> <063D6719AE5E284EB5DD2968C1650D6D46489C@AcuExch.aculab.com> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1" 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: 39262 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/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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <52F827D3.5080906@huawei.com> Date: Mon, 10 Feb 2014 09:13:55 +0800 From: Yijing Wang MIME-Version: 1.0 References: <1390461166-36440-1-git-send-email-wangyijing@huawei.com> <52E0C889.6000106@prisktech.co.nz> <063D6719AE5E284EB5DD2968C1650D6D46489C@AcuExch.aculab.com> In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+geert=linux-m68k.org@lists.infradead.org Subject: Re: [PATCH 2/2] clocksource: Make clocksource register functions void To: Thomas Gleixner , David Laight Cc: "linux-mips@linux-mips.org" , "x86@kernel.org" , Kevin Hilman , "linux@lists.openrisc.net" , 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 , "user-mode-linux-devel@lists.sourceforge.net" , "linux-arm-msm@vger.kernel.org" , Jeff Dike , "davinci-linux-open-source@linux.davincidsp.com" , "linux-samsung-soc@vger.kernel.org" , John Stultz , "user-mode-linux-user@lists.sourceforge.net" , "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: 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [119.145.14.64]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 76F262C00B0 for ; Mon, 10 Feb 2014 12:26:31 +1100 (EST) Message-ID: <52F827D3.5080906@huawei.com> Date: Mon, 10 Feb 2014 09:13:55 +0800 From: Yijing Wang MIME-Version: 1.0 To: Thomas Gleixner , David Laight 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> <063D6719AE5E284EB5DD2968C1650D6D46489C@AcuExch.aculab.com> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1" Cc: "linux-mips@linux-mips.org" , "x86@kernel.org" , Kevin Hilman , "linux@lists.openrisc.net" , 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 , "user-mode-linux-devel@lists.sourceforge.net" , "linux-arm-msm@vger.kernel.org" , Jeff Dike , "davinci-linux-open-source@linux.davincidsp.com" , "linux-samsung-soc@vger.kernel.org" , John Stultz , "user-mode-linux-user@lists.sourceforge.net" , "linux-omap@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Barry Song , Jim Cromie , "linux-kernel@vger.kernel.org" , Nicolas Ferre , 'Tony Prisk' , 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/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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: wangyijing@huawei.com (Yijing Wang) Date: Mon, 10 Feb 2014 09:13:55 +0800 Subject: [PATCH 2/2] clocksource: Make clocksource register functions void In-Reply-To: References: <1390461166-36440-1-git-send-email-wangyijing@huawei.com> <52E0C889.6000106@prisktech.co.nz> <063D6719AE5E284EB5DD2968C1650D6D46489C@AcuExch.aculab.com> Message-ID: <52F827D3.5080906@huawei.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.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