bus/pci: fix comment explaining device naming
PATCH 1/1 bus/pci: fix comment explaining device naming
The original triple negative was hard to read and the attempt to improve the formulation was commendable, unfortunately the new comment is the inverse of correct.
---
No Cc:stable as it was not yet released.
drivers/bus/pci/pci_common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/bus/pci/pci_common.c +3 -1
@@ -68,7 +68,9 @@ pci_name_set(struct rte_pci_device *dev) devargs =pci_devargs_lookup (&dev->addr); dev->device.devargs = devargs; -/* If the device is blocked, no rte_devargs exists for it. */ +/* When using a block-list, only blocked devices will have +* an rte_devargs. Allowed devices won't have one. +*/ if (devargs !=NULL )/* If an rte_devargs exists, the generic rte_device uses the * given name as its name.
Signature · 1 line
2.29.2
Quoted 19 lines · Gaetan Rivet
The original triple negative was hard to read and the attempt to improve the formulation was commendable, unfortunately the new comment is the inverse of correct.
Fixes a65a34a85ebf ("eal: replace usage of blacklist/whitelist in enums")Signed-off-by Gaetan Rivet <[email protected]>---
No Cc:stable as it was not yet released.
drivers/bus/pci/pci_common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/bus/pci/pci_common.c +0
-0
drivers/bus/pci/pci_common.c pci_name_set(struct rte_pci_device *dev) · line 76
Quoted 10 lines
drivers/bus/pci/pci_common.c +3
-1@@ -68,7 +68,9 @@ pci_name_set(struct rte_pci_device *dev) devargs =pci_devargs_lookup (&dev->addr); dev->device.devargs = devargs; -/* If the device is blocked, no rte_devargs exists for it. */ +/* When using a block-list, only blocked devices will have +* an rte_devargs. Allowed devices won't have one. +*/ if (devargs !=NULL )/* If an rte_devargs exists, the generic rte_device uses the * given name as its name.
Thanks for fixing my mistake - at least it became readable enough to understand it was the other way around :-)
Signature · 2 lines
Kind regards, Luca Boccassi
Quoted 20 lines · Gaetan Rivet
The original triple negative was hard to read and the attempt to improve the formulation was commendable, unfortunately the new comment is the inverse of correct.
Fixes a65a34a85ebf ("eal: replace usage of blacklist/whitelist in enums")Signed-off-by Gaetan Rivet <[email protected]>---
No Cc:stable as it was not yet released.
drivers/bus/pci/pci_common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/bus/pci/pci_common.c +0
-0
drivers/bus/pci/pci_common.c pci_name_set(struct rte_pci_device *dev) · line 71
Quoted 5 lines
drivers/bus/pci/pci_common.c +1
-1@@ -68,7 +68,9 @@ pci_name_set(struct rte_pci_device *dev) devargs =pci_devargs_lookup (&dev->addr); dev->device.devargs = devargs; -/* If the device is blocked, no rte_devargs exists for it. */ +/* When using a block-list, only blocked devices will have
Nit: I don't think we need a -, I would go with blocklist.
Quoted 8 lines
drivers/bus/pci/pci_common.c +2
-1+* an rte_devargs. Allowed devices won't have one. +*/ if (devargs !=NULL )/* If an rte_devargs exists, the generic rte_device uses the * given name as its name. -- 2.29.2
Signature · 1 line
David Marchand
Quoted 6 lines · Gaetan Rivet
The original triple negative was hard to read and the attempt to improve the formulation was commendable, unfortunately the new comment is the inverse of correct.
Fixes a65a34a85ebf ("eal: replace usage of blacklist/whitelist in enums")
Quoted 1 line
Signed-off-by Gaetan Rivet <[email protected]>
Thanks Gaëtan, applied.
Signature · 1 line
David Marchand