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


Groups > linux.kernel > #1512742 > unrolled thread

Re: [PATCH v3 2/3] clocksource: update "fn" at CLOCKSOURCE_OF_DECLARE() of nps400 timer

Started byThomas Gleixner <tglx@linutronix.de>
First post2016-10-31 18:50 +0100
Last post2016-11-01 10:30 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v3 2/3] clocksource: update "fn" at CLOCKSOURCE_OF_DECLARE()  of nps400 timer Thomas Gleixner <tglx@linutronix.de> - 2016-10-31 18:50 +0100
    RE: [PATCH v3 2/3] clocksource: update "fn" at  CLOCKSOURCE_OF_DECLARE() of nps400 timer Noam Camus <noamca@mellanox.com> - 2016-11-01 10:30 +0100

#1512742 — Re: [PATCH v3 2/3] clocksource: update "fn" at CLOCKSOURCE_OF_DECLARE() of nps400 timer

FromThomas Gleixner <tglx@linutronix.de>
Date2016-10-31 18:50 +0100
SubjectRe: [PATCH v3 2/3] clocksource: update "fn" at CLOCKSOURCE_OF_DECLARE() of nps400 timer
Message-ID<syoSB-5vG-7@gated-at.bofh.it>
On Mon, 31 Oct 2016, Noam Camus wrote:
>  
>  static unsigned long nps_timer_rate;
> +static int nps_get_timer_clk(struct device_node *node,

Please don't glue variables and functions together w/o a new line. That's
horrible to read.

> +static int __init nps_setup_clocksource(struct device_node *node)
>  {
>  	int ret, cluster;
> +	struct clk *clk;
>  
>  	for (cluster = 0; cluster < NPS_CLUSTER_NUM; cluster++)
>  		nps_msu_reg_low_addr[cluster] =
>  			nps_host_reg((cluster << NPS_CLUSTER_OFFSET),
>  				 NPS_MSU_BLKID, NPS_MSU_TICK_LOW);
>  
> -	ret = clk_prepare_enable(clk);
> -	if (ret) {
> -		pr_err("Couldn't enable parent clock\n");
> -		return ret;
> -	}
> -
> -	nps_timer_rate = clk_get_rate(clk);
> +	nps_get_timer_clk(node, &nps_timer_rate, clk);

Why are you ignoring the return code? It was handled before your change ...

Thanks,

	tglx

[toc] | [next] | [standalone]


#1513172 — RE: [PATCH v3 2/3] clocksource: update "fn" at CLOCKSOURCE_OF_DECLARE() of nps400 timer

FromNoam Camus <noamca@mellanox.com>
Date2016-11-01 10:30 +0100
SubjectRE: [PATCH v3 2/3] clocksource: update "fn" at CLOCKSOURCE_OF_DECLARE() of nps400 timer
Message-ID<syDyh-6N8-17@gated-at.bofh.it>
In reply to#1512742
> From: Thomas Gleixner [mailto:tglx@linutronix.de] 
> Sent: Monday, October 31, 2016 7:40 PM

>>  
>>  static unsigned long nps_timer_rate;
>> +static int nps_get_timer_clk(struct device_node *node,
>
>Please don't glue variables and functions together w/o a new line. That's horrible to read.
Will be fixed in V4

>> +static int __init nps_setup_clocksource(struct device_node *node)
>>  {
>>  	int ret, cluster;
>> +	struct clk *clk;
>>  
>>  	for (cluster = 0; cluster < NPS_CLUSTER_NUM; cluster++)
>>  		nps_msu_reg_low_addr[cluster] =
>>  			nps_host_reg((cluster << NPS_CLUSTER_OFFSET),
>>  				 NPS_MSU_BLKID, NPS_MSU_TICK_LOW);
>>  
>> -	ret = clk_prepare_enable(clk);
>> -	if (ret) {
>> -		pr_err("Couldn't enable parent clock\n");
>> -		return ret;
>> -	}
>> -
>> -	nps_timer_rate = clk_get_rate(clk);
>> +	nps_get_timer_clk(node, &nps_timer_rate, clk);

>Why are you ignoring the return code? It was handled before your change ...
Will be fixed in V4

Regards,
Noam

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web