public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: swarren@wwwdotorg•org (Stephen Warren)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH V2 1/4] ARM: tegra: pmc: convert PMC driver to support DT only
Date: Wed, 27 Feb 2013 11:53:40 -0700	[thread overview]
Message-ID: <512E5634.4060106@wwwdotorg.org> (raw)
In-Reply-To: <1361932087-13372-2-git-send-email-josephl@nvidia.com>

On 02/26/2013 07:28 PM, Joseph Lo wrote:
> The Tegra kernel only support boot from DT now. Clean up the PMC driver
> to support DT only, that includes:
> 
> * remove the ifdef of CONFIG_OF
> * replace the static mapping of PMC addr to map from DT

> diff --git a/arch/arm/mach-tegra/pmc.c b/arch/arm/mach-tegra/pmc.c

>  static inline void tegra_pmc_writel(u32 val, u32 reg)
>  {
> -	writel(val, IO_ADDRESS(TEGRA_PMC_BASE + reg));
> +	writel(val, (tegra_pmc_base + reg));

There are redundant () there.

> +static void tegra_pmc_parse_dt(void)
>  {
> +	struct device_node *np;
>  
> +	np = of_find_matching_node(NULL, matches);
> +	if (np) {

Why not:

BUG_ON(!np);

That way, you can get rid of if if/else blocks, and remove one level of
indentation throughout this function. I already mentioned this internally...

  reply	other threads:[~2013-02-27 18:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-27  2:28 [PATCH V2 0/4] ARM: tegra114: bring up secondary CPU for SMP Joseph Lo
2013-02-27  2:28 ` [PATCH V2 1/4] ARM: tegra: pmc: convert PMC driver to support DT only Joseph Lo
2013-02-27 18:53   ` Stephen Warren [this message]
2013-02-27  2:28 ` [PATCH V2 2/4] ARM: tegra: pmc: add power on function for secondary CPUs Joseph Lo
2013-02-27 18:57   ` Stephen Warren
2013-02-27  2:28 ` [PATCH V2 3/4] ARM: tegra30: platsmp: replace the CPU power on function in PMC driver Joseph Lo
2013-02-27  2:28 ` [PATCH V2 4/4] ARM: tegra114: bring up secondary CPU for SMP Joseph Lo
2013-02-27 18:58   ` Stephen Warren
2013-03-06 21:56 ` [PATCH V2 0/4] " Stephen Warren

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=512E5634.4060106@wwwdotorg.org \
    --to=swarren@wwwdotorg$(echo .)org \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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