Skip to contentSkip to conversation

usb: ucsi: huawei_gaokun: make gaokun_ucsi_ops static

PATCH In review Pengyu Luo 2 participants 2 messages Mar 5 – Mar 9

Subsystems (3)
lore
Share & tools
lore

Pengyu Luo

author maintainer
#0 lore raw

PATCH 1/1 usb: ucsi: huawei_gaokun: make gaokun_ucsi_ops static

The gaokun_ucsi_ops structure is only used within its translation unit and is not referenced from any other file. Add the 'static' qualifier to avoid unnecessary symbol export.

Fixes 00327d7f2c8c ("usb: typec: ucsi: add Huawei Matebook E Go ucsi driver")
---
 drivers/usb/typec/ucsi/ucsi_huawei_gaokun.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/typec/ucsi/ucsi_huawei_gaokun.c +1 -1
index c5965656b..ca749fde4 100644
@@ -193,7 +193,7 @@ static void gaokun_ucsi_connector_status(struct ucsi_connector *con)
 	gaokun_set_orientation(con, &uec->ports[idx]);
 }
 
-const struct ucsi_operations gaokun_ucsi_ops = {
+static const struct ucsi_operations gaokun_ucsi_ops = {
 	.read_version = gaokun_ucsi_read_version,
 	.read_cci = gaokun_ucsi_read_cci,
 	.poll_cci = gaokun_ucsi_read_cci,
Signature · 1 line
2.53.0
maintainer Reviewed-by on v1 1/1
#1 lore raw

Thu, Mar 05, 2026 at 10:40:36PM +0800, Pengyu Luo kirjoitti:

Quoted 8 lines

The gaokun_ucsi_ops structure is only used within its translation unit and is not referenced from any other file. Add the 'static' qualifier to avoid unnecessary symbol export.

Fixes 00327d7f2c8c ("usb: typec: ucsi: add Huawei Matebook E Go ucsi driver")
Quoted 19 lines
---
 drivers/usb/typec/ucsi/ucsi_huawei_gaokun.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/typec/ucsi/ucsi_huawei_gaokun.c +1 -1
index c5965656b..ca749fde4 100644
@@ -193,7 +193,7 @@ static void gaokun_ucsi_connector_status(struct ucsi_connector *con)
 	gaokun_set_orientation(con, &uec->ports[idx]);
 }
 
-const struct ucsi_operations gaokun_ucsi_ops = {
+static const struct ucsi_operations gaokun_ucsi_ops = {
 	.read_version = gaokun_ucsi_read_version,
 	.read_cci = gaokun_ucsi_read_cci,
 	.poll_cci = gaokun_ucsi_read_cci,
Signature · 1 line
2.53.0
Signature · 1 line
heikki