From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C44EEC7115B for ; Fri, 20 Jun 2025 15:44:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Owner; bh=oJ80w8tiOGrF52U3FLv/zABh+Wv7wmRzYJg7FVM32iw=; b=2vYW61rLaYqpJz GkgGncXFKMm8qXIUl+XNGetx1e5rQvoKSHefWrokol2doQJ+rv0lI5xQkzDR+tln493DNJCSF+C7H S5x8YbZkG6Kt0X9ZXDVxF1gU39wQvS0WSZXgbzSCPHEnA84P9sO1kHo23+u051bW4LFv5g7KM1x+3 NFZ26P3RVT1UgNy7INJQ1zt2xL2F5Fn98nxPwPmwxahvlBt40zOFGj476FD4rhHxhNeqhI2Fm1V5b dQiw/wmSz8HOKZ5zflYsJ0GEOYkODoEpDSsxoKPAjY2J60XMHaSTIGmCY/wzlQmsr8/0mPX1HTPTl qygT00oQSFzlikBV9ZeQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uSduh-0000000G1bn-2GvB; Fri, 20 Jun 2025 15:44:23 +0000 Received: from tor.source.kernel.org ([172.105.4.254]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uSdsT-0000000G1CL-0exg; Fri, 20 Jun 2025 15:42:05 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id 6CC946250A; Fri, 20 Jun 2025 15:42:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2BC2C4CEE3; Fri, 20 Jun 2025 15:42:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1750434124; bh=SHPTxnd4pbMYQOtiIQLzx9eD7HZDUt3+mEFmqV4gGBg=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=g5okcp6JBl2EOByxwdGhanD/oHlYvrWI0Ju/YEgHG3PVZv122YXGG65QLIySgjCma EvWhT3unRjT77HoYGSlzUPV2HwmghNbhw7zb3sVVWlaXsf4xguDKGYXMERIg2YM9pX gXDqosrULppL3gOfoy8ENwCQQq1pLft2MI/KDPXuKmovWBi50brnztquvRguMV/Kf/ Kw4lvcJCWsZB9ch0PkRu3OxocrNdJc6cypNlM7NJoZRv/PxZRISSIqPDff2kM0uGmK dqHzCD9MspAjRyfIlWI3SkIGkwfQj+F+zUfHIg8ucU5RnCXhFOQJ2ysIWuRpDdKTof Uu7jXcW0sVKdQ== Date: Fri, 20 Jun 2025 10:42:02 -0500 From: Bjorn Helgaas To: Hans Zhang <18255117159@163.com> Cc: lpieralisi@kernel.org, bhelgaas@google.com, kwilczynski@kernel.org, shawn.lin@rock-chips.com, heiko@sntech.de, robh@kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] PCI: rockchip: Remove redundant PCIe message routing definitions Message-ID: <20250620154202.GA1292011@bhelgaas> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20250607154913.805027-3-18255117159@163.com> X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org On Sat, Jun 07, 2025 at 11:49:13PM +0800, Hans Zhang wrote: > The Rockchip driver contained duplicated message routing and INTx code > definitions (e.g., ROCKCHIP_PCIE_MSG_ROUTING_TO_RC, > ROCKCHIP_PCIE_MSG_CODE_ASSERT_INTA). These are already provided by the > PCI core in drivers/pci/pci.h as PCIE_MSG_TYPE_R_RC and > PCIE_MSG_CODE_ASSERT_INTA, respectively. > > Remove the driver-specific definitions and use the common PCIe macros > instead. This aligns the driver with the PCIe specification and reduces > maintenance overhead. > > Signed-off-by: Hans Zhang <18255117159@163.com> > --- > drivers/pci/controller/pcie-rockchip.h | 14 -------------- > 1 file changed, 14 deletions(-) > > diff --git a/drivers/pci/controller/pcie-rockchip.h b/drivers/pci/controller/pcie-rockchip.h > index 5864a20323f2..12bc8da59d73 100644 > --- a/drivers/pci/controller/pcie-rockchip.h > +++ b/drivers/pci/controller/pcie-rockchip.h > @@ -215,20 +215,6 @@ > #define RC_REGION_0_TYPE_MASK GENMASK(3, 0) > #define MAX_AXI_WRAPPER_REGION_NUM 33 > > -#define ROCKCHIP_PCIE_MSG_ROUTING_TO_RC 0x0 > -#define ROCKCHIP_PCIE_MSG_ROUTING_VIA_ADDR 0x1 > -#define ROCKCHIP_PCIE_MSG_ROUTING_VIA_ID 0x2 > -#define ROCKCHIP_PCIE_MSG_ROUTING_BROADCAST 0x3 > -#define ROCKCHIP_PCIE_MSG_ROUTING_LOCAL_INTX 0x4 > -#define ROCKCHIP_PCIE_MSG_ROUTING_PME_ACK 0x5 > -#define ROCKCHIP_PCIE_MSG_CODE_ASSERT_INTA 0x20 > -#define ROCKCHIP_PCIE_MSG_CODE_ASSERT_INTB 0x21 > -#define ROCKCHIP_PCIE_MSG_CODE_ASSERT_INTC 0x22 > -#define ROCKCHIP_PCIE_MSG_CODE_ASSERT_INTD 0x23 > -#define ROCKCHIP_PCIE_MSG_CODE_DEASSERT_INTA 0x24 > -#define ROCKCHIP_PCIE_MSG_CODE_DEASSERT_INTB 0x25 > -#define ROCKCHIP_PCIE_MSG_CODE_DEASSERT_INTC 0x26 > -#define ROCKCHIP_PCIE_MSG_CODE_DEASSERT_INTD 0x27 Thanks for doing this! In fact, these definitions are not only redundant, they're not even used at all. > #define ROCKCHIP_PCIE_MSG_ROUTING_MASK GENMASK(7, 5) > #define ROCKCHIP_PCIE_MSG_ROUTING(route) \ > (((route) << 5) & ROCKCHIP_PCIE_MSG_ROUTING_MASK) And neither are these ROUTING and CODE definitions. _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip