[PATCH] drivers/pci: Add minor comment for maximum capability constant

Frediano Ziglio posted 1 patch 4 months, 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20250613101334.164310-1-frediano.ziglio@cloud.com
xen/drivers/pci/pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] drivers/pci: Add minor comment for maximum capability constant
Posted by Frediano Ziglio 4 months, 2 weeks ago
The comment is similar to extended capabilities in the function
below.

Signed-off-by: Frediano Ziglio <frediano.ziglio@cloud.com>
---
 xen/drivers/pci/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/drivers/pci/pci.c b/xen/drivers/pci/pci.c
index acf4cebe42..e1ddde90eb 100644
--- a/xen/drivers/pci/pci.c
+++ b/xen/drivers/pci/pci.c
@@ -11,7 +11,7 @@
 unsigned int pci_find_cap_offset(pci_sbdf_t sbdf, unsigned int cap)
 {
     u8 id;
-    int max_cap = 48;
+    int max_cap = 48; /* 192 bytes, minimum 4 bytes per capability */
     u8 pos = PCI_CAPABILITY_LIST;
     u16 status;
 
-- 
2.43.0
Re: [PATCH] drivers/pci: Add minor comment for maximum capability constant
Posted by Jan Beulich 4 months, 2 weeks ago
On 13.06.2025 12:13, Frediano Ziglio wrote:
> The comment is similar to extended capabilities in the function
> below.
> 
> Signed-off-by: Frediano Ziglio <frediano.ziglio@cloud.com>

Acked-by: Jan Beulich <jbeulich@suse.com>