Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Hans Zhang <18255117159@163.com>
To: Manivannan Sadhasivam <mani@kernel.org>, sashiko-reviews@lists.linux.dev
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH v8 2/3] PCI: cadence: Add HPA IP debugfs for LTSSM status
Date: Wed, 15 Jul 2026 15:57:48 +0800	[thread overview]
Message-ID: <7a754ea9-c3bf-4507-9cc6-ceef32b3ecae@163.com> (raw)
In-Reply-To: <rrf3bid5g7hsaigimjy6d5i5sv63n6af3sriksfx7tyymg6fqz@a6vsjz6zrthr>



On 7/15/26 15:44, Manivannan Sadhasivam wrote:
> On Wed, Jul 01, 2026 at 07:48:18AM +0000, sashiko-bot@kernel.org wrote:
>> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
>> - [Low] Modpost link error when building Cadence drivers as modules due to an orphaned debugfs object.
>> --
>>
>> commit 98a72e00615e702fb5448b12d14570527e38b67f
>> Author: Hans Zhang <18255117159@163.com>
>>
>> PCI: cadence: Add HPA IP debugfs for LTSSM status
>>
>> This commit adds debugfs support for HPA-based Cadence PCIe controllers,
>> exposing the current LTSSM state through a new ltssm_status file.
>>
>>> diff --git a/drivers/pci/controller/cadence/Makefile b/drivers/pci/controller/cadence/Makefile
>>> index b8ec1cecfaa88..2cdc4617e0c20 100644
>>> --- a/drivers/pci/controller/cadence/Makefile
>>> +++ b/drivers/pci/controller/cadence/Makefile
>>> @@ -4,6 +4,7 @@ pcie-cadence-host-mod-y := pcie-cadence-host-common.o pcie-cadence-host.o pcie-c
>>>   pcie-cadence-ep-mod-y := pcie-cadence-ep.o
>>>   
>>>   obj-$(CONFIG_PCIE_CADENCE) = pcie-cadence-mod.o
>>> +obj-$(CONFIG_PCIE_CADENCE_DEBUGFS) += pcie-cadence-debugfs.o
>>
>> [Severity: Low]
>> Will this cause a link error during modpost when building the Cadence drivers
>> as modules?
>>
>> Since CONFIG_PCIE_CADENCE_DEBUGFS is a boolean, this adds the object directly
>> to obj-y instead of appending it to a composite module target like
>> pcie-cadence-mod-y. When the driver is configured as a module (e.g.,
>> CONFIG_PCIE_CADENCE=m), the object is compiled but left unlinked.
>>
>> Could this lead to undefined symbol errors for cdns_pcie_debugfs_init and
>> cdns_pcie_debugfs_deinit in the caller modules?
>>
> 
> This is a real concern. So I fixed the Makefile with below change while
> applying:
> 
> diff --git a/drivers/pci/controller/cadence/Makefile b/drivers/pci/controller/cadence/Makefile
> index b8ec1cecfaa8..80be0b885ac8 100644
> --- a/drivers/pci/controller/cadence/Makefile
> +++ b/drivers/pci/controller/cadence/Makefile
> @@ -1,5 +1,6 @@
>   # SPDX-License-Identifier: GPL-2.0
>   pcie-cadence-mod-y := pcie-cadence-hpa.o pcie-cadence.o
> +pcie-cadence-mod-$(CONFIG_PCIE_CADENCE_DEBUGFS) += pcie-cadence-debugfs.o
>   pcie-cadence-host-mod-y := pcie-cadence-host-common.o pcie-cadence-host.o pcie-cadence-host-hpa.o
>   pcie-cadence-ep-mod-y := pcie-cadence-ep.o
> 
> This will ensure that the debugfs functions are always built into the
> 'pcie-cadence-mod*' object.
> 

Hello Mani,

Thank you very much.

Best regards,
Hans

> - Mani
> 


  reply	other threads:[~2026-07-15  7:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-01  7:35 [PATCH v8 0/3] PCI: cadence: Add LTSSM debugfs Hans Zhang
2026-07-01  7:35 ` [PATCH v8 1/3] PCI: cadence: Add HPA architecture flag Hans Zhang
2026-07-01  7:46   ` sashiko-bot
2026-07-01  7:35 ` [PATCH v8 2/3] PCI: cadence: Add HPA IP debugfs for LTSSM status Hans Zhang
2026-07-01  7:48   ` sashiko-bot
2026-07-15  7:44     ` Manivannan Sadhasivam
2026-07-15  7:57       ` Hans Zhang [this message]
2026-07-01  7:35 ` [PATCH v8 3/3] PCI: cadence: Add LGA " Hans Zhang
2026-07-01  7:47   ` sashiko-bot
2026-07-15  7:39 ` [PATCH v8 0/3] PCI: cadence: Add LTSSM debugfs 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=7a754ea9-c3bf-4507-9cc6-ceef32b3ecae@163.com \
    --to=18255117159@163.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=mani@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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