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


Groups > linux.kernel > #1330224

RE: [PATCH v3 2/3] clocksource: Add NPS400 timers driver

From Noam Camus <noamc@ezchip.com>
Newsgroups linux.kernel
Subject RE: [PATCH v3 2/3] clocksource: Add NPS400 timers driver
Date 2016-02-09 14:20 +0100
Message-ID <r0gn0-4x9-21@gated-at.bofh.it> (permalink)
References <qXJlv-3CC-9@gated-at.bofh.it> <qZUZc-6vM-19@gated-at.bofh.it> <qZUZc-6vM-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


>From: Daniel Lezcano [mailto:daniel.lezcano@linaro.org] 
>Sent: Monday, February 08, 2016 4:22 PM

>> +	ret = clk_prepare_enable(clk);
>> +	if (ret)
>> +		pr_err("Couldn't enable parent clock\n");
>> +
>> +	nps_timer_rate = clk_get_rate(clk);

>If there is an error, you continue the execution of the code. I guess you expect the system to hang in any case with the error in the >console, right ?

Since our clock is root then returned value will always be valid.
I am far from being expert here, but no one checks for clk_get_rate() return value for error.
Could you refer to a single place at clocksource drivers that checks for error in the return value.

>> +	ret = clocksource_register_hz(clksrc, nps_timer_rate);

>You can simplify the driver even more by using clocksource_mmio_init.
Since my base address depends on cluster number, which CPU is part of,  this interface is not much of a use. On top of that it assumes that I am little endian by using readl family accessories.

-Noam

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


Thread

Re: [PATCH v3 2/3] clocksource: Add NPS400 timers driver Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-02-08 15:30 +0100
  RE: [PATCH v3 2/3] clocksource: Add NPS400 timers driver Noam Camus <noamc@ezchip.com> - 2016-02-09 14:20 +0100
    Re: [PATCH v3 2/3] clocksource: Add NPS400 timers driver Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-02-09 14:40 +0100
      Re: [PATCH v3 2/3] clocksource: Add NPS400 timers driver Noam Camus <noamc@ezchip.com> - 2016-02-09 23:10 +0100
        Re: [PATCH v3 2/3] clocksource: Add NPS400 timers driver Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-02-10 00:00 +0100
          RE: [PATCH v3 2/3] clocksource: Add NPS400 timers driver Noam Camus <noamc@ezchip.com> - 2016-02-10 09:20 +0100

csiph-web