public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
To: Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
	arnd-r2nGTMty4D4@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org
Subject: Re: [PATCH v2 10/14] ARM: tegra: tegra_powergate_is_powered should be static
Date: Mon, 10 Oct 2011 14:44:02 +0400	[thread overview]
Message-ID: <4E92CC72.3030809@ru.mvista.com> (raw)
In-Reply-To: <1318224484-2090-11-git-send-email-olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>

Hello.

On 10-10-2011 9:28, Olof Johansson wrote:

> Not exported and not used externally.

> Also, fix return type  and change to instead WARN_ON on bad parameters.

    Change to what? You're changing _to_ WARN_ON() as we can see, not from it...

> Signed-off-by: Olof Johansson<olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
> ---
>   arch/arm/mach-tegra/include/mach/powergate.h |    1 -
>   arch/arm/mach-tegra/powergate.c              |    5 ++---
>   2 files changed, 2 insertions(+), 4 deletions(-)

[...]
> diff --git a/arch/arm/mach-tegra/powergate.c b/arch/arm/mach-tegra/powergate.c
> index 3cee9aa..9483064 100644
> --- a/arch/arm/mach-tegra/powergate.c
> +++ b/arch/arm/mach-tegra/powergate.c
> @@ -89,12 +89,11 @@ int tegra_powergate_power_off(int id)
>   	return tegra_powergate_set(id, false);
>   }
>
> -bool tegra_powergate_is_powered(int id)
> +static bool tegra_powergate_is_powered(int id)
>   {
>   	u32 status;
>
> -	if (id < 0 || id >= TEGRA_NUM_POWERGATE)
> -		return -EINVAL;
> +	WARN_ON(id<  0 || id>= TEGRA_NUM_POWERGATE);
>
>   	status = pmc_read(PWRGATE_STATUS)&  (1<<  id);
>   	return !!status;

WBR, Sergei

  parent reply	other threads:[~2011-10-10 10:44 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-07  2:54 [PATCH 0/14] Sparse fixes for tegra Olof Johansson
     [not found] ` <1317956064-17650-1-git-send-email-olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
2011-10-07  2:54   ` [PATCH 01/14] ARM: tegra: add __force to IO_ADDRESS Olof Johansson
2011-10-07  2:54   ` [PATCH 02/14] ARM: tegra: fuse: use IO_ADDRESS Olof Johansson
2011-10-07  2:54   ` [PATCH 03/14] ARM: tegra: pinmux: " Olof Johansson
2011-10-07  2:54   ` [PATCH 04/14] ARM: tegra: timer: don't cast __iomem pointers Olof Johansson
2011-10-07  2:54   ` [PATCH 05/14] ARM: tegra: tegra2_clocks: " Olof Johansson
2011-10-07  2:54   ` [PATCH 06/14] ARM: tegra: tegra2_clocks: 0 -> NULL changes Olof Johansson
2011-10-07  2:54   ` [PATCH 07/14] ARM: tegra: pcie: don't cast __iomem pointers Olof Johansson
2011-10-07  2:54   ` [PATCH 08/14] ARM: tegra: pcie: include board.h Olof Johansson
2011-10-07  2:54   ` [PATCH 09/14] ARM: tegra: pcie: 0 -> NULL changes Olof Johansson
2011-10-07  2:54   ` [PATCH 10/14] ARM: tegra: tegra_init_cache should be static Olof Johansson
2011-10-07  2:54   ` [PATCH 11/14] ARM: tegra: tegra_rtc_read_ms " Olof Johansson
2011-10-07  2:54   ` [PATCH 12/14] ARM: tegra: tegra_powergate_is_powered " Olof Johansson
2011-10-07  2:54   ` [PATCH 13/14] ARM: tegra: tegra2_clocks: don't export some tables Olof Johansson
2011-10-07  2:54   ` [PATCH 14/14] ARM: tegra: dma: staticify some tables and functions Olof Johansson
2011-10-07  8:54   ` [PATCH 0/14] Sparse fixes for tegra Arnd Bergmann
2011-10-10  5:32     ` Olof Johansson
2011-10-07 15:40   ` Stephen Warren
2011-10-10  5:27   ` [PATCH v2 00/14] " Olof Johansson
     [not found]     ` <1318224484-2090-1-git-send-email-olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
2011-10-10  5:27       ` [PATCH v2 01/14] ARM: tegra: annotate IO_*_VIRT pointers Olof Johansson
     [not found]         ` <1318224484-2090-2-git-send-email-olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
2011-10-13 14:10           ` Russell King - ARM Linux
     [not found]             ` <20111013141036.GX21648-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2011-10-13 22:27               ` Olof Johansson
2011-10-10  5:27       ` [PATCH v2 02/14] ARM: tegra: timer: don't cast __iomem pointers Olof Johansson
2011-10-10  5:27       ` [PATCH v2 03/14] ARM: tegra: tegra2_clocks: " Olof Johansson
2011-10-10  5:27       ` [PATCH v2 04/14] ARM: tegra: tegra2_clocks: 0 -> NULL changes Olof Johansson
2011-10-10  5:27       ` [PATCH v2 05/14] ARM: tegra: pcie: don't cast __iomem pointers Olof Johansson
2011-10-10  5:27       ` [PATCH v2 06/14] ARM: tegra: pcie: include board.h Olof Johansson
2011-10-10  5:27       ` [PATCH v2 07/14] ARM: tegra: pcie: 0 -> NULL changes Olof Johansson
2011-10-10  5:27       ` [PATCH v2 08/14] ARM: tegra: tegra_init_cache should be static Olof Johansson
2011-10-10  5:27       ` [PATCH v2 09/14] ARM: tegra: tegra_rtc_read_ms " Olof Johansson
2011-10-10  5:28       ` [PATCH v2 10/14] ARM: tegra: tegra_powergate_is_powered " Olof Johansson
     [not found]         ` <1318224484-2090-11-git-send-email-olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
2011-10-10 10:44           ` Sergei Shtylyov [this message]
     [not found]             ` <4E92CC72.3030809-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
2011-10-10 18:11               ` Olof Johansson
2011-10-10  5:28       ` [PATCH v2 11/14] ARM: tegra: tegra2_clocks: don't export some tables Olof Johansson
2011-10-10  5:28       ` [PATCH v2 12/14] ARM: tegra: dma: staticify some tables and functions Olof Johansson
2011-10-10  5:28       ` [PATCH v2 13/14] ARM: tegra: cpu-tegra: sparse type fix Olof Johansson
2011-10-10  5:28       ` [PATCH v2 14/14] ARM: tegra: cpu-tegra: unexport two functions Olof Johansson
2011-10-10 16:49       ` [PATCH v2 00/14] Sparse fixes for tegra Stephen Warren
2011-10-10 17:00       ` Arnd Bergmann

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=4E92CC72.3030809@ru.mvista.com \
    --to=sshtylyov-hkdhdckh98+b+jhodadfcq@public.gmane.org \
    --cc=arnd-r2nGTMty4D4@public.gmane.org \
    --cc=ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org \
    --cc=swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.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