Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp335521lqa; Sat, 27 Apr 2024 04:38:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVVJ83oCfJ7Y8ilgZKyWq6lAmbt6spMEcYQDSbgi04VRCV+U5p3T53mXzUyjMhi/MmRlj00suI1iz8sxNbMgCTimIkwyZoRtrzWBx0KMA== X-Google-Smtp-Source: AGHT+IFBBA/xVdPDNmuFNqT7SqF18qm1iaY38W4CtWnkBxoLAo2KU5BcOpon50HvlqZ5h1tujiSa X-Received: by 2002:a05:620a:2442:b0:790:a4aa:7f59 with SMTP id h2-20020a05620a244200b00790a4aa7f59mr3583720qkn.39.1714217917045; Sat, 27 Apr 2024 04:38:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714217917; cv=pass; d=google.com; s=arc-20160816; b=tg8S972Dx8YzUOSRkwyOB4ZSLN5O7cmbADdPIMmgtPfUqsOo94B1xKMIC/O5OgM+QD mUacSEa6IspUYGJa5iMpLr/JWOiyzhQfrFtx6PPVENpqKvJCwUXH5zD+kprfBRFgRMyw xjK4GQTVb9ta1AL/DcAh8GlDKxZco4Yt24tYZGlkP+WQfZXfBRgP6iDjuVo6REZAsO6f eFZSpLFPflNFMrl16MWYsYm66iTpIYAxo2R373ul0divitGUinFxqUwyhZgZnIw5menz I62YjxmERgZOkzIgDObtSgZQh4xWcst4qojs2nXiXNzUue8l9djcr2yKhdt9135niDE/ dO/Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Np//FY4PRW7HBHaV5Y9xc/c4l4DQaCwD4Awtz2s21Ww=; fh=6D6sVBmlWiZ2LTN2B9PXsuf6vvx5gRG5SOVTt/UmgWw=; b=uIlnZrGN1Sh6/TBhPvfxeaJ2tzr75xEFTywM6nK4DuLF1RghV50OFZ6LfyxhiY+TM4 vGHZLB+UK+6vTuN/hJDQ1rNm97iS0zY1QEKuS1dw0cuKJiR79VhncvuymQECDgGjZFcU zbPcr9GsRZ3NL1Rvp+QdxCsa2o2Xyzhkp9pxVkkbroj5/iEDrqCfr3GX6/VC47FNNpoj S1TzK8JzVFuz7OO3yrrmABitLPK334RNVTyfoFVc8Mc6/D4MWVEBUMVdQV/FopXASKV8 NdMbQuOzn0mwmUguaUZ5ABEZSWkr2v7d4TCK+Yb/ZTMHtGpx4z7L75odHQ9jnAp+j/XZ CoxA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="WHmyZQ/y"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-161039-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-161039-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id jz10-20020a0562140e6a00b006a086498a93si12462597qvb.380.2024.04.27.04.38.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Apr 2024 04:38:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-161039-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="WHmyZQ/y"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-161039-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-161039-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id B68F01C21C90 for ; Sat, 27 Apr 2024 11:38:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A66254CB37; Sat, 27 Apr 2024 11:38:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="WHmyZQ/y" Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 92DD64204B for ; Sat, 27 Apr 2024 11:38:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714217909; cv=none; b=N1rAkXX65tpwY0ifeRQXnOH3EbKEqyDqzqHGYQiZG9WQ2IVxSF5B8pdzD1qGaF/ApYhkj4zDj0GYKf8dLazPoJgJ3FVRERQODvULWmZvShEov0r6Bk5EwbCfHjU1k52bMgbPfsXRGk017ElJVyrzl2YPhVNdFOG+SDUwbZ4+CmM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714217909; c=relaxed/simple; bh=p8O2sAM2IxpLXYnB4aXc6lDvtD3kwwkCCZ0i/MQiGKg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=F8FMMd3jJlGhO1Jz2Fo5S2SrSYiqnuv2OK3GAFYaOjWT6O48HCNJhfDfsBWuThhaZXaXcFa/F1t/HFafwVVG9NdqLRrM9xl8n9M3hu5Bmi6taHGCaAPd7dgmcS+Mi3PWUPJaVab8qJgFLodhy0dSin3hoFrXrnivZTPDjauF+fA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=WHmyZQ/y; arc=none smtp.client-ip=209.85.210.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-6ee0642f718so3052629b3a.0 for ; Sat, 27 Apr 2024 04:38:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714217908; x=1714822708; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=Np//FY4PRW7HBHaV5Y9xc/c4l4DQaCwD4Awtz2s21Ww=; b=WHmyZQ/yM1AjGbOsKmFc2eXmnX2Heg+JZEZmebwLAGilKJr49+I4ZGkdWOFYiAeYI9 MXg2KymXYFUta7riUD5r2zwR+koPDCAY6NXpXEx2/7aSP0o/JHFIsuxmMkJRVgk1E7E9 kW1gJmAYGpgE7pjjd249mJwU0WBjG2jXet2Dd7FHc+7FN8GbBWMPW7q+KDQVoAxecHOs WaZfkx7uREGEO8Q5xolXeUGdywH/5DUbQ5OcOZDs2u0mKwt7B5o1N0eZR7vYYuDtpPkU 4XaDTGN8jX2IteQ3o7c38N9B8qOkU/smw+yZ6v2K4S32T/GFUnlfR6qdHIAeGYC/IYVF s1Og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714217908; x=1714822708; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Np//FY4PRW7HBHaV5Y9xc/c4l4DQaCwD4Awtz2s21Ww=; b=DuAKIeCo+eROKOwn23hx5viyukE9xCJiD3wpAXTp3U7T3OAtBMIGWjwWr8YjrrSKKs ub62dZ0fZYpmwuq+S8KHBcSv/KPe+k3mOuy68/mhORRRvzF89xQuYC5fmH2sTfP1olNH D2nQFPnzS2IFUybE/e64v+BYPS9TEfsHA31NlhVkc85l0DPwOttyO1oVKEqkD9GexYPq EpUHAg+WfetL8cS3HWi46XJbcu9LuT+60H/3LCwYa8s/4hSy3DxvgCqoCoMVh56vkjbd e1B5r7HKV6nFFUl42qBq+3jc3p/FGojo2vNTYljJEFn9pCiL00McGn2Qcqe3kIDpntbC p5QQ== X-Forwarded-Encrypted: i=1; AJvYcCWZR+yUPvo1mXA7oYddZCPv9lzdkouhcRP75wCSUlaOdXTWWwJ28E6bXVjHObC7cIL5wmM86PPMVS3enfdPuk8YahQSPJBJtZRHvgrB X-Gm-Message-State: AOJu0YzcACDcbjnFawrNoVbdMQwm9n2AQjTITwT+7YOxBzMrjD/G+mGl DnUd5k9EAoUIhZhqOBB2pTBNRm1YHYkNS7ynsrJ16cwUHzfRji9LvuPO+afHAw== X-Received: by 2002:a17:90a:c687:b0:2b0:763b:370e with SMTP id n7-20020a17090ac68700b002b0763b370emr3311655pjt.18.1714217907747; Sat, 27 Apr 2024 04:38:27 -0700 (PDT) Received: from thinkpad ([117.213.97.210]) by smtp.gmail.com with ESMTPSA id s11-20020a17090ae68b00b002adb62b633bsm10608534pjy.43.2024.04.27.04.38.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Apr 2024 04:38:27 -0700 (PDT) Date: Sat, 27 Apr 2024 17:08:17 +0530 From: Manivannan Sadhasivam To: Frank Li Cc: Richard Zhu , Lucas Stach , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Philipp Zabel , Liam Girdwood , Mark Brown , Krzysztof Kozlowski , Conor Dooley , linux-pci@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH v3 09/11] PCI: imx: Consolidate redundant if-checks Message-ID: <20240427113817.GN1981@thinkpad> References: <20240402-pci2_upstream-v3-0-803414bdb430@nxp.com> <20240402-pci2_upstream-v3-9-803414bdb430@nxp.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240402-pci2_upstream-v3-9-803414bdb430@nxp.com> On Tue, Apr 02, 2024 at 10:33:45AM -0400, Frank Li wrote: > Consolidated redundant if-checks pertaining to imx_pcie->phy. Instead of > two separate checks, merged them into one to improve code readability. > > if (imx_pcie->phy) { > ... code 1 > } > > if (imx_pcie->phy) { > ... code 2 > } > > Merge into one if block. > > if (imx_pcie->phy) { > ... code 1 > ... code 2 > } > > Signed-off-by: Frank Li Reviewed-by: Manivannan Sadhasivam - Mani > --- > drivers/pci/controller/dwc/pcie-imx.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/pci/controller/dwc/pcie-imx.c b/drivers/pci/controller/dwc/pcie-imx.c > index 653d8e8ee1abc..378808262d16b 100644 > --- a/drivers/pci/controller/dwc/pcie-imx.c > +++ b/drivers/pci/controller/dwc/pcie-imx.c > @@ -1103,9 +1103,7 @@ static int imx_pcie_host_init(struct dw_pcie_rp *pp) > dev_err(dev, "pcie PHY power up failed\n"); > goto err_clk_disable; > } > - } > > - if (imx_pcie->phy) { > ret = phy_power_on(imx_pcie->phy); > if (ret) { > dev_err(dev, "waiting for PHY ready timeout!\n"); > > -- > 2.34.1 > -- மணிவண்ணன் சதாசிவம்