All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Jia Hongtao <hongtao.jia@freescale.com>
Cc: B07421@freescale.com, linuxppc-dev@lists.ozlabs.org,
	b38951@freescale.com
Subject: Re: [PATCH V6] powerpc/MPIC: Add get_version API both for internal and external use
Date: Mon, 1 Jul 2013 18:58:35 -0500	[thread overview]
Message-ID: <1372723115.8183.99@snotra> (raw)
In-Reply-To: <1372656366-769-1-git-send-email-hongtao.jia@freescale.com> (from hongtao.jia@freescale.com on Mon Jul  1 00:26:06 2013)

On 07/01/2013 12:26:06 AM, Jia Hongtao wrote:
> From: Hongtao Jia <hongtao.jia@freescale.com>
>=20
> MPIC version is useful information for both mpic_alloc() and =20
> mpic_init().
> The patch provide an API to get MPIC version for reusing the code.
> Also, some other IP block may need MPIC version for their own use.
> The API for external use is also provided.
>=20
> Signed-off-by: Jia Hongtao <hongtao.jia@freescale.com>
> Signed-off-by: Li Yang <leoli@freescale.com>
> ---
> V6:
> * Fix compile error on mpc83xx.

I already applied V5 before realizing that it was this patch that you =20
updated, rather than the MSI patch that depends on it.  There is no =20
compile error until the MSI patch that starts using this (which I =20
haven't yet applied, due to the error).  Could you send a followup =20
patch that just adds the stub?

> +/* Get the version of primary MPIC */
> +#ifdef CONFIG_MPIC
> +extern u32 fsl_mpic_primary_get_version(void);
> +#else
> +static inline u32 fsl_mpic_primary_get_version(void)
> +{
> +	return -ENOTSUPP;
> +}
> +#endif
[snip]
> +static u32 fsl_mpic_get_version(struct mpic *mpic)
> +{
> +	u32 brr1;
> +
> +	if (!(mpic->flags & MPIC_FSL))
> +		return 0;

In one case, calling this without having an FSL MPIC returns -ENOTSUPP, =20
and in another case it returns 0...  Shouldn't it be consistent?

Also returning a negative number as a u32 is not very nice.

-Scott=

  reply	other threads:[~2013-07-01 23:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-01  5:26 [PATCH V6] powerpc/MPIC: Add get_version API both for internal and external use Jia Hongtao
2013-07-01 23:58 ` Scott Wood [this message]
2013-07-02  2:07   ` Jia Hongtao-B38951

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=1372723115.8183.99@snotra \
    --to=scottwood@freescale.com \
    --cc=B07421@freescale.com \
    --cc=b38951@freescale.com \
    --cc=hongtao.jia@freescale.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.