tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: GPIO revisited



Hi,

On Sat, Jul 25, 2009 at 6:53 AM, Marc Balmer<marc%msys.ch@localhost> wrote:
> While it certainly can make sense to declare functions static in some
> userland programs for the sole reason to include a command in a crunched
> binary, it does not make sense in kernel code; much to the contrary, it
> makes debugging harder.
>
I see at least a few advantages of static function: they enforce
interface definition, particularly important for kernel API or generic
driver; they make symbols easily stripable, save a bit of space on
embedded target. On the long term, you can more easily spot deadcode
with the compiler emitting a warning if the function/variable become
unused or if the optional feature using the function is not included.

 - Arnaud


Home | Main Index | Thread Index | Old Index