linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-acpi@vger.kernel.org, Sakari Ailus <sakari.ailus@linux.intel.com>
Subject: Re: [PATCH v1] device property: Remove duplicate test for NULL
Date: Wed, 28 Aug 2019 11:41:27 +0200	[thread overview]
Message-ID: <31368540.TH3YnxWdOO@kreacher> (raw)
In-Reply-To: <20190823203227.75639-1-andriy.shevchenko@linux.intel.com>

On Friday, August 23, 2019 10:32:27 PM CEST Andy Shevchenko wrote:
> There is no need to check twice for a NULL in fwnode_call_bool_op().
> 
> Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  include/linux/fwnode.h | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/include/linux/fwnode.h b/include/linux/fwnode.h
> index a11c8c56c78b..ababd6bc82f3 100644
> --- a/include/linux/fwnode.h
> +++ b/include/linux/fwnode.h
> @@ -110,10 +110,11 @@ struct fwnode_operations {
>  	(fwnode ? (fwnode_has_op(fwnode, op) ?				\
>  		   (fwnode)->ops->op(fwnode, ## __VA_ARGS__) : -ENXIO) : \
>  	 -EINVAL)
> -#define fwnode_call_bool_op(fwnode, op, ...)				\
> -	(fwnode ? (fwnode_has_op(fwnode, op) ?				\
> -		   (fwnode)->ops->op(fwnode, ## __VA_ARGS__) : false) : \
> -	 false)
> +
> +#define fwnode_call_bool_op(fwnode, op, ...)		\
> +	(fwnode_has_op(fwnode, op) ?			\
> +	 (fwnode)->ops->op(fwnode, ## __VA_ARGS__) : false)
> +
>  #define fwnode_call_ptr_op(fwnode, op, ...)		\
>  	(fwnode_has_op(fwnode, op) ?			\
>  	 (fwnode)->ops->op(fwnode, ## __VA_ARGS__) : NULL)
> 

Applied, thanks!





      parent reply	other threads:[~2019-08-28  9:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-23 20:32 [PATCH v1] device property: Remove duplicate test for NULL Andy Shevchenko
2019-08-26  6:52 ` Sakari Ailus
2019-08-28  9:41 ` Rafael J. Wysocki [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=31368540.TH3YnxWdOO@kreacher \
    --to=rjw@rjwysocki.net \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=sakari.ailus@linux.intel.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).