From: Hans Zhang <18255117159@163.com>
To: Bjorn Helgaas <helgaas@kernel.org>
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
Date: Fri, 20 Jun 2025 23:58:53 +0800 [thread overview]
Message-ID: <4bfc8c05-c6e6-4246-960c-ee5802840523@163.com> (raw)
In-Reply-To: <20250620154202.GA1292011@bhelgaas>
On 2025/6/20 23:42, Bjorn Helgaas wrote:
> 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.
Dear Bjorn,
Yes, this driver has too many unused definitions. I can delete the other
unused definitions next. For this series, I just delete the similar
macro definitions in drivers/pci/pci.h.
Best regards,
Hans
next prev parent reply other threads:[~2025-06-20 15:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-07 15:49 [PATCH 0/2] PCI: Consolidate PCIe message routing definitions and remove driver-specific duplicates Hans Zhang
2025-06-07 15:49 ` [PATCH 1/2] PCI: cadence: Replace private message routing enums with PCI core definitions Hans Zhang
2025-06-07 15:49 ` [PATCH 2/2] PCI: rockchip: Remove redundant PCIe message routing definitions Hans Zhang
2025-06-20 15:42 ` Bjorn Helgaas
2025-06-20 15:58 ` Hans Zhang [this message]
2025-06-19 12:52 ` (subset) [PATCH 0/2] PCI: Consolidate PCIe message routing definitions and remove driver-specific duplicates Manivannan Sadhasivam
2025-06-19 12:56 ` Manivannan Sadhasivam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4bfc8c05-c6e6-4246-960c-ee5802840523@163.com \
--to=18255117159@163.com \
--cc=bhelgaas@google.com \
--cc=heiko@sntech.de \
--cc=helgaas@kernel.org \
--cc=kwilczynski@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=lpieralisi@kernel.org \
--cc=robh@kernel.org \
--cc=shawn.lin@rock-chips.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®