Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1755342ybj; Wed, 6 May 2020 04:51:07 -0700 (PDT) X-Google-Smtp-Source: APiQypILLqVQV0DXNyZsip1u51ik6vZ+fRmBXcDx932cjsrszUPMU1iWIPyxF7FBpPnp54giNkmL X-Received: by 2002:a17:906:2503:: with SMTP id i3mr6503004ejb.293.1588765867680; Wed, 06 May 2020 04:51:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588765867; cv=none; d=google.com; s=arc-20160816; b=HybIDv8wycTA7e0WeEMYOPKJPlg2Jgfsz2dvTh9NYNjVozxTnCTZNEd8JOgKvUam6c rYaUGHx8jCeltag8etQIqyZMGUhhiDGlRJfoDmp88MAoh3ZPkerpvXeC8+IRCVgf9PBO N8rYmXKvHaX0HaGfMGFD+dVUkXeMkJN4OTlUVaBLv1I16hYHqSHiIRUfT9RDHdOFiWmh BmfSXklY4q+jj6IR4KLyxW9maeXvfth0lM7jEv1PtceWEJuKE9WwjFfwfMMmBrf2i4zd 6rNAmgSm9VOPkG8jz4UJmEP6B1yVJfX9gdLhL+IJ5w+BRTdMunBc3wW/nmzcvOZpzGRa fYxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject; bh=BJBqJSRQf6+TfAc5agbOFu+x857JC8+7fnNqVj7P1aE=; b=n4gYeGirN9/AO1SHQhNT4fchVYGk+i42JBD+Uwn9DiXysM6hW668EhPk5vCq+elAtg tDC2X5b1Ct7GCMcvMOQlqgualMeFNNwfHAT7RZjs9F5SDofbael2gaEgevUeEE/YCy7k ZimiHWhDJwYZkLrv4Z/U0U78Dp+US6+SClhyjBdvHl5b+CjmLug7N8IM7dv08JxKYgGo ++WbpO/vLYq6RSzq66YVwosZmtyL5Nj/6EIrEAcT2qLhiCR+ch6yclqdBwfqad6tue5C d+ajZHk3NBEhiy8Lt9e0btcWe9UTIfuAKtIn3B/94jNdx8XUMbmOOosZGW5hA86sd3Ot pc8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=lXAvBhJk; 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=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t18si764525edr.553.2020.05.06.04.50.43; Wed, 06 May 2020 04:51:07 -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=@nvidia.com header.s=n1 header.b=lXAvBhJk; 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=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727083AbgEFLrz (ORCPT + 99 others); Wed, 6 May 2020 07:47:55 -0400 Received: from hqnvemgate25.nvidia.com ([216.228.121.64]:6394 "EHLO hqnvemgate25.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725796AbgEFLry (ORCPT ); Wed, 6 May 2020 07:47:54 -0400 Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Wed, 06 May 2020 04:46:44 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Wed, 06 May 2020 04:47:54 -0700 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Wed, 06 May 2020 04:47:54 -0700 Received: from [10.25.78.179] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 6 May 2020 11:47:52 +0000 Subject: Re: [PATCH] phy: tegra: Use PTR_ERR_OR_ZERO() to simplify code To: Aishwarya Ramakrishnan , Kishon Vijay Abraham I , Thierry Reding , Jonathan Hunter , Lorenzo Pieralisi , , , References: <20200505150058.17674-1-aishwaryarj100@gmail.com> X-Nvconfidentiality: public From: Vidya Sagar Message-ID: Date: Wed, 6 May 2020 17:17:49 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200505150058.17674-1-aishwaryarj100@gmail.com> X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1588765604; bh=BJBqJSRQf6+TfAc5agbOFu+x857JC8+7fnNqVj7P1aE=; h=X-PGP-Universal:Subject:To:References:X-Nvconfidentiality:From: Message-ID:Date:User-Agent:MIME-Version:In-Reply-To: X-Originating-IP:X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=lXAvBhJkbpUiZOHzaAwwDF61VpqdKcCQGjDYB34C2b8sPNq7TrGSB3yvPYtbmQ2h6 +MUrs1BzMuJRLLzbOQt5hu6exzpC4jTOGViSMgvjbkuolxNc1WLbewql4IROEm6lNQ cnRpdROBQ9U8rfQMeenem0ZdDaHxAOV41X+s2Qi8bwK+V2ZuWuYmQTdcZCkLUGWMdL f0KRQqtmzsrfmiFZpuS0hsMnvYQVMj14ttF9m5thK8LtIfBXbFpi3Ie7fPZ3tPOOiK KYtnFLAkCBGhjbr9DR8YCI2R0NcUWpwWguuDKRaHxKmZD7OC0NFQ33dePxQ8kwkzL8 m/SopzUpAFZCQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks for pushing this change. I'm fine with this change as it is attempting to change only the last occurrence of the (IS_ERR(...)) + PTR_ERR combination. But, this code was initially written with PTR_ERR_OR_ZERO() itself but later changed to use (IS_ERR(...)) + PTR_ERR based on the review comment from Dmitry Osipenko ( https://lkml.org/lkml/2019/6/20/1457 ) Adding Dmitry as well to review the change. I'm fine with this change. Reviewed-by: Vidya Sagar On 05-May-20 8:30 PM, Aishwarya Ramakrishnan wrote: > External email: Use caution opening links or attachments > > > PTR_ERR_OR_ZERO contains if(IS_ERR(...)) + PTR_ERR. > > Generated by: scripts/coccinelle/api/ptr_ret.cocci > > Signed-off-by: Aishwarya Ramakrishnan > --- > drivers/phy/tegra/phy-tegra194-p2u.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/phy/tegra/phy-tegra194-p2u.c b/drivers/phy/tegra/phy-tegra194-p2u.c > index 7042bed9feaa..42394d27f4cb 100644 > --- a/drivers/phy/tegra/phy-tegra194-p2u.c > +++ b/drivers/phy/tegra/phy-tegra194-p2u.c > @@ -92,10 +92,7 @@ static int tegra_p2u_probe(struct platform_device *pdev) > phy_set_drvdata(generic_phy, phy); > > phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate); > - if (IS_ERR(phy_provider)) > - return PTR_ERR(phy_provider); > - > - return 0; > + return PTR_ERR_OR_ZERO(phy_provider); > } > > static const struct of_device_id tegra_p2u_id_table[] = { > -- > 2.17.1 >