All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Calvin Johnson <calvin.johnson@oss.nxp.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Mike Leach <mike.leach@linaro.org>,
	linux.cj@gmail.com,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] coresight: cti: remove incorrect NULL return check
Date: Tue, 12 May 2020 12:00:21 -0600	[thread overview]
Message-ID: <CANLsYkzeHpZygbQtz8Ed7dEaVMz362ftHQJ50DrBYR=+72NpJQ@mail.gmail.com> (raw)
In-Reply-To: <20200507053547.13707-1-calvin.johnson@oss.nxp.com>

Hi Greg,

On Wed, 6 May 2020 at 23:36, Calvin Johnson <calvin.johnson@oss.nxp.com> wrote:
>
> fwnode_find_reference() doesn't return NULL and hence that check
> should be avoided.
>
> Signed-off-by: Calvin Johnson <calvin.johnson@oss.nxp.com>
> Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>

I just noticed you were not CC'ed on the original conversation Calvin
and I had and as such you probably don't know what to do with this
patch.  Please see if you can pick it up as a fix for 5.7.  If that is
not possible I will queue it up for inclusion in the 5.8 cycle.

Thanks,
Mathieu

> ---
>
>  drivers/hwtracing/coresight/coresight-cti-platform.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-cti-platform.c b/drivers/hwtracing/coresight/coresight-cti-platform.c
> index b44d83142b62..2fdaeec80ee5 100644
> --- a/drivers/hwtracing/coresight/coresight-cti-platform.c
> +++ b/drivers/hwtracing/coresight/coresight-cti-platform.c
> @@ -120,7 +120,7 @@ static int cti_plat_create_v8_etm_connection(struct device *dev,
>
>         /* Can optionally have an etm node - return if not  */
>         cs_fwnode = fwnode_find_reference(root_fwnode, CTI_DT_CSDEV_ASSOC, 0);
> -       if (IS_ERR_OR_NULL(cs_fwnode))
> +       if (IS_ERR(cs_fwnode))
>                 return 0;
>
>         /* allocate memory */
> @@ -393,7 +393,7 @@ static int cti_plat_create_connection(struct device *dev,
>                 /* associated device ? */
>                 cs_fwnode = fwnode_find_reference(fwnode,
>                                                   CTI_DT_CSDEV_ASSOC, 0);
> -               if (!IS_ERR_OR_NULL(cs_fwnode)) {
> +               if (!IS_ERR(cs_fwnode)) {
>                         assoc_name = cti_plat_get_csdev_or_node_name(cs_fwnode,
>                                                                      &csdev);
>                         fwnode_handle_put(cs_fwnode);
> --
> 2.17.1
>

WARNING: multiple messages have this Message-ID (diff)
From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Calvin Johnson <calvin.johnson@oss.nxp.com>,
	 Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux.cj@gmail.com,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	Mike Leach <mike.leach@linaro.org>
Subject: Re: [PATCH] coresight: cti: remove incorrect NULL return check
Date: Tue, 12 May 2020 12:00:21 -0600	[thread overview]
Message-ID: <CANLsYkzeHpZygbQtz8Ed7dEaVMz362ftHQJ50DrBYR=+72NpJQ@mail.gmail.com> (raw)
In-Reply-To: <20200507053547.13707-1-calvin.johnson@oss.nxp.com>

Hi Greg,

On Wed, 6 May 2020 at 23:36, Calvin Johnson <calvin.johnson@oss.nxp.com> wrote:
>
> fwnode_find_reference() doesn't return NULL and hence that check
> should be avoided.
>
> Signed-off-by: Calvin Johnson <calvin.johnson@oss.nxp.com>
> Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>

I just noticed you were not CC'ed on the original conversation Calvin
and I had and as such you probably don't know what to do with this
patch.  Please see if you can pick it up as a fix for 5.7.  If that is
not possible I will queue it up for inclusion in the 5.8 cycle.

Thanks,
Mathieu

> ---
>
>  drivers/hwtracing/coresight/coresight-cti-platform.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-cti-platform.c b/drivers/hwtracing/coresight/coresight-cti-platform.c
> index b44d83142b62..2fdaeec80ee5 100644
> --- a/drivers/hwtracing/coresight/coresight-cti-platform.c
> +++ b/drivers/hwtracing/coresight/coresight-cti-platform.c
> @@ -120,7 +120,7 @@ static int cti_plat_create_v8_etm_connection(struct device *dev,
>
>         /* Can optionally have an etm node - return if not  */
>         cs_fwnode = fwnode_find_reference(root_fwnode, CTI_DT_CSDEV_ASSOC, 0);
> -       if (IS_ERR_OR_NULL(cs_fwnode))
> +       if (IS_ERR(cs_fwnode))
>                 return 0;
>
>         /* allocate memory */
> @@ -393,7 +393,7 @@ static int cti_plat_create_connection(struct device *dev,
>                 /* associated device ? */
>                 cs_fwnode = fwnode_find_reference(fwnode,
>                                                   CTI_DT_CSDEV_ASSOC, 0);
> -               if (!IS_ERR_OR_NULL(cs_fwnode)) {
> +               if (!IS_ERR(cs_fwnode)) {
>                         assoc_name = cti_plat_get_csdev_or_node_name(cs_fwnode,
>                                                                      &csdev);
>                         fwnode_handle_put(cs_fwnode);
> --
> 2.17.1
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-05-12 18:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-07  5:35 [PATCH] coresight: cti: remove incorrect NULL return check Calvin Johnson
2020-05-07  5:35 ` Calvin Johnson
2020-05-12 18:00 ` Mathieu Poirier [this message]
2020-05-12 18:00   ` Mathieu Poirier
2020-05-15 14:22   ` Greg Kroah-Hartman
2020-05-15 14:22     ` Greg Kroah-Hartman
  -- strict thread matches above, loose matches on Subject: below --
2020-05-05 13:40 Calvin Johnson
2020-05-05 13:40 ` Calvin Johnson
2020-05-06 17:05 ` Mathieu Poirier
2020-05-06 17:05   ` Mathieu Poirier

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='CANLsYkzeHpZygbQtz8Ed7dEaVMz362ftHQJ50DrBYR=+72NpJQ@mail.gmail.com' \
    --to=mathieu.poirier@linaro.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=calvin.johnson@oss.nxp.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux.cj@gmail.com \
    --cc=mike.leach@linaro.org \
    --cc=suzuki.poulose@arm.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.