[PATCH 2/2] clocksource: Make clocksource register functions void

From
Geert Uytterhoeven <geert@linux-m68k.org>
Date
2014-01-23 07:58:09
Also in
linux-arm-msm, linux-mips, linux-omap, linux-samsung-soc, linux-um, linuxppc-dev
Reply to
Tony Prisk, 2014-01-23
On Thu, Jan 23, 2014 at 8:45 AM, Tony Prisk [off-list ref] wrote:
quoted
  -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
Thread (11 messages) 11 messages, 7 authors, last reply 2014-02-10
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help