All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stewart Smith <stewart@linux.vnet.ibm.com>
To: Suraj Jitindar Singh <sjitindarsingh@gmail.com>,
	linuxppc-dev@lists.ozlabs.org, mpe@ellerman.id.au
Cc: robh@kernel.org, arnd@arndb.de, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, paulus@samba.org,
	sjitindarsingh@gmail.com
Subject: Re: [PATCH V5 2/3] powerpc/opal: Add inline function to get rc from an ASYNC_COMP opal_msg
Date: Wed, 29 Jun 2016 19:07:09 +1000	[thread overview]
Message-ID: <87shvw1hz6.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <1467171519-19882-2-git-send-email-sjitindarsingh@gmail.com>

Suraj Jitindar Singh <sjitindarsingh@gmail.com> writes:
> --- a/arch/powerpc/include/asm/opal.h
> +++ b/arch/powerpc/include/asm/opal.h
> @@ -276,6 +276,14 @@ extern int opal_error_code(int rc);
>  
>  ssize_t opal_msglog_copy(char *to, loff_t pos, size_t count);
>  
> +static inline int opal_get_async_rc(struct opal_msg msg)
> +{
> +	if (msg.msg_type != OPAL_MSG_ASYNC_COMP)
> +		return OPAL_PARAMETER;

Should instead be WARN_ON or BUG_ON ? Is there *ever* a situation where
calling opal_get_async_rc on a non-OPAL_MSG_ASYNC_COMP is a not both a
dumb idea and a bug?

otherwise (including if above change is made)
Acked-by: Stewart Smith <stewart@linux.vnet.ibm.com>


-- 
Stewart Smith
OPAL Architect, IBM.

WARNING: multiple messages have this Message-ID (diff)
From: Stewart Smith <stewart@linux.vnet.ibm.com>
To: linuxppc-dev@lists.ozlabs.org, mpe@ellerman.id.au
Cc: robh@kernel.org, arnd@arndb.de, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, paulus@samba.org,
	sjitindarsingh@gmail.com
Subject: Re: [PATCH V5 2/3] powerpc/opal: Add inline function to get rc from an ASYNC_COMP opal_msg
Date: Wed, 29 Jun 2016 19:07:09 +1000	[thread overview]
Message-ID: <87shvw1hz6.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <1467171519-19882-2-git-send-email-sjitindarsingh@gmail.com>

Suraj Jitindar Singh <sjitindarsingh@gmail.com> writes:
> --- a/arch/powerpc/include/asm/opal.h
> +++ b/arch/powerpc/include/asm/opal.h
> @@ -276,6 +276,14 @@ extern int opal_error_code(int rc);
>  
>  ssize_t opal_msglog_copy(char *to, loff_t pos, size_t count);
>  
> +static inline int opal_get_async_rc(struct opal_msg msg)
> +{
> +	if (msg.msg_type != OPAL_MSG_ASYNC_COMP)
> +		return OPAL_PARAMETER;

Should instead be WARN_ON or BUG_ON ? Is there *ever* a situation where
calling opal_get_async_rc on a non-OPAL_MSG_ASYNC_COMP is a not both a
dumb idea and a bug?

otherwise (including if above change is made)
Acked-by: Stewart Smith <stewart@linux.vnet.ibm.com>


-- 
Stewart Smith
OPAL Architect, IBM.

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

  reply	other threads:[~2016-06-29  9:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-29  3:38 [PATCH V5 1/3] devicetree/bindings: Add binding for operator panel on FSP machines Suraj Jitindar Singh
2016-06-29  3:38 ` Suraj Jitindar Singh
2016-06-29  3:38 ` [PATCH V5 2/3] powerpc/opal: Add inline function to get rc from an ASYNC_COMP opal_msg Suraj Jitindar Singh
2016-06-29  3:38   ` Suraj Jitindar Singh
2016-06-29  9:07   ` Stewart Smith [this message]
2016-06-29  9:07     ` Stewart Smith
2016-06-30 12:36   ` [V5, " Michael Ellerman
2016-06-30 12:36     ` Michael Ellerman
2016-06-29  3:38 ` [PATCH V5 3/3] powerpc/drivers: Add driver for operator panel on FSP machines Suraj Jitindar Singh
2016-06-29  3:38   ` Suraj Jitindar Singh
2016-06-30 12:36   ` [V5, " Michael Ellerman
2016-06-30 12:36     ` Michael Ellerman
2016-06-30 12:36 ` [V5, 1/3] devicetree/bindings: Add binding " Michael Ellerman
2016-06-30 12:36   ` Michael Ellerman

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=87shvw1hz6.fsf@linux.vnet.ibm.com \
    --to=stewart@linux.vnet.ibm.com \
    --cc=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    --cc=robh@kernel.org \
    --cc=sjitindarsingh@gmail.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 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.