public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: mvebu: use system controller to get the soc id when possible
Date: Fri, 20 Jun 2014 16:11:38 +0200	[thread overview]
Message-ID: <7626280.9GaTg8UqFK@wuerfel> (raw)
In-Reply-To: <1403273174-19146-1-git-send-email-gregory.clement@free-electrons.com>

On Friday 20 June 2014 16:06:14 Gregory CLEMENT wrote:
> +int mvebu_systeme_controller_get_soc_id(u32 *dev, u32 *rev)

s/systeme/system/

> +{
> +       if (of_machine_is_compatible("marvell,armada38x") &&
> +               system_controller_base) {
> +               *dev = readl(system_controller_base + mvebu_sc->dev_id) >> 16;
> +               *rev = (readl(system_controller_base + mvebu_sc->rev_id) >> 8)
> +                       & 0xF;
> +               return 0;
> +       } else
> +               return -1;
> +}

Better return a proper errno code here rather than -1. How about -ENODEV?

	Arnd

  reply	other threads:[~2014-06-20 14:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-20 14:06 [PATCH] ARM: mvebu: use system controller to get the soc id when possible Gregory CLEMENT
2014-06-20 14:11 ` Arnd Bergmann [this message]
2014-06-20 14:14   ` Gregory CLEMENT

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=7626280.9GaTg8UqFK@wuerfel \
    --to=arnd@arndb.de \
    --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