Skip to contentSkip to conversation

thunderbolt: Fix copy+paste error in match_service_id()

PATCH In review Eric Biggers 2 participants 2 messages Jul 21, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 thunderbolt: Fix copy+paste error in match_service_id()

The second instance of TBSVC_MATCH_PROTOCOL_VERSION seems to have been intended to be TBSVC_MATCH_PROTOCOL_REVISION.

Fixes d1ff70241a27 ("thunderbolt: Add support for XDomain discovery protocol")
---
 drivers/thunderbolt/domain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thunderbolt/domain.c +1 -1
index a3a7c8059eeeb..45239703745e5 100644
@@ -34,11 +34,11 @@ static bool match_service_id(const struct tb_service_id *id,
 	if (id->match_flags & TBSVC_MATCH_PROTOCOL_VERSION) {
 		if (id->protocol_version != svc->prtcvers)
 			return false;
 	}
 
-	if (id->match_flags & TBSVC_MATCH_PROTOCOL_VERSION) {
+	if (id->match_flags & TBSVC_MATCH_PROTOCOL_REVISION) {
 		if (id->protocol_revision != svc->prtcrevs)
 			return false;
 	}
 
 	return true;

base-commit: 89be9a83ccf1f88522317ce02f854f30d6115c41

Signature · 1 line
2.50.1
#1 lore raw
Quoted 27 lines · Eric Biggers

The second instance of TBSVC_MATCH_PROTOCOL_VERSION seems to have been intended to be TBSVC_MATCH_PROTOCOL_REVISION.

Fixes d1ff70241a27 ("thunderbolt: Add support for XDomain discovery protocol")
---
 drivers/thunderbolt/domain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thunderbolt/domain.c +1 -1
index a3a7c8059eeeb..45239703745e5 100644
@@ -34,11 +34,11 @@ static bool match_service_id(const struct tb_service_id *id,
 	if (id->match_flags & TBSVC_MATCH_PROTOCOL_VERSION) {
 		if (id->protocol_version != svc->prtcvers)
 			return false;
 	}
 
-	if (id->match_flags & TBSVC_MATCH_PROTOCOL_VERSION) {
+	if (id->match_flags & TBSVC_MATCH_PROTOCOL_REVISION) {
 		if (id->protocol_revision != svc->prtcrevs)
 			return false;
 	}
 
 	return true;
Quoted 5 lines

base-commit: 89be9a83ccf1f88522317ce02f854f30d6115c41

Signature · 1 line
2.50.1

Thanks, I'll just queue this up now.

greg k-h