Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2908934ybk; Tue, 12 May 2020 11:03:15 -0700 (PDT) X-Google-Smtp-Source: APiQypL4elzLZCKYIpkh6l+DxWriuuFzlfo1r0biw0obbDY8qq7gUXNoN1GGI3U+G0c1D/pV5VsO X-Received: by 2002:a17:906:4e8a:: with SMTP id v10mr18395376eju.63.1589306595255; Tue, 12 May 2020 11:03:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589306595; cv=none; d=google.com; s=arc-20160816; b=VL3btIdajL4tOn4F01gkyEN2n1+c9adlaxwWk8nfsfWmuWj8IzCap78qY4ZGHnciHk mE/hAwNFudMH4s5W3Vf5ABWo0FC6aAewJkS9K92kkcUkDbQ2tnfoWP/mKMw/EeZ6KJFK NpGMVWZI1xxNTIVc4NkF/V9h4RVwnr73ihFHRBaV/hz7utl5LQTF/gazfATnJYsf69xY iak+fDZT843PjSDexpltaHW8oj3z3/bdUf4Hh0Q0NKJZOCruTsZSvRYug5Qx4Icyp0xS fc5OZspSFQ7U+87XYltwOHtc8a5VRIreJ3MZR9SjrcYZZKQOyob65ncpZF/9RgNc0YHs ktoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=cLEAYLVD6JreucQil+ujhm8FErflJCkoe7KXXK012mc=; b=fYY4gwIgiHw451kysA2xrQMMxgJ8saN8EPJQRNET9fO/V8viU9/G2xmnZT3spu4l0x Z6t2BGVuSPZK3uTf/VbORoRW+jMm0P4hor+cSziEooqJK1EALSKjBZV1hBEmpBprzOny YXZxmPnOs1BrJe0s1Ai9GOcqxbYp08tObTTR2fyGfDuuNIRMn93eD4UM4u5Mt2P/FbtV drOOQPwh5xFhM291xB4tU20/KiBfX1aNTe7/sustPx31eT+V7iybo8dgc4ISt8GdQm4T WhgzjaM6v4M53kCI+ta46clwdDhc5Y3SKs75vpSSBgIJ7yFK6aCuXbaEYTUUPqsrAN34 P0PQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JpAw+cFG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q6si8302856edj.601.2020.05.12.11.02.49; Tue, 12 May 2020 11:03:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JpAw+cFG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730458AbgELSAe (ORCPT + 99 others); Tue, 12 May 2020 14:00:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725938AbgELSAe (ORCPT ); Tue, 12 May 2020 14:00:34 -0400 Received: from mail-il1-x141.google.com (mail-il1-x141.google.com [IPv6:2607:f8b0:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D989DC05BD09 for ; Tue, 12 May 2020 11:00:32 -0700 (PDT) Received: by mail-il1-x141.google.com with SMTP id i16so13249538ils.12 for ; Tue, 12 May 2020 11:00:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=cLEAYLVD6JreucQil+ujhm8FErflJCkoe7KXXK012mc=; b=JpAw+cFGmfHBajujn/xovuM0dYlazaSRxJ4KOtDR8DxkxTDdhtE1+ux/9NOdXlkDvb Yj5I98DG6givG6zWx5FND6O4IbR9RmMma41huxQDdrAFggw14jKpQ6A8aCQjY5lNRLaJ TtOlnoUqEuX2PFLxUBkT45aJ2ipRGUiirEJKSQ8+dIFJ57Bmx6oE6c8Vhs02VfxbT7mR JfL9SB7n3gHK8JbOhQmkzLxnr/v0qljAoDLqHHpHq57tY72JlfgJJ3aykj1tLeQtIDDf OOfoPyKWJWz1awCXqduOmpzQDGDJriVLYqiGyOEOK2s0Ek0MioR+r97kcvvl5CTgCUBu BnBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=cLEAYLVD6JreucQil+ujhm8FErflJCkoe7KXXK012mc=; b=TiLpguve1+LsD2AbwoY8anjTZsHwiUom/306aEOABtCuVeJJmO9wMLuBVjyv66uzMS A7vGG53x/4w5hdCPKBsgGcpwQ3CF4uOKXZGLEzx0C4g2wDDfPrX80MmyLNSq7ia5SObR 6uwYGof5n1niT64uVfjARy9MwXOWOgR1Kv1Tq3fP7qMTVbGI0cz/AuBqfgdNl2qGarCe HZLEEvf0N9jyWKpchplk/TZe2HEu1OBiUxk3hB4i4mC/XlkyH5qxW6nVrDam0tdr3yH8 kfaNcBB4T1noK4ze3/oRqWcVx8rzV2+t/FOxg90RpGzVp4wU+TuErqsHrc5iQOf+UUbg jm0Q== X-Gm-Message-State: AGi0Puag03/b0ARMWW7IASTvWijXUfCdGRePl4C8g+5azAhwv54y3G8j ZJVKXKN7U+nEYLFFY4x5dCfGyiMAQ53Yf4wDXS4SwQ== X-Received: by 2002:a92:390f:: with SMTP id g15mr1559060ila.72.1589306432104; Tue, 12 May 2020 11:00:32 -0700 (PDT) MIME-Version: 1.0 References: <20200507053547.13707-1-calvin.johnson@oss.nxp.com> In-Reply-To: <20200507053547.13707-1-calvin.johnson@oss.nxp.com> From: Mathieu Poirier Date: Tue, 12 May 2020 12:00:21 -0600 Message-ID: Subject: Re: [PATCH] coresight: cti: remove incorrect NULL return check To: Calvin Johnson , Greg Kroah-Hartman Cc: Mike Leach , linux.cj@gmail.com, Alexander Shishkin , Suzuki K Poulose , linux-arm-kernel , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Greg, On Wed, 6 May 2020 at 23:36, Calvin Johnson wrote: > > fwnode_find_reference() doesn't return NULL and hence that check > should be avoided. > > Signed-off-by: Calvin Johnson > Reviewed-by: Mathieu Poirier 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 >