All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tabi Timur-B04825 <B04825@freescale.com>
To: Fan Zhicheng-B32736 <B32736@freescale.com>
Cc: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	Zhicheng Fan <b32736@freeescale.com>
Subject: Re: [PATCH 1/2 v2] P1025RDB: Add Quicc Engine support
Date: Thu, 9 Feb 2012 16:17:29 +0000	[thread overview]
Message-ID: <CAOZdJXV-8f+_0FF2w7rG=xY3euxv9=G-O5z5v8pbCrs4ax8N3A@mail.gmail.com> (raw)
In-Reply-To: <1328694779-24024-2-git-send-email-B32736@freescale.com>

> +#ifdef CONFIG_QUICC_ENGINE
> + =A0 =A0 =A0 np =3D of_find_compatible_node(NULL, NULL, "fsl,qe-ic");
> + =A0 =A0 =A0 if (np) {
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 qe_ic_init(np, 0, qe_ic_cascade_low_mpic,
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 qe_ic_casca=
de_high_mpic);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 of_node_put(np);
> +
> + =A0 =A0 =A0 } else
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 pr_err("Could not find qe-ic node\n");

Since you have to use pr_err instead of dev_err, please add a prefix
to the message.  Like this:

pr_err("mpc85xx-rdb: could not find qe-ic node\n");

or maybe something like this:

pr_err("%s: could not find qe-ic node\n", __func__);


> + =A0 =A0 =A0 if (machine_is(p1025_rdb)) {
> +
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 __be32 __iomem *pmuxcr;
> +
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 np =3D of_find_node_by_name(NULL, "global-u=
tilities");
> +
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (np) {
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 pmuxcr =3D of_iomap(np, 0) =
+ MPC85xx_PMUXCR_OFFSET;

Use the ccsr_guts_85xx structure instead of hard-coded offsets.

MPC85xx_PMUXCR_OFFSET should be deleted.

> +
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (!pmuxcr)
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 pr_err(KERN=
_EMERG "Error: Alternate function"
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 " signal multiplex control register not"
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 " mapped!\n");

A missing node in the device tree is NOT an emergency.  Also, the
KERN_xxx macros are not supposed to be used in a pr_xxx macro.  Please
don't blindly copy/paste code from somewhere else without thinking
about it.

--=20
Timur Tabi
Linux kernel developer at Freescale=

      reply	other threads:[~2012-02-09 16:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-08  9:52 [PATCH 2/2 v2] powerpc: Abstract common define of signal multiplex control for qe Zhicheng Fan
2012-02-08  9:52 ` [PATCH 1/2 v2] P1025RDB: Add Quicc Engine support Zhicheng Fan
2012-02-09 16:17   ` Tabi Timur-B04825 [this message]

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='CAOZdJXV-8f+_0FF2w7rG=xY3euxv9=G-O5z5v8pbCrs4ax8N3A@mail.gmail.com' \
    --to=b04825@freescale.com \
    --cc=B32736@freescale.com \
    --cc=b32736@freeescale.com \
    --cc=linuxppc-dev@lists.ozlabs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.