Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp1236389lqh; Mon, 6 May 2024 00:56:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXJF7lZ403JvmNJ5HPiQjh8eSEELPhljbSjchzPrNHCIIlXoyQqI/U2jv2R6JHOOh6fF0iu5RQqZC7oMalURXt5cm02BfKtoHOZmLhxzw== X-Google-Smtp-Source: AGHT+IEwFyrFQFLJ45lNTgIlZaytE3TMH4+c7ZHnQi99P39Nu6V6CaBf3XoB8LiGhkOW0Bbkryhw X-Received: by 2002:a05:6102:440d:b0:47b:9fd6:233b with SMTP id df13-20020a056102440d00b0047b9fd6233bmr14672741vsb.31.1714982203375; Mon, 06 May 2024 00:56:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714982203; cv=pass; d=google.com; s=arc-20160816; b=u2s5F/5HcxgDPHWBlFAUrEk8HPco0qzTwmvZdHqQKkq5xElm2s9WcXZ3Fm8KGgPbq+ sQZ3FYgGSf2xolmnvA/MrnMHR5XRv38vM/qjm4ZSSRL/iziZ0ksqPb2WuAslNPlNFqy9 emtpGgh/WAvuHS10+VL+z54SlESrFMoGlVjvDbX6y7//zzpJXqcHmIT6MCJwSmKN0Dcz iIl5AWMn0vVvsPxSvIN5siWX8jaVhbo3qZJFnePu6TJPu/9aPIkH5HgnUdMqA5dg4/nx RpasN8U/1Pv56JWh20wAWzo7aTvAlov3ANJeheCvgo8OuiRnuAxBhKzymEgbllA0D3i7 le1Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=lZ5pxYyWQ22h3iYJkJbVhsQ/witgBO7vpKrCrgeDD7w=; fh=qXsKMw2ZiSEUTFO3EFrfqcXDv4KzISJajAyqLHkfCbQ=; b=RF5PaZqjwXY5LMFrkmmiO4wF4DmVqJPxquXM8nXNdvtNsUwbEoeC+SoJsdUyMk4GhC Fpc9mg1akCyvUfRrUjJ7alXepyMDN9XPe9Q5l/n7KMLfTUDxOqx4oKDPRzk05x0b1+Hm JTX7ogHjP6kCuOJyO4qTAGpy2kHUHtlTPO3ZQHvZINmbNH7x0+1HQHNPg/aO0LaH1A16 rHR8otPgZ4KE4Ki//FzPn5hGbABR4nMV7O/d3YULa3w6RZ3kSgLhiN0MDTn+V2HwzVWu 0ArcxFNkYmphwbinI/6ibLN9E4lb8WU9phkGnzqg/AeMzX/zEy/XOSTPacP0e6fTAdME dOog==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DOxpkOQJ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-169440-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169440-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 jm12-20020ad45ecc000000b006a0b266895bsi6016039qvb.485.2024.05.06.00.56.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 00:56:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-169440-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=@kernel.org header.s=k20201202 header.b=DOxpkOQJ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-169440-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169440-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 1CA2C1C2144C for ; Mon, 6 May 2024 07:56:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EC207140E34; Mon, 6 May 2024 07:56:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DOxpkOQJ" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1575F2942A; Mon, 6 May 2024 07:56:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714982194; cv=none; b=FZ72MH5sKwnYm9TV+xLiiC8GAaMB0agT/S2VvbQxYm/e5SX6XMf6ZcDahnHBeqzSkks2rwgHZ9C4OE1Q/Q7mVRrNl+qI2wyeGHHENgayU103N6BqUCxEq++3w0evWwOHuCW/5y1uk9ssDcXzAIZGENa6Qq41Gg5GrJp4PWjKpaw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714982194; c=relaxed/simple; bh=PJq3zkTLcKGI5Yyb/qJMmtMjLyWmVB+1m2g2IYOZFok=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=giZaYQoAdgVrrSmA/0Cg92KWq57S5Vou3G43KQKuB1GiWPdRSNoe7MXzDJqw6KdBT+gUqwSxjVbGzyb40ev4h6zG4C81KALN5GZSsgdooZtmJHe/vGEtdVs6XKYJikopFjaOkIcJ+GSFW35xuRcQP7epaCnbjkWnDkZU7YGdlOY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DOxpkOQJ; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 892E7C116B1; Mon, 6 May 2024 07:56:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714982193; bh=PJq3zkTLcKGI5Yyb/qJMmtMjLyWmVB+1m2g2IYOZFok=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DOxpkOQJmrB/gA/J/WnV7gH6h0pUDWcf/tdh90HqRX8+rpS2g9OsovhNZwSChv3D/ 1ERnsui4rslZ2xMQcrUBylK1qf0SLYS0v6UgpFEtXc8fZ69EHNiwS1zX42w51r0swU hjmg0+9wTkXERxo+f+IZxAe0yuLInzm0MWNx+ozg9ADzibw2LmOb2AgFBImuaNYtSx glZGjAnpZvwyxUg75PHJ2kXH+aGd8o5PivCCPPgm9ws/NPCKEdPnK5elGRI7+wtZFM WUOB7VP27BGJSwXJ+wTrn2NfHYSxKbFmx29IH3iR1dOwzS4SnGlXQbV8oEUzgANFAj 3QBZdO/7sr9AA== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1s3tD7-000000007vO-3orH; Mon, 06 May 2024 09:56:33 +0200 Date: Mon, 6 May 2024 09:56:33 +0200 From: Johan Hovold To: Shashank Babu Chinta Venkata Cc: jingoohan1@gmail.com, gustavo.pimentel@synopsys.com, manivannan.sadhasivam@linaro.org, andersson@kernel.org, agross@kernel.org, konrad.dybcio@linaro.org, mani@kernel.org, quic_msarkar@quicinc.com, quic_kraravin@quicinc.com, Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Yoshihiro Shimoda , Serge Semin , Conor Dooley , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH v4 1/3] PCI: qcom: Refactor common code Message-ID: References: <20240501163610.8900-1-quic_schintav@quicinc.com> <20240501163610.8900-2-quic_schintav@quicinc.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=us-ascii Content-Disposition: inline In-Reply-To: <20240501163610.8900-2-quic_schintav@quicinc.com> On Wed, May 01, 2024 at 09:35:32AM -0700, Shashank Babu Chinta Venkata wrote: > Refactor common code from RC(Root Complex) and EP(End Point) > drivers and move them to a common driver. This acts as placeholder > for common source code for both drivers, thus avoiding duplication. > > Signed-off-by: Shashank Babu Chinta Venkata > --- > drivers/pci/controller/dwc/Kconfig | 5 ++ > drivers/pci/controller/dwc/Makefile | 1 + > drivers/pci/controller/dwc/pcie-qcom-common.c | 76 +++++++++++++++++++ > drivers/pci/controller/dwc/pcie-qcom-common.h | 12 +++ > drivers/pci/controller/dwc/pcie-qcom-ep.c | 39 +--------- > drivers/pci/controller/dwc/pcie-qcom.c | 69 +++-------------- > 6 files changed, 108 insertions(+), 94 deletions(-) > create mode 100644 drivers/pci/controller/dwc/pcie-qcom-common.c > create mode 100644 drivers/pci/controller/dwc/pcie-qcom-common.h > diff --git a/drivers/pci/controller/dwc/pcie-qcom-common.c b/drivers/pci/controller/dwc/pcie-qcom-common.c > new file mode 100644 > index 000000000000..228d9eec0222 > --- /dev/null > +++ b/drivers/pci/controller/dwc/pcie-qcom-common.c > @@ -0,0 +1,76 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * Copyright (c) 2014-2015, 2020 The Linux Foundation. All rights reserved. > + * Copyright (c) 2015, 2021 Linaro Limited. > + * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. You can't claim copyright for just moving old code around. So drop this. > + * > + */ > diff --git a/drivers/pci/controller/dwc/pcie-qcom-common.h b/drivers/pci/controller/dwc/pcie-qcom-common.h > new file mode 100644 > index 000000000000..da1760c7e164 > --- /dev/null > +++ b/drivers/pci/controller/dwc/pcie-qcom-common.h > @@ -0,0 +1,12 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/* > + * Copyright (c) 2014-2015, 2020 The Linux Foundation. All rights reserved. > + * Copyright (c) 2015, 2021 Linaro Limited. > + * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. Same here. > + */ Johan