mbox series

[v3,0/3] PCI: endpoint: fix bug for 2 APIs and simplify 1 API

Message ID 20241210-pci-epc-core_fix-v3-0-4d86dd573e4b@quicinc.com (mailing list archive)
Headers show
Series PCI: endpoint: fix bug for 2 APIs and simplify 1 API | expand

Message

Zijun Hu Dec. 10, 2024, 2 p.m. UTC
This patch series is to fix bug for APIs
- devm_pci_epc_destroy().
- pci_epf_remove_vepf().

and simplify APIs below:
- pci_epc_get().

Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
---
Changes in v3:
- Remove stable tag of patch 1/3
- Add one more patch 3/3
- Link to v2: https://lore.kernel.org/all/20241102-pci-epc-core_fix-v2-0-0785f8435be5@quicinc.com

Changes in v2:
- Correct tile and commit message for patch 1/2.
- Add one more patch 2/2 to simplify API pci_epc_get().
- Link to v1: https://lore.kernel.org/r/20241020-pci-epc-core_fix-v1-1-3899705e3537@quicinc.com

---
Zijun Hu (3):
      PCI: endpoint: Fix that API devm_pci_epc_destroy() fails to destroy the EPC device
      PCI: endpoint: Simplify API pci_epc_get() implementation
      PCI: endpoint: Fix API pci_epf_add_vepf() returning -EBUSY error

 drivers/pci/endpoint/pci-epc-core.c | 23 +++++++----------------
 drivers/pci/endpoint/pci-epf-core.c |  1 +
 2 files changed, 8 insertions(+), 16 deletions(-)
---
base-commit: 11066801dd4b7c4d75fce65c812723a80c1481ae
change-id: 20241020-pci-epc-core_fix-a92512fa9d19

Best regards,

Comments

Dan Carpenter Dec. 12, 2024, 9:35 a.m. UTC | #1
On Tue, Dec 10, 2024 at 10:00:17PM +0800, Zijun Hu wrote:
> This patch series is to fix bug for APIs
> - devm_pci_epc_destroy().
> - pci_epf_remove_vepf().
> 
> and simplify APIs below:
> - pci_epc_get().
> 
> Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
> ---

This is very good.  This is Config FS.  Is there a kself test for configfs
or did you create your own test?

regards,
dan carpenter
Zijun Hu Dec. 12, 2024, 11:56 a.m. UTC | #2
On 2024/12/12 17:35, Dan Carpenter wrote:
> On Tue, Dec 10, 2024 at 10:00:17PM +0800, Zijun Hu wrote:
>> This patch series is to fix bug for APIs
>> - devm_pci_epc_destroy().
>> - pci_epf_remove_vepf().
>>
>> and simplify APIs below:
>> - pci_epc_get().
>>
>> Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
>> ---
> 
> This is very good.  This is Config FS.  Is there a kself test for configfs
> or did you create your own test?
> 

no.

In order to investigate devres_release() usage for patch 1/3, i read
2 PCI source files and then find a few obvious bugs. (^^)

> regards,
> dan carpenter
> 
>
Bjorn Helgaas Dec. 12, 2024, 7:12 p.m. UTC | #3
On Tue, Dec 10, 2024 at 10:00:17PM +0800, Zijun Hu wrote:
> This patch series is to fix bug for APIs
> - devm_pci_epc_destroy().
> - pci_epf_remove_vepf().
> 
> and simplify APIs below:
> - pci_epc_get().
> 
> Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>

Applied to pci/endpoint for v6.14, thanks!

> ---
> Changes in v3:
> - Remove stable tag of patch 1/3
> - Add one more patch 3/3
> - Link to v2: https://lore.kernel.org/all/20241102-pci-epc-core_fix-v2-0-0785f8435be5@quicinc.com
> 
> Changes in v2:
> - Correct tile and commit message for patch 1/2.
> - Add one more patch 2/2 to simplify API pci_epc_get().
> - Link to v1: https://lore.kernel.org/r/20241020-pci-epc-core_fix-v1-1-3899705e3537@quicinc.com
> 
> ---
> Zijun Hu (3):
>       PCI: endpoint: Fix that API devm_pci_epc_destroy() fails to destroy the EPC device
>       PCI: endpoint: Simplify API pci_epc_get() implementation
>       PCI: endpoint: Fix API pci_epf_add_vepf() returning -EBUSY error
> 
>  drivers/pci/endpoint/pci-epc-core.c | 23 +++++++----------------
>  drivers/pci/endpoint/pci-epf-core.c |  1 +
>  2 files changed, 8 insertions(+), 16 deletions(-)
> ---
> base-commit: 11066801dd4b7c4d75fce65c812723a80c1481ae
> change-id: 20241020-pci-epc-core_fix-a92512fa9d19
> 
> Best regards,
> -- 
> Zijun Hu <quic_zijuhu@quicinc.com>
>