Skip to contentSkip to conversation

w1-eeprom: Make use of static keyword in drivers

PATCH In review Tom Rini 2 participants 3 messages Sep 26, 2025 – Oct 9, 2025

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 w1-eeprom: Make use of static keyword in drivers

Both the ds24xxx and ds2502 have a family_supported array which is local to the driver but was not marked as static. Mark this as static as both best practice and to allow both to be built in "allyesconfig" for example.

---
 drivers/w1-eeprom/ds24xxx.c | 2 +-
 drivers/w1-eeprom/ds2502.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/w1-eeprom/ds24xxx.c +1 -1
index 413d8bc58814..801fade6f495 100644
@@ -53,7 +53,7 @@ U_BOOT_DRIVER(ds24xxx) = {
 	.probe		= ds24xxx_probe,
 };
 
-u8 family_supported[] = {
+static u8 family_supported[] = {
 	W1_FAMILY_DS24B33,
 	W1_FAMILY_DS2431,
 };
drivers/w1-eeprom/ds2502.c +1 -1
index db9f41e97269..981b41a34b2b 100644
@@ -243,7 +243,7 @@ U_BOOT_DRIVER(ds2502) = {
 	.probe		= ds2502_probe,
 };
 
-u8 family_supported[] = {
+static u8 family_supported[] = {
 	W1_FAMILY_DS2502,
 };
 
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Tom Rini

Both the ds24xxx and ds2502 have a family_supported array which is local to the driver but was not marked as static. Mark this as static as both best practice and to allow both to be built in "allyesconfig" for example.

author
#2 lore raw
In reply to Tom Rini
Quoted 6 lines · Tom Rini

Both the ds24xxx and ds2502 have a family_supported array which is local to the driver but was not marked as static. Mark this as static as both best practice and to allow both to be built in "allyesconfig" for example.

Applied to u-boot/master, thanks!

[1/1] w1-eeprom: Make use of static keyword in drivers

      commit: 7781f1d832bbf9461b82d48301091b15fcf1be14
Signature · 1 line
Tom