linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Michael Neuling <mikey@neuling.org>
Cc: Stewart Smith <stewart@linux.vnet.ibm.com>,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 3/4] powerpc/powernv: Check OPAL elog calls exist before using
Date: Mon, 15 Sep 2014 13:13:22 +1000	[thread overview]
Message-ID: <1410750802.24738.10.camel@concordia> (raw)
In-Reply-To: <1408423682-14297-3-git-send-email-mikey@neuling.org>

On Tue, 2014-08-19 at 14:48 +1000, Michael Neuling wrote:
> Check that the OPAL_ELOG_READ token exists before initalising the elog
> infrastructure.
> 
> This avoids littering the OPAL console with:
>   "OPAL: Called with bad token 74"
> 
> Signed-off-by: Michael Neuling <mikey@neuling.org>
> ---
>  arch/powerpc/platforms/powernv/opal-elog.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/arch/powerpc/platforms/powernv/opal-elog.c b/arch/powerpc/platforms/powernv/opal-elog.c
> index bbdb3ff..518fe95 100644
> --- a/arch/powerpc/platforms/powernv/opal-elog.c
> +++ b/arch/powerpc/platforms/powernv/opal-elog.c
> @@ -295,6 +295,10 @@ int __init opal_elog_init(void)
>  {
>  	int rc = 0;
>  
> +	/* ELOG not supported by firmware */
> +	if (!opal_check_token(OPAL_ELOG_READ))
> +		return -1;
> +

The only caller does:

			/* Setup error log interface */
			rc = opal_elog_init();
			/* Setup code update interface */
			opal_flash_init();
			/* Setup platform dump extract interface */
			opal_platform_dump_init();
			/* Setup system parameters interface */
			opal_sys_param_init();
			/* Setup message log interface. */
			opal_msglog_init();
		}
	
		return 0;
	}


So we may as well have it return void. Wanna send a follow-up patch for that.

cheers

  reply	other threads:[~2014-09-15  3:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-19  4:47 [PATCH 1/4] powerpc/powernv: Add OPAL check token call Michael Neuling
2014-08-19  4:48 ` [PATCH 2/4] powerpc/powernv: Check OPAL RTC calls exists before using Michael Neuling
2014-08-19  4:48 ` [PATCH 3/4] powerpc/powernv: Check OPAL elog calls exist " Michael Neuling
2014-09-15  3:13   ` Michael Ellerman [this message]
2014-08-19  4:48 ` [PATCH 4/4] powerpc/powernv: Check OPAL dump " Michael Neuling
2014-09-15  3:10 ` [PATCH 1/4] powerpc/powernv: Add OPAL check token call Michael Ellerman
2014-09-15  3:19   ` Michael Neuling
2014-09-15 12:24   ` Benjamin Herrenschmidt
2014-10-07  4:36 ` Stewart Smith

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=1410750802.24738.10.camel@concordia \
    --to=mpe@ellerman.id.au \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mikey@neuling.org \
    --cc=stewart@linux.vnet.ibm.com \
    /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;
as well as URLs for NNTP newsgroup(s).