linux-mips
[Top] [All Lists]

Re: [PATCH] Make MIPS dynamic clocksource/clockevent clock code generic

To: Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] Make MIPS dynamic clocksource/clockevent clock code generic
From: David Daney <ddaney@caviumnetworks.com>
Date: Tue, 20 Oct 2009 14:56:53 -0700
Cc: Linus Walleij <linus.walleij@stericsson.com>, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@linux-mips.org, Mikael Pettersson <mikpe@it.uu.se>, Ralf Baechle <ralf@linux-mips.org>
In-reply-to: <alpine.LFD.2.00.0910200454300.2863@localhost.localdomain>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1255819715-19763-1-git-send-email-linus.walleij@stericsson.com> <alpine.LFD.2.00.0910200454300.2863@localhost.localdomain>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Thunderbird 2.0.0.21 (X11/20090320)
Thomas Gleixner wrote:
On Sun, 18 Oct 2009, Linus Walleij wrote:
This moves the clocksource_set_clock() and clockevent_set_clock()
from the MIPS timer code into clockchips and clocksource where
it belongs. The patch was triggered by code posted by Mikael
Pettersson duplicating this code for the IOP ARM system. The
function signatures where altered slightly to fit into their
destination header files, unsigned int changed to u32 and inlined.

Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Mikael Pettersson <mikpe@it.uu.se>
Cc: Ralf Baechle <ralf@linux-mips.org>
---
Ralf has stated in earlier conversation that this should be moved,
now we risk duplicating code so let's move it.

Please do not make that functions inline. They are too large and there
is no benefit of inlining them.


If that is the case, then perhaps they should not be defined in a header file.

IMHO if you are defining a function in a header file it should always be 'static inline'. If you don't want it in-lined, put it in some library so we only pick up a single instance of it.

David Daney

<Prev in Thread] Current Thread [Next in Thread>