linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: leo.yan@linaro.org (Leo Yan)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/4] clk: hisi: add API for allocation clk data struct
Date: Fri, 27 Mar 2015 09:48:34 +0800	[thread overview]
Message-ID: <20150327014834.GA4902@leoy-linaro> (raw)
In-Reply-To: <20150326141834.GI8656@n2100.arm.linux.org.uk>

hi Russell,

On Thu, Mar 26, 2015 at 02:18:34PM +0000, Russell King - ARM Linux wrote:
> On Thu, Mar 26, 2015 at 07:13:36PM +0800, Leo Yan wrote:
> > +struct hisi_clock_data __init *hisi_clk_init(struct device_node *np,
> > +					     int nr_clks)
> > +{
> > +	struct hisi_clock_data *clk_data;
> > +	void __iomem *base;
> > +
> > +	if (np) {
> > +		base = of_iomap(np, 0);
> > +		if (!base) {
> > +			pr_err("failed to map Hisilicon clock registers\n");
> > +			return NULL;
> > +		}
> > +		printk("%s: base %p\n", __func__, base);
> 
> Did you leave your debugging in?

Sorry, will remove it.

> > +	} else {
> > +		pr_err("failed to find Hisilicon clock node in DTS\n");
> > +		return NULL;
> > +	}
> 
> I know you're mostly only moving this code, but it would be far better if
> it were written:
> 
> 	if (!np) {
> 		pr_err("failed to find Hisilicon clock node in DTS\n");
> 		return NULL;
> 	}
> 
> 	base = of_iomap(np, 0);
> 	if (!base) {
> 		pr_err("failed to map Hisilicon clock registers\n");
> 		return NULL;
> 	}
> 
> Possibly do this first as a separate patch, and then move the code.

Will do this.

> -- 
> FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
> according to speedtest.net.

  reply	other threads:[~2015-03-27  1:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-26 11:13 [PATCH 0/4] clk: hisilicon: support stub clock Leo Yan
2015-03-26 11:13 ` [PATCH 1/4] clk: hisi: add API for allocation clk data struct Leo Yan
2015-03-26 14:18   ` Russell King - ARM Linux
2015-03-27  1:48     ` Leo Yan [this message]
2015-03-26 11:13 ` [PATCH 2/4] dt-bindings: clk: hisilicon: Document stub clock driver Leo Yan
2015-03-26 11:13 ` [PATCH 3/4] clk: hisi: add stub clk driver Leo Yan
2015-03-26 14:22   ` Russell King - ARM Linux
2015-03-27  2:08     ` Leo Yan
2015-03-26 11:13 ` [PATCH 4/4] clk: hisi: add stub clock register function Leo Yan

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=20150327014834.GA4902@leoy-linaro \
    --to=leo.yan@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).