Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1383047

Re: [PATCH] clocksource/drivers/tango-xtal: Fix incorrect test

From Daniel Lezcano <daniel.lezcano@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH] clocksource/drivers/tango-xtal: Fix incorrect test
Date 2016-04-20 07:00 +0200
Message-ID <rpSp3-26w-1@gated-at.bofh.it> (permalink)
References (2 earlier) <rpEvM-87k-13@gated-at.bofh.it> <rpFrQ-ov-15@gated-at.bofh.it> <rpHDk-1Ya-31@gated-at.bofh.it> <rpHN0-23A-13@gated-at.bofh.it> <rpIzo-2JB-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[ ... ]

> About the error handling... you advised against panic()
> because there might be other clock sources.
> 
> Does it makes sense to give up registering sched_clock
> and delay_timer when the clocksource registration fails?

Actually, all the problem is coming from the CLOCKSOURCE_OF_DECLARE where 
the init_func is a void (*init_func)(struct device_node *) signature, thus 
not allowing to return a value.

Because of that, the init code path of the different drivers are somewhat 
fuzzy when an error occurs.

If the function could return an error code, then the drivers would be 
written in a way to catch and handle the errors gracefully. That implies the 
clocksource-probe() routine will be able to detect when the init_func() is 
failing, trace it and count if one clocksource/clockevent succeed at boot 
time.

So because the latter, it would make sense to give up registering and leave 
a clean place in the init function when something is going wrong.

  -- Daniel

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] clocksource/drivers/tango-xtal: Fix incorrect test Mason <slash.tmp@free.fr> - 2016-04-19 14:20 +0200
  Re: [PATCH] clocksource/drivers/tango-xtal: Fix incorrect test Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-04-19 15:20 +0200
    Re: [PATCH] clocksource/drivers/tango-xtal: Fix incorrect test Mason <slash.tmp@free.fr> - 2016-04-19 16:10 +0200
      Re: [PATCH] clocksource/drivers/tango-xtal: Fix incorrect test Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-04-19 17:10 +0200
        Re: [PATCH] clocksource/drivers/tango-xtal: Fix incorrect test Mason <slash.tmp@free.fr> - 2016-04-19 19:30 +0200
          Re: [PATCH] clocksource/drivers/tango-xtal: Fix incorrect test Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-04-19 19:40 +0200
            Re: [PATCH] clocksource/drivers/tango-xtal: Fix incorrect test Mason <slash.tmp@free.fr> - 2016-04-19 20:30 +0200
              Re: [PATCH] clocksource/drivers/tango-xtal: Fix incorrect test Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-04-20 07:00 +0200

csiph-web