From: Yijing Wang <wangyijing@huawei•com>
To: Thomas Gleixner <tglx@linutronix•de>,
David Laight <David.Laight@ACULAB•COM>
Cc: "linux-mips@linux-mips•org" <linux-mips@linux-mips•org>,
"x86@kernel•org" <x86@kernel•org>,
Kevin Hilman <khilman@deeprootsystems•com>,
"linux@lists•openrisc.net" <linux@openrisc•net>,
Hanjun Guo <guohanjun@huawei•com>, Sekhar Nori <nsekhar@ti•com>,
Michal Simek <monstr@monstr•eu>,
Paul Mackerras <paulus@samba•org>,
Ralf Baechle <ralf@linux-mips•org>,
"H. Peter Anvin" <hpa@zytor•com>,
Daniel Walker <dwalker@fifo99•com>,
Hans-Christian Egtvedt <egtvedt@samfundet•no>,
Jonas Bonn <jonas@southpole•se>,
Kukjin Kim <kgene.kim@samsung•com>,
Russell King <linux@arm•linux.org.uk>,
Richard Weinberger <richard@nod•at>,
Daniel Lezcano <daniel.lezcano@linaro•org>,
Tony Lindgren <tony@atomide•com>, Ingo Molnar <mingo@redhat•com>,
"microblaze-uclinux@itee•uq.edu.au"
<microblaze-uclinux@itee•uq.edu.au>,
David Brown <davidb@codeaurora•org>,
Haavard Skinnemoen <hskinnemoen@gmail•com>,
Mike Frysinger <vapier@gentoo•org>,
"user-mode-linux-devel@lists•sourceforge.net"
<user-mode-linux-devel@lists•sourceforge.net>,
"linux-arm-msm@vger•kernel.org" <linux-arm-msm@vger•kernel.org>,
Jeff Dike <jdike@addtoit•com>,
"davinci-linux-open-source@linux•davincidsp.com"
<davinci-linux-open-source@linux•davincidsp.com>,
"linux-samsung-soc@vger•kernel.org"
<linux-samsung-soc@vger•kernel.org>,
John Stultz <john.stultz@linaro•org>,
"user-mode-linux-user@lists•sourceforge.net"
<user-mode-linux-user@lists•sourceforge.net>,
"linux-omap@vger•kernel.org" <linux-omap@vger•kernel.org>,
"linux-arm-kernel@lists•infradead.org"
<linux-arm-kernel@lists•infradead.org>,
Barry Song <baohua@kernel•org>, Jim Cromie <jim.cromie@gmail•com>,
"linux-kernel@vger•kernel.org" <linux-kernel@vger•kernel.org>,
Nicolas Ferre <nicolas.ferre@atmel•com>,
'Tony Prisk' <linux@prisktech•co.nz>,
Bryan Huntsman <bryanh@codeaurora•org>,
"uclinux-dist-devel@blackfin•uclinux.org"
<uclinux-dist-devel@blackfin•uclinux.org>,
"linuxppc-dev@lists•ozlabs.org" <linuxppc-dev@lists•ozlabs.org>
Subject: Re: [PATCH 2/2] clocksource: Make clocksource register functions void
Date: Mon, 10 Feb 2014 09:13:55 +0800 [thread overview]
Message-ID: <52F827D3.5080906@huawei.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1402052139560.24986@ionos.tec.linutronix.de>
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
next prev parent reply other threads:[~2014-02-10 1:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-23 7:12 [PATCH 2/2] clocksource: Make clocksource register functions void Yijing Wang
2014-01-23 7:40 ` Hans-Christian Egtvedt
2014-01-23 7:45 ` Tony Prisk
2014-01-23 7:58 ` Geert Uytterhoeven
2014-01-23 8:04 ` Tony Prisk
2014-01-23 8:17 ` Yijing Wang
2014-01-23 11:40 ` David Laight
2014-02-05 20:40 ` Thomas Gleixner
2014-02-10 1:13 ` Yijing Wang [this message]
2014-01-23 8:40 ` Daniel Lezcano
2014-01-23 9:01 ` Yijing Wang
2014-02-05 20:39 ` Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52F827D3.5080906@huawei.com \
--to=wangyijing@huawei$(echo .)com \
--cc=David.Laight@ACULAB$(echo .)COM \
--cc=baohua@kernel$(echo .)org \
--cc=bryanh@codeaurora$(echo .)org \
--cc=daniel.lezcano@linaro$(echo .)org \
--cc=davidb@codeaurora$(echo .)org \
--cc=davinci-linux-open-source@linux$(echo .)davincidsp.com \
--cc=dwalker@fifo99$(echo .)com \
--cc=egtvedt@samfundet$(echo .)no \
--cc=guohanjun@huawei$(echo .)com \
--cc=hpa@zytor$(echo .)com \
--cc=hskinnemoen@gmail$(echo .)com \
--cc=jdike@addtoit$(echo .)com \
--cc=jim.cromie@gmail$(echo .)com \
--cc=john.stultz@linaro$(echo .)org \
--cc=jonas@southpole$(echo .)se \
--cc=kgene.kim@samsung$(echo .)com \
--cc=khilman@deeprootsystems$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-arm-msm@vger$(echo .)kernel.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-mips@linux-mips$(echo .)org \
--cc=linux-omap@vger$(echo .)kernel.org \
--cc=linux-samsung-soc@vger$(echo .)kernel.org \
--cc=linux@arm$(echo .)linux.org.uk \
--cc=linux@openrisc$(echo .)net \
--cc=linux@prisktech$(echo .)co.nz \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=microblaze-uclinux@itee$(echo .)uq.edu.au \
--cc=mingo@redhat$(echo .)com \
--cc=monstr@monstr$(echo .)eu \
--cc=nicolas.ferre@atmel$(echo .)com \
--cc=nsekhar@ti$(echo .)com \
--cc=paulus@samba$(echo .)org \
--cc=ralf@linux-mips$(echo .)org \
--cc=richard@nod$(echo .)at \
--cc=tglx@linutronix$(echo .)de \
--cc=tony@atomide$(echo .)com \
--cc=uclinux-dist-devel@blackfin$(echo .)uclinux.org \
--cc=user-mode-linux-devel@lists$(echo .)sourceforge.net \
--cc=user-mode-linux-user@lists$(echo .)sourceforge.net \
--cc=vapier@gentoo$(echo .)org \
--cc=x86@kernel$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox