include/device/device.h: Remove CHIP_NAME() macro
Macros can be confusing on their own; hiding commas make things worse.
This can sometimes be downright misleading. A "good" example would be
the code in soc/intel/xeon_sp/spr/chip.c:
CHIP_NAME("Intel SapphireRapids-SP").enable_dev = chip_enable_dev,
This appears as CHIP_NAME() being some struct when in fact these are
defining 2 separate members of the same struct.
It was decided to remove this macro altogether, as it does not do
anything special and incurs a maintenance burden.
Change-Id: Iaed6dfb144bddcf5c43634b0c955c19afce388f0
Signed-off-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80239
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Jakub Czapiga <czapiga@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
diff --git a/src/ec/51nb/npce985la0dx/npce985la0dx.c b/src/ec/51nb/npce985la0dx/npce985la0dx.c
index 06db530..d81ea90 100644
--- a/src/ec/51nb/npce985la0dx/npce985la0dx.c
+++ b/src/ec/51nb/npce985la0dx/npce985la0dx.c
@@ -17,6 +17,6 @@
}
struct chip_operations ec_51nb_npce985la0dx_ops = {
- CHIP_NAME("51NB EC")
+ .name = "51NB EC",
.enable_dev = ec_51nb_npce985la0dx_ops_enable,
};
diff --git a/src/ec/clevo/it5570e/ec.c b/src/ec/clevo/it5570e/ec.c
index 4f10750..d49bf36 100644
--- a/src/ec/clevo/it5570e/ec.c
+++ b/src/ec/clevo/it5570e/ec.c
@@ -123,6 +123,6 @@
}
struct chip_operations ec_clevo_it5570e_ops = {
- CHIP_NAME("Clevo IT5570E EC")
+ .name = "Clevo IT5570E EC",
.enable_dev = enable_dev,
};
diff --git a/src/ec/compal/ene932/ec.c b/src/ec/compal/ene932/ec.c
index 6389383..37f26b1 100644
--- a/src/ec/compal/ene932/ec.c
+++ b/src/ec/compal/ene932/ec.c
@@ -131,6 +131,6 @@
}
struct chip_operations ec_compal_ene932_ops = {
- CHIP_NAME("COMPAL ENE932 EC")
+ .name = "COMPAL ENE932 EC",
.enable_dev = enable_dev
};
diff --git a/src/ec/dell/mec5035/mec5035.c b/src/ec/dell/mec5035/mec5035.c
index eec79fb..68b6b2f 100644
--- a/src/ec/dell/mec5035/mec5035.c
+++ b/src/ec/dell/mec5035/mec5035.c
@@ -131,6 +131,6 @@
}
struct chip_operations ec_dell_mec5035_ops = {
- CHIP_NAME("MEC5035 EC")
+ .name = "MEC5035 EC",
.enable_dev = mec5035_enable,
};
diff --git a/src/ec/google/chromeec/audio_codec/audio_codec.c b/src/ec/google/chromeec/audio_codec/audio_codec.c
index 53037eb..a8def98 100644
--- a/src/ec/google/chromeec/audio_codec/audio_codec.c
+++ b/src/ec/google/chromeec/audio_codec/audio_codec.c
@@ -59,6 +59,6 @@
}
struct chip_operations ec_google_chromeec_audio_codec_ops = {
- CHIP_NAME("CrosEC Audio Codec Device")
+ .name = "CrosEC Audio Codec Device",
.enable_dev = crosec_audio_codec_enable
};
diff --git a/src/ec/google/chromeec/ec_lpc.c b/src/ec/google/chromeec/ec_lpc.c
index 080b95d..2a9eabb 100644
--- a/src/ec/google/chromeec/ec_lpc.c
+++ b/src/ec/google/chromeec/ec_lpc.c
@@ -451,7 +451,7 @@
}
struct chip_operations ec_google_chromeec_ops = {
- CHIP_NAME("Google Chrome EC")
+ .name = "Google Chrome EC",
.enable_dev = enable_dev,
};
diff --git a/src/ec/google/chromeec/i2c_tunnel/i2c_tunnel.c b/src/ec/google/chromeec/i2c_tunnel/i2c_tunnel.c
index e61ecfd8..64812d4 100644
--- a/src/ec/google/chromeec/i2c_tunnel/i2c_tunnel.c
+++ b/src/ec/google/chromeec/i2c_tunnel/i2c_tunnel.c
@@ -65,6 +65,6 @@
}
struct chip_operations ec_google_chromeec_i2c_tunnel_ops = {
- CHIP_NAME("CrosEC I2C Tunnel Device")
+ .name = "CrosEC I2C Tunnel Device",
.enable_dev = crosec_i2c_tunnel_enable
};
diff --git a/src/ec/google/chromeec/mux/conn/conn.c b/src/ec/google/chromeec/mux/conn/conn.c
index e179c33..bb3129b 100644
--- a/src/ec/google/chromeec/mux/conn/conn.c
+++ b/src/ec/google/chromeec/mux/conn/conn.c
@@ -52,6 +52,6 @@
}
struct chip_operations ec_google_chromeec_mux_conn_ops = {
- CHIP_NAME("CrosEC Type C Mux device")
+ .name = "CrosEC Type C Mux device",
.enable_dev = conn_enable,
};
diff --git a/src/ec/google/chromeec/mux/mux.c b/src/ec/google/chromeec/mux/mux.c
index 9324d2e..62be238 100644
--- a/src/ec/google/chromeec/mux/mux.c
+++ b/src/ec/google/chromeec/mux/mux.c
@@ -36,6 +36,6 @@
}
struct chip_operations ec_google_chromeec_mux_ops = {
- CHIP_NAME("CrosEC Type C Mux device")
+ .name = "CrosEC Type C Mux device",
.enable_dev = mux_enable
};
diff --git a/src/ec/google/wilco/chip.c b/src/ec/google/wilco/chip.c
index 88d416d..3c70294 100644
--- a/src/ec/google/wilco/chip.c
+++ b/src/ec/google/wilco/chip.c
@@ -230,6 +230,6 @@
}
struct chip_operations ec_google_wilco_ops = {
- CHIP_NAME("Google Wilco EC")
+ .name = "Google Wilco EC",
.enable_dev = wilco_ec_enable_dev,
};
diff --git a/src/ec/hp/kbc1126/ec.c b/src/ec/hp/kbc1126/ec.c
index 8035b94..2a71079 100644
--- a/src/ec/hp/kbc1126/ec.c
+++ b/src/ec/hp/kbc1126/ec.c
@@ -120,6 +120,6 @@
}
struct chip_operations ec_hp_kbc1126_ops = {
- CHIP_NAME("SMSC KBC1126 for HP laptops")
+ .name = "SMSC KBC1126 for HP laptops",
.enable_dev = kbc1126_enable
};
diff --git a/src/ec/kontron/it8516e/ec.c b/src/ec/kontron/it8516e/ec.c
index 5288976..1d67808 100644
--- a/src/ec/kontron/it8516e/ec.c
+++ b/src/ec/kontron/it8516e/ec.c
@@ -239,6 +239,6 @@
}
const struct chip_operations ec_kontron_it8516e_ops = {
- CHIP_NAME("Kontron (Fintec/ITE) IT8516E EC")
+ .name = "Kontron (Fintec/ITE) IT8516E EC",
.enable_dev = it8516e_enable
};
diff --git a/src/ec/kontron/kempld/kempld.c b/src/ec/kontron/kempld/kempld.c
index 9527429..7050ff4 100644
--- a/src/ec/kontron/kempld/kempld.c
+++ b/src/ec/kontron/kempld/kempld.c
@@ -105,6 +105,6 @@
}
struct chip_operations ec_kontron_kempld_ops = {
- CHIP_NAME("Kontron KEMPLD")
+ .name = "Kontron KEMPLD",
.enable_dev = kempld_enable_dev,
};
diff --git a/src/ec/lenovo/h8/h8.c b/src/ec/lenovo/h8/h8.c
index 9b7bcc3..35ca1d9 100644
--- a/src/ec/lenovo/h8/h8.c
+++ b/src/ec/lenovo/h8/h8.c
@@ -325,6 +325,6 @@
}
struct chip_operations ec_lenovo_h8_ops = {
- CHIP_NAME("Lenovo H8 EC")
+ .name = "Lenovo H8 EC",
.enable_dev = h8_enable,
};
diff --git a/src/ec/lenovo/pmh7/pmh7.c b/src/ec/lenovo/pmh7/pmh7.c
index fa24c68..95502f3 100644
--- a/src/ec/lenovo/pmh7/pmh7.c
+++ b/src/ec/lenovo/pmh7/pmh7.c
@@ -126,6 +126,6 @@
}
struct chip_operations ec_lenovo_pmh7_ops = {
- CHIP_NAME("Lenovo Power Management Hardware Hub 7")
+ .name = "Lenovo Power Management Hardware Hub 7",
.enable_dev = enable_dev,
};
diff --git a/src/ec/quanta/ene_kb3940q/ec.c b/src/ec/quanta/ene_kb3940q/ec.c
index 4b4f532..50bdaa3 100644
--- a/src/ec/quanta/ene_kb3940q/ec.c
+++ b/src/ec/quanta/ene_kb3940q/ec.c
@@ -141,6 +141,6 @@
}
struct chip_operations ec_quanta_ene_kb3940q_ops = {
- CHIP_NAME("QUANTA EnE KB3940Q EC")
+ .name = "QUANTA EnE KB3940Q EC",
.enable_dev = enable_dev
};
diff --git a/src/ec/quanta/it8518/ec.c b/src/ec/quanta/it8518/ec.c
index 80aaa5d..dfa8c50 100644
--- a/src/ec/quanta/it8518/ec.c
+++ b/src/ec/quanta/it8518/ec.c
@@ -154,6 +154,6 @@
}
struct chip_operations ec_quanta_it8518_ops = {
- CHIP_NAME("QUANTA IT8518 EC")
+ .name = "QUANTA IT8518 EC",
.enable_dev = enable_dev
};
diff --git a/src/ec/roda/it8518/ec.c b/src/ec/roda/it8518/ec.c
index cbeb210..9f877f7 100644
--- a/src/ec/roda/it8518/ec.c
+++ b/src/ec/roda/it8518/ec.c
@@ -48,6 +48,6 @@
}
struct chip_operations ec_roda_it8518_ops = {
- CHIP_NAME("Roda IT8518 EC")
+ .name = "Roda IT8518 EC",
.enable_dev = enable_dev
};
diff --git a/src/ec/smsc/mec1308/ec.c b/src/ec/smsc/mec1308/ec.c
index fb09aa5..39f3fbe 100644
--- a/src/ec/smsc/mec1308/ec.c
+++ b/src/ec/smsc/mec1308/ec.c
@@ -112,6 +112,6 @@
}
struct chip_operations ec_smsc_mec1308_ops = {
- CHIP_NAME("SMSC MEC1308 EC Mailbox Interface")
+ .name = "SMSC MEC1308 EC Mailbox Interface",
.enable_dev = mec1308_enable
};
diff --git a/src/ec/starlabs/merlin/ite.c b/src/ec/starlabs/merlin/ite.c
index daf5873..dec9766 100644
--- a/src/ec/starlabs/merlin/ite.c
+++ b/src/ec/starlabs/merlin/ite.c
@@ -322,6 +322,6 @@
}
struct chip_operations ec_starlabs_merlin_ops = {
- CHIP_NAME("ITE EC")
+ .name = "ITE EC",
.enable_dev = enable_dev
};
diff --git a/src/ec/starlabs/merlin/nuvoton.c b/src/ec/starlabs/merlin/nuvoton.c
index bad8d1b..d0b119f 100644
--- a/src/ec/starlabs/merlin/nuvoton.c
+++ b/src/ec/starlabs/merlin/nuvoton.c
@@ -297,6 +297,6 @@
}
struct chip_operations ec_starlabs_merlin_ops = {
- CHIP_NAME("NUVOTON EC")
+ .name = "NUVOTON EC",
.enable_dev = enable_dev
};