Devicetree
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Noam Camus <noamca@mellanox.com>
Cc: robh+dt@kernel.org, mark.rutland@arm.com,
	daniel.lezcano@linaro.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/3] clocksource: update "fn" at CLOCKSOURCE_OF_DECLARE() of nps400 timer
Date: Mon, 31 Oct 2016 11:39:32 -0600 (MDT)	[thread overview]
Message-ID: <alpine.DEB.2.20.1610311137290.8160@nanos> (raw)
In-Reply-To: <1477899468-5494-3-git-send-email-noamca@mellanox.com>

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

  reply	other threads:[~2016-10-31 17:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-31  7:37 [PATCH v3 0/3] Add clockevet for timer-nps driver to NPS400 SoC Noam Camus
     [not found] ` <1477899468-5494-1-git-send-email-noamca-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-10-31  7:37   ` [PATCH v3 1/3] soc: Support for NPS HW scheduling Noam Camus
2016-10-31  7:37   ` [PATCH v3 2/3] clocksource: update "fn" at CLOCKSOURCE_OF_DECLARE() of nps400 timer Noam Camus
2016-10-31 17:39     ` Thomas Gleixner [this message]
2016-11-01  9:07       ` Noam Camus
2016-10-31  7:37   ` [PATCH v3 3/3] clocksource: Add clockevent support to NPS400 driver Noam Camus
     [not found]     ` <1477899468-5494-4-git-send-email-noamca-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-10-31 18:12       ` Thomas Gleixner
2016-11-01  9:03         ` Noam Camus
2016-11-01 18:45           ` Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.20.1610311137290.8160@nanos \
    --to=tglx@linutronix.de \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=noamca@mellanox.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox