Nico Huber has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/40207 )
Change subject: Replace DEVICE_NOOP with noop_(set|read)_resources ......................................................................
Replace DEVICE_NOOP with noop_(set|read)_resources
`.read_resources` and `.set_resources` are the only two device operations that are considered mandatory. Other function pointers can be left NULL. Having dedicated no-op implementations for the two mandatory fields should stop the leaking of no-op pointers to other fields.
Change-Id: I6469a7568dc24317c95e238749d878e798b0a362 Signed-off-by: Nico Huber nico.h@gmx.de --- M src/device/root_device.c M src/drivers/crb/tis.c M src/drivers/generic/adau7002/adau7002.c M src/drivers/generic/generic/generic.c M src/drivers/generic/gpio_keys/gpio_keys.c M src/drivers/generic/gpio_regulator/gpio_regulator.c M src/drivers/generic/ioapic/ioapic.c M src/drivers/generic/max98357a/max98357a.c M src/drivers/i2c/adt7463/adt7463.c M src/drivers/i2c/at24rf08c/at24rf08c.c M src/drivers/i2c/ck505/ck505.c M src/drivers/i2c/da7219/da7219.c M src/drivers/i2c/generic/generic.c M src/drivers/i2c/hid/hid.c M src/drivers/i2c/lm96000/lm96000.c M src/drivers/i2c/max98373/max98373.c M src/drivers/i2c/max98927/max98927.c M src/drivers/i2c/nau8825/nau8825.c M src/drivers/i2c/nct7802y/nct7802y.c M src/drivers/i2c/pca9538/pca9538.c M src/drivers/i2c/pcf8523/pcf8523.c M src/drivers/i2c/ptn3460/ptn3460.c M src/drivers/i2c/rt1011/rt1011.c M src/drivers/i2c/rt5663/rt5663.c M src/drivers/i2c/rtd2132/rtd2132.c M src/drivers/i2c/rx6110sa/rx6110sa.c M src/drivers/i2c/sx9310/sx9310.c M src/drivers/i2c/tpm/chip.c M src/drivers/i2c/w83793/w83793.c M src/drivers/intel/ish/ish.c M src/drivers/intel/mipi_camera/camera.c M src/drivers/spi/acpi/acpi.c M src/drivers/usb/acpi/usb_acpi.c M src/ec/compal/ene932/ec.c M src/ec/google/chromeec/ec_lpc.c M src/ec/google/wilco/chip.c M src/ec/quanta/ene_kb3940q/ec.c M src/ec/quanta/it8518/ec.c M src/ec/roda/it8518/ec.c M src/include/device/device.h M src/mainboard/emulation/qemu-i440fx/northbridge.c M src/northbridge/amd/agesa/family14/northbridge.c M src/northbridge/amd/agesa/family15tn/northbridge.c M src/northbridge/amd/agesa/family16kb/northbridge.c M src/northbridge/amd/pi/00630F01/northbridge.c M src/northbridge/amd/pi/00660F01/northbridge.c M src/northbridge/amd/pi/00730F01/northbridge.c M src/northbridge/intel/e7505/northbridge.c M src/northbridge/intel/gm45/northbridge.c M src/northbridge/intel/haswell/northbridge.c M src/northbridge/intel/i440bx/northbridge.c M src/northbridge/intel/i945/northbridge.c M src/northbridge/intel/ironlake/northbridge.c M src/northbridge/intel/pineview/northbridge.c M src/northbridge/intel/sandybridge/northbridge.c M src/northbridge/intel/x4x/northbridge.c M src/soc/amd/common/block/smbus/sm.c M src/soc/amd/picasso/chip.c M src/soc/amd/picasso/i2c.c M src/soc/amd/stoneyridge/chip.c M src/soc/amd/stoneyridge/i2c.c M src/soc/cavium/cn81xx/soc.c M src/soc/intel/apollolake/chip.c M src/soc/intel/baytrail/chip.c M src/soc/intel/braswell/chip.c M src/soc/intel/broadwell/chip.c M src/soc/intel/cannonlake/chip.c M src/soc/intel/common/block/p2sb/p2sb.c M src/soc/intel/denverton_ns/chip.c M src/soc/intel/icelake/chip.c M src/soc/intel/jasperlake/chip.c M src/soc/intel/skylake/chip.c M src/soc/intel/tigerlake/chip.c M src/soc/intel/xeon_sp/cpx/chip.c M src/soc/intel/xeon_sp/skx/chip.c M src/soc/nvidia/tegra124/soc.c M src/soc/nvidia/tegra210/soc.c M src/soc/rockchip/rk3288/soc.c M src/soc/samsung/exynos5250/cpu.c M src/soc/samsung/exynos5420/cpu.c 80 files changed, 150 insertions(+), 150 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/07/40207/1
diff --git a/src/device/root_device.c b/src/device/root_device.c index 2ed4864..c79cbda 100644 --- a/src/device/root_device.c +++ b/src/device/root_device.c @@ -137,8 +137,8 @@ * of a motherboard can override this if you want non-default behavior. */ struct device_operations default_dev_ops_root = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .scan_bus = scan_static_bus, .reset_bus = root_dev_reset, #if CONFIG(HAVE_ACPI_TABLES) diff --git a/src/drivers/crb/tis.c b/src/drivers/crb/tis.c index 32d1550..9c6afa1 100644 --- a/src/drivers/crb/tis.c +++ b/src/drivers/crb/tis.c @@ -137,8 +137,8 @@ }
static struct device_operations __unused crb_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, #if CONFIG(HAVE_ACPI_TABLES) .acpi_name = crb_tpm_acpi_name, .acpi_fill_ssdt = crb_tpm_fill_ssdt, diff --git a/src/drivers/generic/adau7002/adau7002.c b/src/drivers/generic/adau7002/adau7002.c index 6a11c20..7076f4b 100644 --- a/src/drivers/generic/adau7002/adau7002.c +++ b/src/drivers/generic/adau7002/adau7002.c @@ -65,8 +65,8 @@ #endif
static struct device_operations adau7002_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, #if CONFIG(HAVE_ACPI_TABLES) .acpi_name = adau7002_acpi_name, .acpi_fill_ssdt = adau7002_fill_ssdt, diff --git a/src/drivers/generic/generic/generic.c b/src/drivers/generic/generic/generic.c index c3566d6..5897a15 100644 --- a/src/drivers/generic/generic/generic.c +++ b/src/drivers/generic/generic/generic.c @@ -78,8 +78,8 @@ }
static struct device_operations generic_dev_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .acpi_name = generic_dev_acpi_name, .acpi_fill_ssdt = generic_dev_fill_ssdt_generator, }; diff --git a/src/drivers/generic/gpio_keys/gpio_keys.c b/src/drivers/generic/gpio_keys/gpio_keys.c index e43c7fa..4f78047 100644 --- a/src/drivers/generic/gpio_keys/gpio_keys.c +++ b/src/drivers/generic/gpio_keys/gpio_keys.c @@ -112,8 +112,8 @@ }
static struct device_operations gpio_keys_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .acpi_name = gpio_keys_acpi_name, .acpi_fill_ssdt = gpio_keys_fill_ssdt_generator, }; diff --git a/src/drivers/generic/gpio_regulator/gpio_regulator.c b/src/drivers/generic/gpio_regulator/gpio_regulator.c index 331036c..5d1ed08 100644 --- a/src/drivers/generic/gpio_regulator/gpio_regulator.c +++ b/src/drivers/generic/gpio_regulator/gpio_regulator.c @@ -69,8 +69,8 @@ }
static struct device_operations gpio_regulator_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .acpi_name = gpio_regulator_acpi_name, .acpi_fill_ssdt = gpio_regulator_fill_ssdt_generator, }; diff --git a/src/drivers/generic/ioapic/ioapic.c b/src/drivers/generic/ioapic/ioapic.c index e48c119..c6905cf 100644 --- a/src/drivers/generic/ioapic/ioapic.c +++ b/src/drivers/generic/ioapic/ioapic.c @@ -105,7 +105,7 @@
static struct device_operations ioapic_operations = { .read_resources = ioapic_read_resources, - .set_resources = DEVICE_NOOP, + .set_resources = noop_set_resources, .init = ioapic_init, };
diff --git a/src/drivers/generic/max98357a/max98357a.c b/src/drivers/generic/max98357a/max98357a.c index 4c953ea..15792f7 100644 --- a/src/drivers/generic/max98357a/max98357a.c +++ b/src/drivers/generic/max98357a/max98357a.c @@ -80,8 +80,8 @@ #endif
static struct device_operations max98357a_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, #if CONFIG(HAVE_ACPI_TABLES) .acpi_name = max98357a_acpi_name, .acpi_fill_ssdt = max98357a_fill_ssdt, diff --git a/src/drivers/i2c/adt7463/adt7463.c b/src/drivers/i2c/adt7463/adt7463.c index 3e1a3a5..2fcd54e 100644 --- a/src/drivers/i2c/adt7463/adt7463.c +++ b/src/drivers/i2c/adt7463/adt7463.c @@ -78,8 +78,8 @@ }
static struct device_operations adt7463_operations = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = adt7463_init, };
diff --git a/src/drivers/i2c/at24rf08c/at24rf08c.c b/src/drivers/i2c/at24rf08c/at24rf08c.c index b5bcec9..f13d60f 100644 --- a/src/drivers/i2c/at24rf08c/at24rf08c.c +++ b/src/drivers/i2c/at24rf08c/at24rf08c.c @@ -43,8 +43,8 @@ }
static struct device_operations at24rf08c_operations = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = at24rf08c_init, };
diff --git a/src/drivers/i2c/ck505/ck505.c b/src/drivers/i2c/ck505/ck505.c index 69ba72b..9b5e677 100644 --- a/src/drivers/i2c/ck505/ck505.c +++ b/src/drivers/i2c/ck505/ck505.c @@ -57,8 +57,8 @@ }
static struct device_operations ck505_operations = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = ck505_init, };
diff --git a/src/drivers/i2c/da7219/da7219.c b/src/drivers/i2c/da7219/da7219.c index 72378c9..fe9be78 100644 --- a/src/drivers/i2c/da7219/da7219.c +++ b/src/drivers/i2c/da7219/da7219.c @@ -108,8 +108,8 @@ #endif
static struct device_operations da7219_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, #if CONFIG(HAVE_ACPI_TABLES) .acpi_name = da7219_acpi_name, .acpi_fill_ssdt = da7219_fill_ssdt, diff --git a/src/drivers/i2c/generic/generic.c b/src/drivers/i2c/generic/generic.c index 9c6dfb6..9a3587a 100644 --- a/src/drivers/i2c/generic/generic.c +++ b/src/drivers/i2c/generic/generic.c @@ -190,8 +190,8 @@ #endif
static struct device_operations i2c_generic_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, #if CONFIG(HAVE_ACPI_TABLES) .acpi_name = i2c_generic_acpi_name, .acpi_fill_ssdt = i2c_generic_fill_ssdt_generator, diff --git a/src/drivers/i2c/hid/hid.c b/src/drivers/i2c/hid/hid.c index a17d6d4..8e3f761 100644 --- a/src/drivers/i2c/hid/hid.c +++ b/src/drivers/i2c/hid/hid.c @@ -47,8 +47,8 @@ #endif
static struct device_operations i2c_hid_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, #if CONFIG(HAVE_ACPI_TABLES) .acpi_name = i2c_hid_acpi_name, .acpi_fill_ssdt = i2c_hid_fill_ssdt_generator, diff --git a/src/drivers/i2c/lm96000/lm96000.c b/src/drivers/i2c/lm96000/lm96000.c index b0bc300..a74d8f4 100644 --- a/src/drivers/i2c/lm96000/lm96000.c +++ b/src/drivers/i2c/lm96000/lm96000.c @@ -215,8 +215,8 @@ }
static struct device_operations lm96000_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = lm96000_init, };
diff --git a/src/drivers/i2c/max98373/max98373.c b/src/drivers/i2c/max98373/max98373.c index ed3cd3f..e35510a 100644 --- a/src/drivers/i2c/max98373/max98373.c +++ b/src/drivers/i2c/max98373/max98373.c @@ -85,8 +85,8 @@ }
static struct device_operations max98373_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .acpi_name = max98373_acpi_name, .acpi_fill_ssdt = max98373_fill_ssdt, }; diff --git a/src/drivers/i2c/max98927/max98927.c b/src/drivers/i2c/max98927/max98927.c index 8ad4f56..1cc5553 100644 --- a/src/drivers/i2c/max98927/max98927.c +++ b/src/drivers/i2c/max98927/max98927.c @@ -81,8 +81,8 @@ }
static struct device_operations max98927_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .acpi_name = max98927_acpi_name, .acpi_fill_ssdt = max98927_fill_ssdt, }; diff --git a/src/drivers/i2c/nau8825/nau8825.c b/src/drivers/i2c/nau8825/nau8825.c index 5f5bfce..acba096 100644 --- a/src/drivers/i2c/nau8825/nau8825.c +++ b/src/drivers/i2c/nau8825/nau8825.c @@ -96,8 +96,8 @@ #endif
static struct device_operations nau8825_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, #if CONFIG(HAVE_ACPI_TABLES) .acpi_name = nau8825_acpi_name, .acpi_fill_ssdt = nau8825_fill_ssdt, diff --git a/src/drivers/i2c/nct7802y/nct7802y.c b/src/drivers/i2c/nct7802y/nct7802y.c index 9e2ab5c..ba81229 100644 --- a/src/drivers/i2c/nct7802y/nct7802y.c +++ b/src/drivers/i2c/nct7802y/nct7802y.c @@ -30,8 +30,8 @@ }
static struct device_operations nct7802y_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = nct7802y_init, };
diff --git a/src/drivers/i2c/pca9538/pca9538.c b/src/drivers/i2c/pca9538/pca9538.c index 0bfd077..e2378fa 100644 --- a/src/drivers/i2c/pca9538/pca9538.c +++ b/src/drivers/i2c/pca9538/pca9538.c @@ -49,8 +49,8 @@ }
static struct device_operations pca9538_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = pca9538_init, };
diff --git a/src/drivers/i2c/pcf8523/pcf8523.c b/src/drivers/i2c/pcf8523/pcf8523.c index b1cee25..93f29f3 100644 --- a/src/drivers/i2c/pcf8523/pcf8523.c +++ b/src/drivers/i2c/pcf8523/pcf8523.c @@ -128,8 +128,8 @@ }
static struct device_operations pcf8523c_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = pcf8523_init, .final = pcf8523_final }; diff --git a/src/drivers/i2c/ptn3460/ptn3460.c b/src/drivers/i2c/ptn3460/ptn3460.c index 1a9463b..f08e63c 100644 --- a/src/drivers/i2c/ptn3460/ptn3460.c +++ b/src/drivers/i2c/ptn3460/ptn3460.c @@ -138,8 +138,8 @@ }
static struct device_operations ptn3460_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = ptn3460_init, };
diff --git a/src/drivers/i2c/rt1011/rt1011.c b/src/drivers/i2c/rt1011/rt1011.c index 3225d8f..61d55a8 100644 --- a/src/drivers/i2c/rt1011/rt1011.c +++ b/src/drivers/i2c/rt1011/rt1011.c @@ -95,8 +95,8 @@ }
static struct device_operations rt1011_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .acpi_name = rt1011_acpi_name, .acpi_fill_ssdt = rt1011_fill_ssdt, }; diff --git a/src/drivers/i2c/rt5663/rt5663.c b/src/drivers/i2c/rt5663/rt5663.c index 69f3bf7..df811cc 100644 --- a/src/drivers/i2c/rt5663/rt5663.c +++ b/src/drivers/i2c/rt5663/rt5663.c @@ -85,8 +85,8 @@ }
static struct device_operations rt5663_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .acpi_name = rt5663_acpi_name, .acpi_fill_ssdt = rt5663_fill_ssdt, }; diff --git a/src/drivers/i2c/rtd2132/rtd2132.c b/src/drivers/i2c/rtd2132/rtd2132.c index 4ae3a51..2682672 100644 --- a/src/drivers/i2c/rtd2132/rtd2132.c +++ b/src/drivers/i2c/rtd2132/rtd2132.c @@ -235,8 +235,8 @@ }
static struct device_operations rtd2132_operations = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = rtd2132_init, };
diff --git a/src/drivers/i2c/rx6110sa/rx6110sa.c b/src/drivers/i2c/rx6110sa/rx6110sa.c index 79dadd3..84ed1cb 100644 --- a/src/drivers/i2c/rx6110sa/rx6110sa.c +++ b/src/drivers/i2c/rx6110sa/rx6110sa.c @@ -175,8 +175,8 @@ }
static struct device_operations rx6110sa_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = rx6110sa_init, .final = rx6110sa_final }; diff --git a/src/drivers/i2c/sx9310/sx9310.c b/src/drivers/i2c/sx9310/sx9310.c index 992604b..47e8924 100644 --- a/src/drivers/i2c/sx9310/sx9310.c +++ b/src/drivers/i2c/sx9310/sx9310.c @@ -89,8 +89,8 @@ }
static struct device_operations i2c_sx9310_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .acpi_name = i2c_sx9310_acpi_name, .acpi_fill_ssdt = i2c_sx9310_fill_ssdt, }; diff --git a/src/drivers/i2c/tpm/chip.c b/src/drivers/i2c/tpm/chip.c index 811104d..b38c446 100644 --- a/src/drivers/i2c/tpm/chip.c +++ b/src/drivers/i2c/tpm/chip.c @@ -72,8 +72,8 @@ }
static struct device_operations i2c_tpm_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .acpi_name = i2c_tpm_acpi_name, .acpi_fill_ssdt = i2c_tpm_fill_ssdt, }; diff --git a/src/drivers/i2c/w83793/w83793.c b/src/drivers/i2c/w83793/w83793.c index 4a11139..0ae8e34 100644 --- a/src/drivers/i2c/w83793/w83793.c +++ b/src/drivers/i2c/w83793/w83793.c @@ -302,8 +302,8 @@ }
static struct device_operations w83793_operations = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = w83793_init, };
diff --git a/src/drivers/intel/ish/ish.c b/src/drivers/intel/ish/ish.c index 822259d..d295078 100644 --- a/src/drivers/intel/ish/ish.c +++ b/src/drivers/intel/ish/ish.c @@ -40,8 +40,8 @@ }
static struct device_operations intel_ish_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .acpi_fill_ssdt = ish_fill_ssdt_generator, };
diff --git a/src/drivers/intel/mipi_camera/camera.c b/src/drivers/intel/mipi_camera/camera.c index 9871618..010b71c 100644 --- a/src/drivers/intel/mipi_camera/camera.c +++ b/src/drivers/intel/mipi_camera/camera.c @@ -78,8 +78,8 @@ }
static struct device_operations camera_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .acpi_name = camera_acpi_name, .acpi_fill_ssdt = camera_fill_ssdt, }; diff --git a/src/drivers/spi/acpi/acpi.c b/src/drivers/spi/acpi/acpi.c index be7dc47..91e4d89 100644 --- a/src/drivers/spi/acpi/acpi.c +++ b/src/drivers/spi/acpi/acpi.c @@ -200,8 +200,8 @@ }
static struct device_operations spi_acpi_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .acpi_name = spi_acpi_name, .acpi_fill_ssdt = spi_acpi_fill_ssdt_generator, }; diff --git a/src/drivers/usb/acpi/usb_acpi.c b/src/drivers/usb/acpi/usb_acpi.c index 5d39f7b..d4f6d9c 100644 --- a/src/drivers/usb/acpi/usb_acpi.c +++ b/src/drivers/usb/acpi/usb_acpi.c @@ -80,8 +80,8 @@ }
static struct device_operations usb_acpi_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .scan_bus = scan_static_bus, .acpi_fill_ssdt = usb_acpi_fill_ssdt_generator, }; diff --git a/src/ec/compal/ene932/ec.c b/src/ec/compal/ene932/ec.c index 7a0cf05..15751df 100644 --- a/src/ec/compal/ene932/ec.c +++ b/src/ec/compal/ene932/ec.c @@ -134,7 +134,7 @@
static struct device_operations ops = { .init = ene932_init, - .read_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, };
static struct pnp_info pnp_dev_info[] = { diff --git a/src/ec/google/chromeec/ec_lpc.c b/src/ec/google/chromeec/ec_lpc.c index 8507cc1..ee220ac 100644 --- a/src/ec/google/chromeec/ec_lpc.c +++ b/src/ec/google/chromeec/ec_lpc.c @@ -449,7 +449,7 @@ static struct device_operations ops = { .init = lpc_ec_init, .read_resources = lpc_ec_read_resources, - .set_resources = DEVICE_NOOP, + .set_resources = noop_set_resources, #if CONFIG(HAVE_ACPI_TABLES) .acpi_name = google_chromeec_acpi_name, .acpi_fill_ssdt = google_chromeec_fill_ssdt_generator, diff --git a/src/ec/google/wilco/chip.c b/src/ec/google/wilco/chip.c index d93186b..128110d 100644 --- a/src/ec/google/wilco/chip.c +++ b/src/ec/google/wilco/chip.c @@ -230,7 +230,7 @@ static struct device_operations ops = { .init = wilco_ec_init, .read_resources = wilco_ec_read_resources, - .set_resources = DEVICE_NOOP, + .set_resources = noop_set_resources, .acpi_fill_ssdt = wilco_ec_fill_ssdt_generator, .acpi_name = wilco_ec_acpi_name, }; diff --git a/src/ec/quanta/ene_kb3940q/ec.c b/src/ec/quanta/ene_kb3940q/ec.c index 77891ec..4e8bde1 100644 --- a/src/ec/quanta/ene_kb3940q/ec.c +++ b/src/ec/quanta/ene_kb3940q/ec.c @@ -144,7 +144,7 @@
static struct device_operations ops = { .init = ene_kb3940q_init, - .read_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, };
static struct pnp_info pnp_dev_info[] = { diff --git a/src/ec/quanta/it8518/ec.c b/src/ec/quanta/it8518/ec.c index a49d39e..ccf2d45 100644 --- a/src/ec/quanta/it8518/ec.c +++ b/src/ec/quanta/it8518/ec.c @@ -158,7 +158,7 @@
static struct device_operations ops = { .init = it8518_init, - .read_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, };
static struct pnp_info pnp_dev_info[] = { diff --git a/src/ec/roda/it8518/ec.c b/src/ec/roda/it8518/ec.c index de90bfa..b529e76 100644 --- a/src/ec/roda/it8518/ec.c +++ b/src/ec/roda/it8518/ec.c @@ -46,7 +46,7 @@
static struct device_operations ops = { .init = it8518_init, - .read_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, };
static struct pnp_info pnp_dev_info[] = { diff --git a/src/include/device/device.h b/src/include/device/device.h index 9ba4d31..4e9c594 100644 --- a/src/include/device/device.h +++ b/src/include/device/device.h @@ -66,8 +66,8 @@ /** * Standard device operations function pointers shims. */ -static inline void device_noop(struct device *dev) {} -#define DEVICE_NOOP device_noop +static inline void noop_read_resources(struct device *dev) {} +static inline void noop_set_resources(struct device *dev) {}
struct bus {
diff --git a/src/mainboard/emulation/qemu-i440fx/northbridge.c b/src/mainboard/emulation/qemu-i440fx/northbridge.c index 27fecf6..9ad57ab 100644 --- a/src/mainboard/emulation/qemu-i440fx/northbridge.c +++ b/src/mainboard/emulation/qemu-i440fx/northbridge.c @@ -283,8 +283,8 @@ }
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = cpu_bus_init, .scan_bus = cpu_bus_scan, }; diff --git a/src/northbridge/amd/agesa/family14/northbridge.c b/src/northbridge/amd/agesa/family14/northbridge.c index 918cec4..d0b2a5b 100644 --- a/src/northbridge/amd/agesa/family14/northbridge.c +++ b/src/northbridge/amd/agesa/family14/northbridge.c @@ -834,8 +834,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = cpu_bus_init, .scan_bus = cpu_bus_scan, }; diff --git a/src/northbridge/amd/agesa/family15tn/northbridge.c b/src/northbridge/amd/agesa/family15tn/northbridge.c index 6dc195a..04f468c 100644 --- a/src/northbridge/amd/agesa/family15tn/northbridge.c +++ b/src/northbridge/amd/agesa/family15tn/northbridge.c @@ -903,8 +903,8 @@ }
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = cpu_bus_init, .scan_bus = cpu_bus_scan, }; diff --git a/src/northbridge/amd/agesa/family16kb/northbridge.c b/src/northbridge/amd/agesa/family16kb/northbridge.c index 3c251f0..5ba6fb0 100644 --- a/src/northbridge/amd/agesa/family16kb/northbridge.c +++ b/src/northbridge/amd/agesa/family16kb/northbridge.c @@ -930,8 +930,8 @@ }
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = cpu_bus_init, .scan_bus = cpu_bus_scan, }; diff --git a/src/northbridge/amd/pi/00630F01/northbridge.c b/src/northbridge/amd/pi/00630F01/northbridge.c index fa48d55..24a9f81 100644 --- a/src/northbridge/amd/pi/00630F01/northbridge.c +++ b/src/northbridge/amd/pi/00630F01/northbridge.c @@ -905,8 +905,8 @@ }
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = cpu_bus_init, .scan_bus = cpu_bus_scan, }; diff --git a/src/northbridge/amd/pi/00660F01/northbridge.c b/src/northbridge/amd/pi/00660F01/northbridge.c index 78c4627..5d88a83 100644 --- a/src/northbridge/amd/pi/00660F01/northbridge.c +++ b/src/northbridge/amd/pi/00660F01/northbridge.c @@ -913,8 +913,8 @@ }
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = cpu_bus_init, .scan_bus = cpu_bus_scan, }; diff --git a/src/northbridge/amd/pi/00730F01/northbridge.c b/src/northbridge/amd/pi/00730F01/northbridge.c index aa7289f..4ea1dda 100644 --- a/src/northbridge/amd/pi/00730F01/northbridge.c +++ b/src/northbridge/amd/pi/00730F01/northbridge.c @@ -1181,8 +1181,8 @@ }
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = cpu_bus_init, .scan_bus = cpu_bus_scan, }; diff --git a/src/northbridge/intel/e7505/northbridge.c b/src/northbridge/intel/e7505/northbridge.c index 6c06185..239d303 100644 --- a/src/northbridge/intel/e7505/northbridge.c +++ b/src/northbridge/intel/e7505/northbridge.c @@ -90,8 +90,8 @@ }
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = cpu_bus_init, };
diff --git a/src/northbridge/intel/gm45/northbridge.c b/src/northbridge/intel/gm45/northbridge.c index a410ec6..9f17f0d 100644 --- a/src/northbridge/intel/gm45/northbridge.c +++ b/src/northbridge/intel/gm45/northbridge.c @@ -237,8 +237,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = mp_cpu_bus_init, };
diff --git a/src/northbridge/intel/haswell/northbridge.c b/src/northbridge/intel/haswell/northbridge.c index 6fb0250..49fbd96 100644 --- a/src/northbridge/intel/haswell/northbridge.c +++ b/src/northbridge/intel/haswell/northbridge.c @@ -493,8 +493,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = mp_cpu_bus_init, };
diff --git a/src/northbridge/intel/i440bx/northbridge.c b/src/northbridge/intel/i440bx/northbridge.c index 1420ae2..07e7f2f 100644 --- a/src/northbridge/intel/i440bx/northbridge.c +++ b/src/northbridge/intel/i440bx/northbridge.c @@ -89,8 +89,8 @@ }
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = cpu_bus_init, };
diff --git a/src/northbridge/intel/i945/northbridge.c b/src/northbridge/intel/i945/northbridge.c index 2d2af48..ac9325b 100644 --- a/src/northbridge/intel/i945/northbridge.c +++ b/src/northbridge/intel/i945/northbridge.c @@ -209,8 +209,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = mp_cpu_bus_init, };
diff --git a/src/northbridge/intel/ironlake/northbridge.c b/src/northbridge/intel/ironlake/northbridge.c index 2733f51..f742012 100644 --- a/src/northbridge/intel/ironlake/northbridge.c +++ b/src/northbridge/intel/ironlake/northbridge.c @@ -264,8 +264,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = mp_cpu_bus_init, };
diff --git a/src/northbridge/intel/pineview/northbridge.c b/src/northbridge/intel/pineview/northbridge.c index f29c2ea..183a48e 100644 --- a/src/northbridge/intel/pineview/northbridge.c +++ b/src/northbridge/intel/pineview/northbridge.c @@ -193,8 +193,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = mp_cpu_bus_init, };
diff --git a/src/northbridge/intel/sandybridge/northbridge.c b/src/northbridge/intel/sandybridge/northbridge.c index ff42369..ea2a737 100644 --- a/src/northbridge/intel/sandybridge/northbridge.c +++ b/src/northbridge/intel/sandybridge/northbridge.c @@ -459,8 +459,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = mp_cpu_bus_init, };
diff --git a/src/northbridge/intel/x4x/northbridge.c b/src/northbridge/intel/x4x/northbridge.c index 0c458fb..7cfb5bd 100644 --- a/src/northbridge/intel/x4x/northbridge.c +++ b/src/northbridge/intel/x4x/northbridge.c @@ -188,8 +188,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = mp_cpu_bus_init, };
diff --git a/src/soc/amd/common/block/smbus/sm.c b/src/soc/amd/common/block/smbus/sm.c index e118cb8..df411f8 100644 --- a/src/soc/amd/common/block/smbus/sm.c +++ b/src/soc/amd/common/block/smbus/sm.c @@ -86,8 +86,8 @@ .set_subsystem = pci_dev_set_subsystem, }; static struct device_operations smbus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .enable_resources = pci_dev_enable_resources, .init = sm_init, .scan_bus = scan_smbus, diff --git a/src/soc/amd/picasso/chip.c b/src/soc/amd/picasso/chip.c index 4f693b3..9a7b109 100644 --- a/src/soc/amd/picasso/chip.c +++ b/src/soc/amd/picasso/chip.c @@ -30,8 +30,8 @@ extern const char *i2c_acpi_name(const struct device *dev);
struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = picasso_init_cpus, .acpi_fill_ssdt = generate_cpu_entries, }; diff --git a/src/soc/amd/picasso/i2c.c b/src/soc/amd/picasso/i2c.c index e411ce7..5446ff0 100644 --- a/src/soc/amd/picasso/i2c.c +++ b/src/soc/amd/picasso/i2c.c @@ -139,8 +139,8 @@
struct device_operations picasso_i2c_mmio_ops = { /* TODO(teravest): Move I2C resource info here. */ - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .scan_bus = scan_smbus, .acpi_name = i2c_acpi_name, .acpi_fill_ssdt = dw_i2c_acpi_fill_ssdt, diff --git a/src/soc/amd/stoneyridge/chip.c b/src/soc/amd/stoneyridge/chip.c index 69c3aec..ab3701a 100644 --- a/src/soc/amd/stoneyridge/chip.c +++ b/src/soc/amd/stoneyridge/chip.c @@ -35,8 +35,8 @@ extern const char *i2c_acpi_name(const struct device *dev);
struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = stoney_init_cpus, .acpi_fill_ssdt = generate_cpu_entries, }; diff --git a/src/soc/amd/stoneyridge/i2c.c b/src/soc/amd/stoneyridge/i2c.c index 3badc0d..3c3dbe9 100644 --- a/src/soc/amd/stoneyridge/i2c.c +++ b/src/soc/amd/stoneyridge/i2c.c @@ -136,8 +136,8 @@
struct device_operations stoneyridge_i2c_mmio_ops = { /* TODO(teravest): Move I2C resource info here. */ - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .scan_bus = scan_smbus, .acpi_name = i2c_acpi_name, .acpi_fill_ssdt = dw_i2c_acpi_fill_ssdt, diff --git a/src/soc/cavium/cn81xx/soc.c b/src/soc/cavium/cn81xx/soc.c index 2e22558..1343fca 100644 --- a/src/soc/cavium/cn81xx/soc.c +++ b/src/soc/cavium/cn81xx/soc.c @@ -390,7 +390,7 @@
static struct device_operations soc_ops = { .read_resources = soc_read_resources, - .set_resources = DEVICE_NOOP, + .set_resources = noop_set_resources, .init = soc_init, .final = soc_final, }; diff --git a/src/soc/intel/apollolake/chip.c b/src/soc/intel/apollolake/chip.c index cf4763d..1075642 100644 --- a/src/soc/intel/apollolake/chip.c +++ b/src/soc/intel/apollolake/chip.c @@ -219,8 +219,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = apollolake_init_cpus, .acpi_fill_ssdt = generate_cpu_entries, }; diff --git a/src/soc/intel/baytrail/chip.c b/src/soc/intel/baytrail/chip.c index 2b5d6f3..66b91a9 100644 --- a/src/soc/intel/baytrail/chip.c +++ b/src/soc/intel/baytrail/chip.c @@ -32,8 +32,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = baytrail_init_cpus, };
diff --git a/src/soc/intel/braswell/chip.c b/src/soc/intel/braswell/chip.c index eea8785..5002c62 100644 --- a/src/soc/intel/braswell/chip.c +++ b/src/soc/intel/braswell/chip.c @@ -35,8 +35,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = soc_init_cpus };
diff --git a/src/soc/intel/broadwell/chip.c b/src/soc/intel/broadwell/chip.c index eded94d..7f45258 100644 --- a/src/soc/intel/broadwell/chip.c +++ b/src/soc/intel/broadwell/chip.c @@ -34,8 +34,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = &broadwell_init_cpus, };
diff --git a/src/soc/intel/cannonlake/chip.c b/src/soc/intel/cannonlake/chip.c index 903e80e..30fa68d 100644 --- a/src/soc/intel/cannonlake/chip.c +++ b/src/soc/intel/cannonlake/chip.c @@ -195,8 +195,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .acpi_fill_ssdt = generate_cpu_entries, };
diff --git a/src/soc/intel/common/block/p2sb/p2sb.c b/src/soc/intel/common/block/p2sb/p2sb.c index 5bf1963..497053d 100644 --- a/src/soc/intel/common/block/p2sb/p2sb.c +++ b/src/soc/intel/common/block/p2sb/p2sb.c @@ -135,7 +135,7 @@
static const struct device_operations device_ops = { .read_resources = read_resources, - .set_resources = DEVICE_NOOP, + .set_resources = noop_set_resources, .ops_pci = &pci_dev_ops_pci, };
diff --git a/src/soc/intel/denverton_ns/chip.c b/src/soc/intel/denverton_ns/chip.c index dbee297..fbe2b82 100644 --- a/src/soc/intel/denverton_ns/chip.c +++ b/src/soc/intel/denverton_ns/chip.c @@ -42,8 +42,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = denverton_init_cpus, #if CONFIG(HAVE_ACPI_TABLES) .acpi_fill_ssdt = generate_cpu_entries, diff --git a/src/soc/intel/icelake/chip.c b/src/soc/intel/icelake/chip.c index acbf2e0..9e83b36 100644 --- a/src/soc/intel/icelake/chip.c +++ b/src/soc/intel/icelake/chip.c @@ -151,8 +151,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .acpi_fill_ssdt = generate_cpu_entries, };
diff --git a/src/soc/intel/jasperlake/chip.c b/src/soc/intel/jasperlake/chip.c index 57cb87f..901d135 100644 --- a/src/soc/intel/jasperlake/chip.c +++ b/src/soc/intel/jasperlake/chip.c @@ -158,8 +158,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, #if CONFIG(HAVE_ACPI_TABLES) .acpi_fill_ssdt = generate_cpu_entries, #endif diff --git a/src/soc/intel/skylake/chip.c b/src/soc/intel/skylake/chip.c index f05453f..971522d 100644 --- a/src/soc/intel/skylake/chip.c +++ b/src/soc/intel/skylake/chip.c @@ -106,8 +106,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, #if CONFIG(HAVE_ACPI_TABLES) .acpi_fill_ssdt = generate_cpu_entries, #endif diff --git a/src/soc/intel/tigerlake/chip.c b/src/soc/intel/tigerlake/chip.c index be4d88e..ab65f85 100644 --- a/src/soc/intel/tigerlake/chip.c +++ b/src/soc/intel/tigerlake/chip.c @@ -158,8 +158,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, #if CONFIG(HAVE_ACPI_TABLES) .acpi_fill_ssdt = generate_cpu_entries, #endif diff --git a/src/soc/intel/xeon_sp/cpx/chip.c b/src/soc/intel/xeon_sp/cpx/chip.c index 5f1dedf..196f3df 100644 --- a/src/soc/intel/xeon_sp/cpx/chip.c +++ b/src/soc/intel/xeon_sp/cpx/chip.c @@ -31,8 +31,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = cpx_init_cpus, };
diff --git a/src/soc/intel/xeon_sp/skx/chip.c b/src/soc/intel/xeon_sp/skx/chip.c index fbd13d5..be452a0 100644 --- a/src/soc/intel/xeon_sp/skx/chip.c +++ b/src/soc/intel/xeon_sp/skx/chip.c @@ -482,8 +482,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = xeon_sp_init_cpus, #if CONFIG(HAVE_ACPI_TABLES) /* defined in src/soc/intel/common/block/acpi/acpi.c */ diff --git a/src/soc/nvidia/tegra124/soc.c b/src/soc/nvidia/tegra124/soc.c index d291af8..571d804 100644 --- a/src/soc/nvidia/tegra124/soc.c +++ b/src/soc/nvidia/tegra124/soc.c @@ -53,8 +53,8 @@ }
static struct device_operations soc_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .enable_resources = soc_enable, .init = soc_init, }; diff --git a/src/soc/nvidia/tegra210/soc.c b/src/soc/nvidia/tegra210/soc.c index 46dcaa0..d0cd8d3 100644 --- a/src/soc/nvidia/tegra210/soc.c +++ b/src/soc/nvidia/tegra210/soc.c @@ -62,7 +62,7 @@
static struct device_operations soc_ops = { .read_resources = soc_read_resources, - .set_resources = DEVICE_NOOP, + .set_resources = noop_set_resources, };
static void enable_tegra210_dev(struct device *dev) diff --git a/src/soc/rockchip/rk3288/soc.c b/src/soc/rockchip/rk3288/soc.c index 84fa691..363f98f 100644 --- a/src/soc/rockchip/rk3288/soc.c +++ b/src/soc/rockchip/rk3288/soc.c @@ -35,8 +35,8 @@ }
static struct device_operations soc_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = soc_init, };
diff --git a/src/soc/samsung/exynos5250/cpu.c b/src/soc/samsung/exynos5250/cpu.c index 989af59..4da9b95 100644 --- a/src/soc/samsung/exynos5250/cpu.c +++ b/src/soc/samsung/exynos5250/cpu.c @@ -123,8 +123,8 @@ }
static struct device_operations cpu_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .enable_resources = cpu_enable, .init = cpu_init, }; diff --git a/src/soc/samsung/exynos5420/cpu.c b/src/soc/samsung/exynos5420/cpu.c index cc6b048..9d15ea8 100644 --- a/src/soc/samsung/exynos5420/cpu.c +++ b/src/soc/samsung/exynos5420/cpu.c @@ -153,8 +153,8 @@ }
static struct device_operations cpu_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .enable_resources = cpu_enable, .init = cpu_init, };
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40207 )
Change subject: Replace DEVICE_NOOP with noop_(set|read)_resources ......................................................................
Patch Set 1: Code-Review+1
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40207 )
Change subject: Replace DEVICE_NOOP with noop_(set|read)_resources ......................................................................
Patch Set 1: Code-Review+1
I believe that using uppercase macros would highlight the special status of these ops
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40207 )
Change subject: Replace DEVICE_NOOP with noop_(set|read)_resources ......................................................................
Patch Set 1:
Patch Set 1: Code-Review+1
I believe that using uppercase macros would highlight the special status of these ops
Yes, I am less keen on this change because that is precisely why I used an uppercased macro. It is very easy and obvious to parse by eye or grep for, you certainly can't miss it. What are we actually fixing here, just style?
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40207 )
Change subject: Replace DEVICE_NOOP with noop_(set|read)_resources ......................................................................
Patch Set 1: Code-Review-1
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40207 )
Change subject: Replace DEVICE_NOOP with noop_(set|read)_resources ......................................................................
Patch Set 1:
I believe that using uppercase macros would highlight the special status of these ops
But why highlight a special status that we don't understand? I know I probably should just push a patch that removes the whole topic (error printing for these particular two function pointers). But I know it's even less likely to find somebody who would feel confident enough to give a +2. Hence, taking baby steps here.
Yes, I am less keen on this change because that is precisely why I used an uppercased macro.
Ack. Please clear this up for us, why should these no-op pointers stick out? And what is the intended effect when they stick out?
In my experience, people see such MACRO_NAMES as boilerplate, something to copy-paste without thinking.
It is very easy and obvious to parse by eye or grep for, you certainly can't miss it.
Yes, obviously. But missing that there _is_ a no-op pointer is not a problem. Problems arise when we miss to set any pointer at all, and that is hard to see. Absence of upper-case looks the same as absence of lower case.
What are we actually fixing here, just style?
See commit message.
Angel Pons has removed a vote from this change. ( https://review.coreboot.org/c/coreboot/+/40207 )
Change subject: Replace DEVICE_NOOP with noop_(set|read)_resources ......................................................................
Removed Code-Review+1 by Angel Pons th3fanbus@gmail.com
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40207 )
Change subject: Replace DEVICE_NOOP with noop_(set|read)_resources ......................................................................
Patch Set 1:
Patch Set 1:
I believe that using uppercase macros would highlight the special status of these ops
But why highlight a special status that we don't understand? I know I probably should just push a patch that removes the whole topic (error printing for these particular two function pointers). But I know it's
It is hard to determine what your intent is without the complete story. So what you wish to do with these two inlines is to print errors in them and hence the two different symbol names so __func__ lets the error str know who dispatched. Am I understanding you correctly? That would change my view from the original without that extra context.
even less likely to find somebody who would feel confident enough to give a +2. Hence, taking baby steps here.
This sounds a bit ad hominem Nico, I am more than willing to +2 your patches as they are usually extremely well thought out, I am sure you know this! The only reason I didn't +2 the prior patch to this was because Angel just has a few unresolved comments otherwise that one looks good.
Yes, I am less keen on this change because that is precisely why I used an uppercased macro.
Ack. Please clear this up for us, why should these no-op pointers stick out? And what is the intended effect when they stick out?
In my experience, people see such MACRO_NAMES as boilerplate, something to copy-paste without thinking.
Yes, I agree coreboot does suffer from that infliction :/ However I guess that point can slip either way across the spectrum of style and thought process.
It is very easy and obvious to parse by eye or grep for, you certainly can't miss it.
Yes, obviously. But missing that there _is_ a no-op pointer is not a problem. Problems arise when we miss to set any pointer at all, and that is hard to see. Absence of upper-case looks the same as absence of lower case.
Should then the dispatch logic be checking this and not relying on anything particular struct members being packed (ones that print certain things)? That seems like a better solution and more inline with what your thoughts were above.
What are we actually fixing here, just style?
See commit message.
ACK
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40207 )
Change subject: Replace DEVICE_NOOP with noop_(set|read)_resources ......................................................................
Patch Set 1:
I believe that using uppercase macros would highlight the special status of these ops
But why highlight a special status that we don't understand? I know I probably should just push a patch that removes the whole topic (error printing for these particular two function pointers). But I know it's
It is hard to determine what your intent is without the complete story. So what you wish to do with these two inlines is to print errors in them and hence the two different symbol names so __func__ lets the error str know who dispatched. Am I understanding you correctly?
No, absolutely not. `device.c` prints error messages for missing `.read_resources` and `.set_resources`. It makes some sense for PCI devices, for instance, but not always. Hence there are no-op implementations to avoid the error messages. That's AFAICT the one and only reason for the no-ops.
The idea to have individual names was to bring some explicitness back that was lost with the introduction of DEVICE_NOOP: When somebody uses noop_read_resources() that means they decided not to implement `.read_resources`. And it wouldn't spread to other fields anymore, e.g. a `.init = noop_read_resources` should smell weird even for a lazy author/reviewer.
I should have been clearer about that in the commit message (just didn't expect to document coreboot history for a cosmetic change).
even less likely to find somebody who would feel confident enough to give a +2. Hence, taking baby steps here.
This sounds a bit ad hominem Nico,
That was not my intention. Sorry if I gave you the impression. I meant it literally, there are very few people left who feel confi- dent about changes in `device/device.c`. The code is very old, barely documented by commit messages. It's especially hard to decide about cosmetic changes when one doesn't know the intentions of the original authors. So I avoided changes there because I have little time to waste. Actually, I've already wasted too much on this change, so this comment will be my last action on it (if somebody feels like it, they can take over, otherwise I will abandon it after a while).
HAOUAS Elyes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40207 )
Change subject: Replace DEVICE_NOOP with noop_(set|read)_resources ......................................................................
Patch Set 1: Code-Review+2
we already have 'pci_dev_set_resources', 'pci_dev_read_resources' .... so 'noop{read,set} sounds ok for me.
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40207 )
Change subject: Replace DEVICE_NOOP with noop_(set|read)_resources ......................................................................
Patch Set 1: Code-Review+2
Patch Set 1:
I believe that using uppercase macros would highlight the special status of these ops
But why highlight a special status that we don't understand? I know I probably should just push a patch that removes the whole topic (error printing for these particular two function pointers). But I know it's
It is hard to determine what your intent is without the complete story. So what you wish to do with these two inlines is to print errors in them and hence the two different symbol names so __func__ lets the error str know who dispatched. Am I understanding you correctly?
No, absolutely not. `device.c` prints error messages for missing `.read_resources` and `.set_resources`. It makes some sense for PCI devices, for instance, but not always. Hence there are no-op implementations to avoid the error messages. That's AFAICT the one and only reason for the no-ops.
The idea to have individual names was to bring some explicitness back that was lost with the introduction of DEVICE_NOOP: When somebody uses noop_read_resources() that means they decided not to implement `.read_resources`. And it wouldn't spread to other fields anymore, e.g. a `.init = noop_read_resources` should smell weird even for a lazy author/reviewer.
I should have been clearer about that in the commit message (just didn't expect to document coreboot history for a cosmetic change).
gotcha Nico, thanks for taking the time to explain I appreciate it. gotcha Nico, thanks for taking the time to explain I appreciate it. As you noted below, code in `device/device.c` is barely documented in commit messages so adding more commits without intent in their messages continues that trend. As you highlighted above, the code is indeed old thus my questions.
even less likely to find somebody who would feel confident enough to give a +2. Hence, taking baby steps here.
This sounds a bit ad hominem Nico,
That was not my intention. Sorry if I gave you the impression. I meant it literally, there are very few people left who feel confi- dent about changes in `device/device.c`. The code is very old, barely documented by commit messages. It's especially hard to decide about cosmetic changes when one doesn't know the intentions of the original authors. So I avoided changes there because I have little time to waste. Actually, I've already wasted too much on this change, so this comment will be my last action on it (if somebody feels like it, they can take over, otherwise I will abandon it after a while).
Yes ok, let's get this done that's fair.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40207 )
Change subject: Replace DEVICE_NOOP with noop_(set|read)_resources ......................................................................
Patch Set 1:
Um, didn't mean to push for a +2, but I take it ;) If somebody feels strong about all-caps names, please feel free to add them (I just didn't want to put my name on something that I disagree with).
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40207 )
Change subject: Replace DEVICE_NOOP with noop_(set|read)_resources ......................................................................
Patch Set 2: Code-Review+2
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40207 )
Change subject: Replace DEVICE_NOOP with noop_(set|read)_resources ......................................................................
Patch Set 2:
Patch Set 1:
Um, didn't mean to push for a +2, but I take it ;) If somebody feels strong about all-caps names, please feel free to add them (I just didn't want to put my name on something that I disagree with).
It's something I can live with.
Angel Pons has submitted this change. ( https://review.coreboot.org/c/coreboot/+/40207 )
Change subject: Replace DEVICE_NOOP with noop_(set|read)_resources ......................................................................
Replace DEVICE_NOOP with noop_(set|read)_resources
`.read_resources` and `.set_resources` are the only two device operations that are considered mandatory. Other function pointers can be left NULL. Having dedicated no-op implementations for the two mandatory fields should stop the leaking of no-op pointers to other fields.
Change-Id: I6469a7568dc24317c95e238749d878e798b0a362 Signed-off-by: Nico Huber nico.h@gmx.de Reviewed-on: https://review.coreboot.org/c/coreboot/+/40207 Reviewed-by: Angel Pons th3fanbus@gmail.com Reviewed-by: Paul Menzel paulepanter@users.sourceforge.net Reviewed-by: HAOUAS Elyes ehaouas@noos.fr Reviewed-by: Edward O'Callaghan quasisec@chromium.org Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/device/root_device.c M src/drivers/crb/tis.c M src/drivers/generic/adau7002/adau7002.c M src/drivers/generic/generic/generic.c M src/drivers/generic/gpio_keys/gpio_keys.c M src/drivers/generic/gpio_regulator/gpio_regulator.c M src/drivers/generic/ioapic/ioapic.c M src/drivers/generic/max98357a/max98357a.c M src/drivers/i2c/adt7463/adt7463.c M src/drivers/i2c/at24rf08c/at24rf08c.c M src/drivers/i2c/ck505/ck505.c M src/drivers/i2c/da7219/da7219.c M src/drivers/i2c/generic/generic.c M src/drivers/i2c/hid/hid.c M src/drivers/i2c/lm96000/lm96000.c M src/drivers/i2c/max98373/max98373.c M src/drivers/i2c/max98927/max98927.c M src/drivers/i2c/nau8825/nau8825.c M src/drivers/i2c/nct7802y/nct7802y.c M src/drivers/i2c/pca9538/pca9538.c M src/drivers/i2c/pcf8523/pcf8523.c M src/drivers/i2c/ptn3460/ptn3460.c M src/drivers/i2c/rt1011/rt1011.c M src/drivers/i2c/rt5663/rt5663.c M src/drivers/i2c/rtd2132/rtd2132.c M src/drivers/i2c/rx6110sa/rx6110sa.c M src/drivers/i2c/sx9310/sx9310.c M src/drivers/i2c/tpm/chip.c M src/drivers/i2c/w83793/w83793.c M src/drivers/intel/ish/ish.c M src/drivers/intel/mipi_camera/camera.c M src/drivers/spi/acpi/acpi.c M src/drivers/usb/acpi/usb_acpi.c M src/ec/compal/ene932/ec.c M src/ec/google/chromeec/ec_lpc.c M src/ec/google/wilco/chip.c M src/ec/quanta/ene_kb3940q/ec.c M src/ec/quanta/it8518/ec.c M src/ec/roda/it8518/ec.c M src/include/device/device.h M src/mainboard/emulation/qemu-i440fx/northbridge.c M src/northbridge/amd/agesa/family14/northbridge.c M src/northbridge/amd/agesa/family15tn/northbridge.c M src/northbridge/amd/agesa/family16kb/northbridge.c M src/northbridge/amd/pi/00630F01/northbridge.c M src/northbridge/amd/pi/00660F01/northbridge.c M src/northbridge/amd/pi/00730F01/northbridge.c M src/northbridge/intel/e7505/northbridge.c M src/northbridge/intel/gm45/northbridge.c M src/northbridge/intel/haswell/northbridge.c M src/northbridge/intel/i440bx/northbridge.c M src/northbridge/intel/i945/northbridge.c M src/northbridge/intel/ironlake/northbridge.c M src/northbridge/intel/pineview/northbridge.c M src/northbridge/intel/sandybridge/northbridge.c M src/northbridge/intel/x4x/northbridge.c M src/soc/amd/common/block/smbus/sm.c M src/soc/amd/picasso/chip.c M src/soc/amd/picasso/i2c.c M src/soc/amd/stoneyridge/chip.c M src/soc/amd/stoneyridge/i2c.c M src/soc/cavium/cn81xx/soc.c M src/soc/intel/apollolake/chip.c M src/soc/intel/baytrail/chip.c M src/soc/intel/braswell/chip.c M src/soc/intel/broadwell/chip.c M src/soc/intel/cannonlake/chip.c M src/soc/intel/common/block/p2sb/p2sb.c M src/soc/intel/denverton_ns/chip.c M src/soc/intel/icelake/chip.c M src/soc/intel/jasperlake/chip.c M src/soc/intel/skylake/chip.c M src/soc/intel/tigerlake/chip.c M src/soc/intel/xeon_sp/cpx/chip.c M src/soc/intel/xeon_sp/skx/chip.c M src/soc/nvidia/tegra124/soc.c M src/soc/nvidia/tegra210/soc.c M src/soc/rockchip/rk3288/soc.c M src/soc/samsung/exynos5250/cpu.c M src/soc/samsung/exynos5420/cpu.c 80 files changed, 150 insertions(+), 150 deletions(-)
Approvals: build bot (Jenkins): Verified Paul Menzel: Looks good to me, but someone else must approve HAOUAS Elyes: Looks good to me, approved Angel Pons: Looks good to me, approved Edward O'Callaghan: Looks good to me, approved
diff --git a/src/device/root_device.c b/src/device/root_device.c index 68a7ae6..49aa3d8 100644 --- a/src/device/root_device.c +++ b/src/device/root_device.c @@ -127,8 +127,8 @@ * of a motherboard can override this if you want non-default behavior. */ struct device_operations default_dev_ops_root = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .scan_bus = scan_static_bus, .reset_bus = root_dev_reset, #if CONFIG(HAVE_ACPI_TABLES) diff --git a/src/drivers/crb/tis.c b/src/drivers/crb/tis.c index 5c1a6df..bd54bb6 100644 --- a/src/drivers/crb/tis.c +++ b/src/drivers/crb/tis.c @@ -127,8 +127,8 @@ }
static struct device_operations __unused crb_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, #if CONFIG(HAVE_ACPI_TABLES) .acpi_name = crb_tpm_acpi_name, .acpi_fill_ssdt = crb_tpm_fill_ssdt, diff --git a/src/drivers/generic/adau7002/adau7002.c b/src/drivers/generic/adau7002/adau7002.c index 97bd37d..aa47ae6 100644 --- a/src/drivers/generic/adau7002/adau7002.c +++ b/src/drivers/generic/adau7002/adau7002.c @@ -55,8 +55,8 @@ #endif
static struct device_operations adau7002_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, #if CONFIG(HAVE_ACPI_TABLES) .acpi_name = adau7002_acpi_name, .acpi_fill_ssdt = adau7002_fill_ssdt, diff --git a/src/drivers/generic/generic/generic.c b/src/drivers/generic/generic/generic.c index d4de6c7..cee41a5 100644 --- a/src/drivers/generic/generic/generic.c +++ b/src/drivers/generic/generic/generic.c @@ -68,8 +68,8 @@ }
static struct device_operations generic_dev_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .acpi_name = generic_dev_acpi_name, .acpi_fill_ssdt = generic_dev_fill_ssdt_generator, }; diff --git a/src/drivers/generic/gpio_keys/gpio_keys.c b/src/drivers/generic/gpio_keys/gpio_keys.c index 5a74c64..b8e72bf 100644 --- a/src/drivers/generic/gpio_keys/gpio_keys.c +++ b/src/drivers/generic/gpio_keys/gpio_keys.c @@ -102,8 +102,8 @@ }
static struct device_operations gpio_keys_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .acpi_name = gpio_keys_acpi_name, .acpi_fill_ssdt = gpio_keys_fill_ssdt_generator, }; diff --git a/src/drivers/generic/gpio_regulator/gpio_regulator.c b/src/drivers/generic/gpio_regulator/gpio_regulator.c index 7041aa0..0f39910 100644 --- a/src/drivers/generic/gpio_regulator/gpio_regulator.c +++ b/src/drivers/generic/gpio_regulator/gpio_regulator.c @@ -59,8 +59,8 @@ }
static struct device_operations gpio_regulator_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .acpi_name = gpio_regulator_acpi_name, .acpi_fill_ssdt = gpio_regulator_fill_ssdt_generator, }; diff --git a/src/drivers/generic/ioapic/ioapic.c b/src/drivers/generic/ioapic/ioapic.c index b2c4bb6..c8be606 100644 --- a/src/drivers/generic/ioapic/ioapic.c +++ b/src/drivers/generic/ioapic/ioapic.c @@ -95,7 +95,7 @@
static struct device_operations ioapic_operations = { .read_resources = ioapic_read_resources, - .set_resources = DEVICE_NOOP, + .set_resources = noop_set_resources, .init = ioapic_init, };
diff --git a/src/drivers/generic/max98357a/max98357a.c b/src/drivers/generic/max98357a/max98357a.c index 0a29367..599acb5 100644 --- a/src/drivers/generic/max98357a/max98357a.c +++ b/src/drivers/generic/max98357a/max98357a.c @@ -70,8 +70,8 @@ #endif
static struct device_operations max98357a_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, #if CONFIG(HAVE_ACPI_TABLES) .acpi_name = max98357a_acpi_name, .acpi_fill_ssdt = max98357a_fill_ssdt, diff --git a/src/drivers/i2c/adt7463/adt7463.c b/src/drivers/i2c/adt7463/adt7463.c index 3e1a3a5..2fcd54e 100644 --- a/src/drivers/i2c/adt7463/adt7463.c +++ b/src/drivers/i2c/adt7463/adt7463.c @@ -78,8 +78,8 @@ }
static struct device_operations adt7463_operations = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = adt7463_init, };
diff --git a/src/drivers/i2c/at24rf08c/at24rf08c.c b/src/drivers/i2c/at24rf08c/at24rf08c.c index 3841d64..3511502 100644 --- a/src/drivers/i2c/at24rf08c/at24rf08c.c +++ b/src/drivers/i2c/at24rf08c/at24rf08c.c @@ -33,8 +33,8 @@ }
static struct device_operations at24rf08c_operations = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = at24rf08c_init, };
diff --git a/src/drivers/i2c/ck505/ck505.c b/src/drivers/i2c/ck505/ck505.c index fac5208..147776d 100644 --- a/src/drivers/i2c/ck505/ck505.c +++ b/src/drivers/i2c/ck505/ck505.c @@ -46,8 +46,8 @@ }
static struct device_operations ck505_operations = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = ck505_init, };
diff --git a/src/drivers/i2c/da7219/da7219.c b/src/drivers/i2c/da7219/da7219.c index 43c6f9d..4cfeb9f 100644 --- a/src/drivers/i2c/da7219/da7219.c +++ b/src/drivers/i2c/da7219/da7219.c @@ -98,8 +98,8 @@ #endif
static struct device_operations da7219_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, #if CONFIG(HAVE_ACPI_TABLES) .acpi_name = da7219_acpi_name, .acpi_fill_ssdt = da7219_fill_ssdt, diff --git a/src/drivers/i2c/generic/generic.c b/src/drivers/i2c/generic/generic.c index 32b984a..0466a6f 100644 --- a/src/drivers/i2c/generic/generic.c +++ b/src/drivers/i2c/generic/generic.c @@ -180,8 +180,8 @@ #endif
static struct device_operations i2c_generic_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, #if CONFIG(HAVE_ACPI_TABLES) .acpi_name = i2c_generic_acpi_name, .acpi_fill_ssdt = i2c_generic_fill_ssdt_generator, diff --git a/src/drivers/i2c/hid/hid.c b/src/drivers/i2c/hid/hid.c index 11d9d18..de43eb9 100644 --- a/src/drivers/i2c/hid/hid.c +++ b/src/drivers/i2c/hid/hid.c @@ -37,8 +37,8 @@ #endif
static struct device_operations i2c_hid_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, #if CONFIG(HAVE_ACPI_TABLES) .acpi_name = i2c_hid_acpi_name, .acpi_fill_ssdt = i2c_hid_fill_ssdt_generator, diff --git a/src/drivers/i2c/lm96000/lm96000.c b/src/drivers/i2c/lm96000/lm96000.c index 54d2b88..b1cf06e 100644 --- a/src/drivers/i2c/lm96000/lm96000.c +++ b/src/drivers/i2c/lm96000/lm96000.c @@ -205,8 +205,8 @@ }
static struct device_operations lm96000_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = lm96000_init, };
diff --git a/src/drivers/i2c/max98373/max98373.c b/src/drivers/i2c/max98373/max98373.c index c6fa2e4..a7df56b 100644 --- a/src/drivers/i2c/max98373/max98373.c +++ b/src/drivers/i2c/max98373/max98373.c @@ -75,8 +75,8 @@ }
static struct device_operations max98373_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .acpi_name = max98373_acpi_name, .acpi_fill_ssdt = max98373_fill_ssdt, }; diff --git a/src/drivers/i2c/max98927/max98927.c b/src/drivers/i2c/max98927/max98927.c index 166a4ef..0cb80ae 100644 --- a/src/drivers/i2c/max98927/max98927.c +++ b/src/drivers/i2c/max98927/max98927.c @@ -71,8 +71,8 @@ }
static struct device_operations max98927_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .acpi_name = max98927_acpi_name, .acpi_fill_ssdt = max98927_fill_ssdt, }; diff --git a/src/drivers/i2c/nau8825/nau8825.c b/src/drivers/i2c/nau8825/nau8825.c index 0c893a4..c3e95e7 100644 --- a/src/drivers/i2c/nau8825/nau8825.c +++ b/src/drivers/i2c/nau8825/nau8825.c @@ -86,8 +86,8 @@ #endif
static struct device_operations nau8825_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, #if CONFIG(HAVE_ACPI_TABLES) .acpi_name = nau8825_acpi_name, .acpi_fill_ssdt = nau8825_fill_ssdt, diff --git a/src/drivers/i2c/nct7802y/nct7802y.c b/src/drivers/i2c/nct7802y/nct7802y.c index c21b002..dd8c0aa 100644 --- a/src/drivers/i2c/nct7802y/nct7802y.c +++ b/src/drivers/i2c/nct7802y/nct7802y.c @@ -20,8 +20,8 @@ }
static struct device_operations nct7802y_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = nct7802y_init, };
diff --git a/src/drivers/i2c/pca9538/pca9538.c b/src/drivers/i2c/pca9538/pca9538.c index 68283b8..b16ca48 100644 --- a/src/drivers/i2c/pca9538/pca9538.c +++ b/src/drivers/i2c/pca9538/pca9538.c @@ -39,8 +39,8 @@ }
static struct device_operations pca9538_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = pca9538_init, };
diff --git a/src/drivers/i2c/pcf8523/pcf8523.c b/src/drivers/i2c/pcf8523/pcf8523.c index 82945ff..03b6b22 100644 --- a/src/drivers/i2c/pcf8523/pcf8523.c +++ b/src/drivers/i2c/pcf8523/pcf8523.c @@ -118,8 +118,8 @@ }
static struct device_operations pcf8523c_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = pcf8523_init, .final = pcf8523_final }; diff --git a/src/drivers/i2c/ptn3460/ptn3460.c b/src/drivers/i2c/ptn3460/ptn3460.c index 7b3bb56..851156f 100644 --- a/src/drivers/i2c/ptn3460/ptn3460.c +++ b/src/drivers/i2c/ptn3460/ptn3460.c @@ -127,8 +127,8 @@ }
static struct device_operations ptn3460_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = ptn3460_init, };
diff --git a/src/drivers/i2c/rt1011/rt1011.c b/src/drivers/i2c/rt1011/rt1011.c index 19ee1f2..68681ef 100644 --- a/src/drivers/i2c/rt1011/rt1011.c +++ b/src/drivers/i2c/rt1011/rt1011.c @@ -84,8 +84,8 @@ }
static struct device_operations rt1011_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .acpi_name = rt1011_acpi_name, .acpi_fill_ssdt = rt1011_fill_ssdt, }; diff --git a/src/drivers/i2c/rt5663/rt5663.c b/src/drivers/i2c/rt5663/rt5663.c index 0e4bab0..70c14ef 100644 --- a/src/drivers/i2c/rt5663/rt5663.c +++ b/src/drivers/i2c/rt5663/rt5663.c @@ -75,8 +75,8 @@ }
static struct device_operations rt5663_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .acpi_name = rt5663_acpi_name, .acpi_fill_ssdt = rt5663_fill_ssdt, }; diff --git a/src/drivers/i2c/rtd2132/rtd2132.c b/src/drivers/i2c/rtd2132/rtd2132.c index 5dffdc8..74037cc 100644 --- a/src/drivers/i2c/rtd2132/rtd2132.c +++ b/src/drivers/i2c/rtd2132/rtd2132.c @@ -225,8 +225,8 @@ }
static struct device_operations rtd2132_operations = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = rtd2132_init, };
diff --git a/src/drivers/i2c/rx6110sa/rx6110sa.c b/src/drivers/i2c/rx6110sa/rx6110sa.c index c691965..028058a 100644 --- a/src/drivers/i2c/rx6110sa/rx6110sa.c +++ b/src/drivers/i2c/rx6110sa/rx6110sa.c @@ -165,8 +165,8 @@ }
static struct device_operations rx6110sa_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = rx6110sa_init, .final = rx6110sa_final }; diff --git a/src/drivers/i2c/sx9310/sx9310.c b/src/drivers/i2c/sx9310/sx9310.c index e1fe104..a4fac10 100644 --- a/src/drivers/i2c/sx9310/sx9310.c +++ b/src/drivers/i2c/sx9310/sx9310.c @@ -79,8 +79,8 @@ }
static struct device_operations i2c_sx9310_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .acpi_name = i2c_sx9310_acpi_name, .acpi_fill_ssdt = i2c_sx9310_fill_ssdt, }; diff --git a/src/drivers/i2c/tpm/chip.c b/src/drivers/i2c/tpm/chip.c index eeccb7d..b81b0d1 100644 --- a/src/drivers/i2c/tpm/chip.c +++ b/src/drivers/i2c/tpm/chip.c @@ -62,8 +62,8 @@ }
static struct device_operations i2c_tpm_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .acpi_name = i2c_tpm_acpi_name, .acpi_fill_ssdt = i2c_tpm_fill_ssdt, }; diff --git a/src/drivers/i2c/w83793/w83793.c b/src/drivers/i2c/w83793/w83793.c index c52cbb2..822c2ce 100644 --- a/src/drivers/i2c/w83793/w83793.c +++ b/src/drivers/i2c/w83793/w83793.c @@ -292,8 +292,8 @@ }
static struct device_operations w83793_operations = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = w83793_init, };
diff --git a/src/drivers/intel/ish/ish.c b/src/drivers/intel/ish/ish.c index 66e232d..3daf491 100644 --- a/src/drivers/intel/ish/ish.c +++ b/src/drivers/intel/ish/ish.c @@ -30,8 +30,8 @@ }
static struct device_operations intel_ish_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .acpi_fill_ssdt = ish_fill_ssdt_generator, };
diff --git a/src/drivers/intel/mipi_camera/camera.c b/src/drivers/intel/mipi_camera/camera.c index 41a6eb5..aabf2ba 100644 --- a/src/drivers/intel/mipi_camera/camera.c +++ b/src/drivers/intel/mipi_camera/camera.c @@ -68,8 +68,8 @@ }
static struct device_operations camera_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .acpi_name = camera_acpi_name, .acpi_fill_ssdt = camera_fill_ssdt, }; diff --git a/src/drivers/spi/acpi/acpi.c b/src/drivers/spi/acpi/acpi.c index ebdd409..76bddbd 100644 --- a/src/drivers/spi/acpi/acpi.c +++ b/src/drivers/spi/acpi/acpi.c @@ -190,8 +190,8 @@ }
static struct device_operations spi_acpi_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .acpi_name = spi_acpi_name, .acpi_fill_ssdt = spi_acpi_fill_ssdt_generator, }; diff --git a/src/drivers/usb/acpi/usb_acpi.c b/src/drivers/usb/acpi/usb_acpi.c index 13f37fa..a6a004f 100644 --- a/src/drivers/usb/acpi/usb_acpi.c +++ b/src/drivers/usb/acpi/usb_acpi.c @@ -70,8 +70,8 @@ }
static struct device_operations usb_acpi_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .scan_bus = scan_static_bus, .acpi_fill_ssdt = usb_acpi_fill_ssdt_generator, }; diff --git a/src/ec/compal/ene932/ec.c b/src/ec/compal/ene932/ec.c index a022fa7..93d9154 100644 --- a/src/ec/compal/ene932/ec.c +++ b/src/ec/compal/ene932/ec.c @@ -122,7 +122,7 @@
static struct device_operations ops = { .init = ene932_init, - .read_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, };
static struct pnp_info pnp_dev_info[] = { diff --git a/src/ec/google/chromeec/ec_lpc.c b/src/ec/google/chromeec/ec_lpc.c index c34082c..232df8e 100644 --- a/src/ec/google/chromeec/ec_lpc.c +++ b/src/ec/google/chromeec/ec_lpc.c @@ -438,7 +438,7 @@ static struct device_operations ops = { .init = lpc_ec_init, .read_resources = lpc_ec_read_resources, - .set_resources = DEVICE_NOOP, + .set_resources = noop_set_resources, #if CONFIG(HAVE_ACPI_TABLES) .acpi_name = google_chromeec_acpi_name, .acpi_fill_ssdt = google_chromeec_fill_ssdt_generator, diff --git a/src/ec/google/wilco/chip.c b/src/ec/google/wilco/chip.c index f4bea48..7de4e02 100644 --- a/src/ec/google/wilco/chip.c +++ b/src/ec/google/wilco/chip.c @@ -219,7 +219,7 @@ static struct device_operations ops = { .init = wilco_ec_init, .read_resources = wilco_ec_read_resources, - .set_resources = DEVICE_NOOP, + .set_resources = noop_set_resources, .acpi_fill_ssdt = wilco_ec_fill_ssdt_generator, .acpi_name = wilco_ec_acpi_name, }; diff --git a/src/ec/quanta/ene_kb3940q/ec.c b/src/ec/quanta/ene_kb3940q/ec.c index f6acd218..4959db1 100644 --- a/src/ec/quanta/ene_kb3940q/ec.c +++ b/src/ec/quanta/ene_kb3940q/ec.c @@ -132,7 +132,7 @@
static struct device_operations ops = { .init = ene_kb3940q_init, - .read_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, };
static struct pnp_info pnp_dev_info[] = { diff --git a/src/ec/quanta/it8518/ec.c b/src/ec/quanta/it8518/ec.c index 19c07c5..9cb3755 100644 --- a/src/ec/quanta/it8518/ec.c +++ b/src/ec/quanta/it8518/ec.c @@ -146,7 +146,7 @@
static struct device_operations ops = { .init = it8518_init, - .read_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, };
static struct pnp_info pnp_dev_info[] = { diff --git a/src/ec/roda/it8518/ec.c b/src/ec/roda/it8518/ec.c index 02f4c9b..f4a2758 100644 --- a/src/ec/roda/it8518/ec.c +++ b/src/ec/roda/it8518/ec.c @@ -35,7 +35,7 @@
static struct device_operations ops = { .init = it8518_init, - .read_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, };
static struct pnp_info pnp_dev_info[] = { diff --git a/src/include/device/device.h b/src/include/device/device.h index 9ba4d31..4e9c594 100644 --- a/src/include/device/device.h +++ b/src/include/device/device.h @@ -66,8 +66,8 @@ /** * Standard device operations function pointers shims. */ -static inline void device_noop(struct device *dev) {} -#define DEVICE_NOOP device_noop +static inline void noop_read_resources(struct device *dev) {} +static inline void noop_set_resources(struct device *dev) {}
struct bus {
diff --git a/src/mainboard/emulation/qemu-i440fx/northbridge.c b/src/mainboard/emulation/qemu-i440fx/northbridge.c index 7eee0f3..6312d8e 100644 --- a/src/mainboard/emulation/qemu-i440fx/northbridge.c +++ b/src/mainboard/emulation/qemu-i440fx/northbridge.c @@ -273,8 +273,8 @@ }
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = cpu_bus_init, .scan_bus = cpu_bus_scan, }; diff --git a/src/northbridge/amd/agesa/family14/northbridge.c b/src/northbridge/amd/agesa/family14/northbridge.c index 85b3172..5826ee1 100644 --- a/src/northbridge/amd/agesa/family14/northbridge.c +++ b/src/northbridge/amd/agesa/family14/northbridge.c @@ -823,8 +823,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = cpu_bus_init, .scan_bus = cpu_bus_scan, }; diff --git a/src/northbridge/amd/agesa/family15tn/northbridge.c b/src/northbridge/amd/agesa/family15tn/northbridge.c index aa0aca3..57005c7 100644 --- a/src/northbridge/amd/agesa/family15tn/northbridge.c +++ b/src/northbridge/amd/agesa/family15tn/northbridge.c @@ -892,8 +892,8 @@ }
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = cpu_bus_init, .scan_bus = cpu_bus_scan, }; diff --git a/src/northbridge/amd/agesa/family16kb/northbridge.c b/src/northbridge/amd/agesa/family16kb/northbridge.c index bdf4058..e6b7db4 100644 --- a/src/northbridge/amd/agesa/family16kb/northbridge.c +++ b/src/northbridge/amd/agesa/family16kb/northbridge.c @@ -919,8 +919,8 @@ }
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = cpu_bus_init, .scan_bus = cpu_bus_scan, }; diff --git a/src/northbridge/amd/pi/00630F01/northbridge.c b/src/northbridge/amd/pi/00630F01/northbridge.c index 583379c..1ee951b 100644 --- a/src/northbridge/amd/pi/00630F01/northbridge.c +++ b/src/northbridge/amd/pi/00630F01/northbridge.c @@ -894,8 +894,8 @@ }
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = cpu_bus_init, .scan_bus = cpu_bus_scan, }; diff --git a/src/northbridge/amd/pi/00660F01/northbridge.c b/src/northbridge/amd/pi/00660F01/northbridge.c index 9b0c490..7de5b46 100644 --- a/src/northbridge/amd/pi/00660F01/northbridge.c +++ b/src/northbridge/amd/pi/00660F01/northbridge.c @@ -902,8 +902,8 @@ }
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = cpu_bus_init, .scan_bus = cpu_bus_scan, }; diff --git a/src/northbridge/amd/pi/00730F01/northbridge.c b/src/northbridge/amd/pi/00730F01/northbridge.c index bab5cdc..8f8c094 100644 --- a/src/northbridge/amd/pi/00730F01/northbridge.c +++ b/src/northbridge/amd/pi/00730F01/northbridge.c @@ -1258,8 +1258,8 @@ }
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = cpu_bus_init, .scan_bus = cpu_bus_scan, }; diff --git a/src/northbridge/intel/e7505/northbridge.c b/src/northbridge/intel/e7505/northbridge.c index fc1496d..03230a5 100644 --- a/src/northbridge/intel/e7505/northbridge.c +++ b/src/northbridge/intel/e7505/northbridge.c @@ -80,8 +80,8 @@ }
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = cpu_bus_init, };
diff --git a/src/northbridge/intel/gm45/northbridge.c b/src/northbridge/intel/gm45/northbridge.c index c54e335..5f6c8a1 100644 --- a/src/northbridge/intel/gm45/northbridge.c +++ b/src/northbridge/intel/gm45/northbridge.c @@ -226,8 +226,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = mp_cpu_bus_init, };
diff --git a/src/northbridge/intel/haswell/northbridge.c b/src/northbridge/intel/haswell/northbridge.c index 0d94dcf..f7c6883 100644 --- a/src/northbridge/intel/haswell/northbridge.c +++ b/src/northbridge/intel/haswell/northbridge.c @@ -482,8 +482,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = mp_cpu_bus_init, };
diff --git a/src/northbridge/intel/i440bx/northbridge.c b/src/northbridge/intel/i440bx/northbridge.c index f4df62b..da0107c 100644 --- a/src/northbridge/intel/i440bx/northbridge.c +++ b/src/northbridge/intel/i440bx/northbridge.c @@ -79,8 +79,8 @@ }
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = cpu_bus_init, };
diff --git a/src/northbridge/intel/i945/northbridge.c b/src/northbridge/intel/i945/northbridge.c index a82cd0f..94a5aba 100644 --- a/src/northbridge/intel/i945/northbridge.c +++ b/src/northbridge/intel/i945/northbridge.c @@ -198,8 +198,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = mp_cpu_bus_init, };
diff --git a/src/northbridge/intel/ironlake/northbridge.c b/src/northbridge/intel/ironlake/northbridge.c index 12592fc..c1ee207 100644 --- a/src/northbridge/intel/ironlake/northbridge.c +++ b/src/northbridge/intel/ironlake/northbridge.c @@ -253,8 +253,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = mp_cpu_bus_init, };
diff --git a/src/northbridge/intel/pineview/northbridge.c b/src/northbridge/intel/pineview/northbridge.c index 2c6944c..b243563 100644 --- a/src/northbridge/intel/pineview/northbridge.c +++ b/src/northbridge/intel/pineview/northbridge.c @@ -182,8 +182,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = mp_cpu_bus_init, };
diff --git a/src/northbridge/intel/sandybridge/northbridge.c b/src/northbridge/intel/sandybridge/northbridge.c index ff42369..ea2a737 100644 --- a/src/northbridge/intel/sandybridge/northbridge.c +++ b/src/northbridge/intel/sandybridge/northbridge.c @@ -459,8 +459,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = mp_cpu_bus_init, };
diff --git a/src/northbridge/intel/x4x/northbridge.c b/src/northbridge/intel/x4x/northbridge.c index 8b49dab..054d2aa 100644 --- a/src/northbridge/intel/x4x/northbridge.c +++ b/src/northbridge/intel/x4x/northbridge.c @@ -177,8 +177,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = mp_cpu_bus_init, };
diff --git a/src/soc/amd/common/block/smbus/sm.c b/src/soc/amd/common/block/smbus/sm.c index 2863d22..cef5bba 100644 --- a/src/soc/amd/common/block/smbus/sm.c +++ b/src/soc/amd/common/block/smbus/sm.c @@ -75,8 +75,8 @@ .set_subsystem = pci_dev_set_subsystem, }; static struct device_operations smbus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .enable_resources = pci_dev_enable_resources, .init = sm_init, .scan_bus = scan_smbus, diff --git a/src/soc/amd/picasso/chip.c b/src/soc/amd/picasso/chip.c index 865dad8..7b3e7fb 100644 --- a/src/soc/amd/picasso/chip.c +++ b/src/soc/amd/picasso/chip.c @@ -19,8 +19,8 @@ extern const char *i2c_acpi_name(const struct device *dev);
struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = picasso_init_cpus, .acpi_fill_ssdt = generate_cpu_entries, }; diff --git a/src/soc/amd/picasso/i2c.c b/src/soc/amd/picasso/i2c.c index f17eccd..22c6216 100644 --- a/src/soc/amd/picasso/i2c.c +++ b/src/soc/amd/picasso/i2c.c @@ -126,8 +126,8 @@
struct device_operations picasso_i2c_mmio_ops = { /* TODO(teravest): Move I2C resource info here. */ - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .scan_bus = scan_smbus, .acpi_name = i2c_acpi_name, .acpi_fill_ssdt = dw_i2c_acpi_fill_ssdt, diff --git a/src/soc/amd/stoneyridge/chip.c b/src/soc/amd/stoneyridge/chip.c index b27683a..189f48e 100644 --- a/src/soc/amd/stoneyridge/chip.c +++ b/src/soc/amd/stoneyridge/chip.c @@ -24,8 +24,8 @@ extern const char *i2c_acpi_name(const struct device *dev);
struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = stoney_init_cpus, .acpi_fill_ssdt = generate_cpu_entries, }; diff --git a/src/soc/amd/stoneyridge/i2c.c b/src/soc/amd/stoneyridge/i2c.c index 8ec3555..1fdb416 100644 --- a/src/soc/amd/stoneyridge/i2c.c +++ b/src/soc/amd/stoneyridge/i2c.c @@ -110,8 +110,8 @@
struct device_operations stoneyridge_i2c_mmio_ops = { /* TODO(teravest): Move I2C resource info here. */ - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .scan_bus = scan_smbus, .acpi_name = i2c_acpi_name, .acpi_fill_ssdt = dw_i2c_acpi_fill_ssdt, diff --git a/src/soc/cavium/cn81xx/soc.c b/src/soc/cavium/cn81xx/soc.c index f3adc47..60eb225 100644 --- a/src/soc/cavium/cn81xx/soc.c +++ b/src/soc/cavium/cn81xx/soc.c @@ -381,7 +381,7 @@
static struct device_operations soc_ops = { .read_resources = soc_read_resources, - .set_resources = DEVICE_NOOP, + .set_resources = noop_set_resources, .init = soc_init, .final = soc_final, }; diff --git a/src/soc/intel/apollolake/chip.c b/src/soc/intel/apollolake/chip.c index cf4763d..1075642 100644 --- a/src/soc/intel/apollolake/chip.c +++ b/src/soc/intel/apollolake/chip.c @@ -219,8 +219,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = apollolake_init_cpus, .acpi_fill_ssdt = generate_cpu_entries, }; diff --git a/src/soc/intel/baytrail/chip.c b/src/soc/intel/baytrail/chip.c index b51d8c3..912347c 100644 --- a/src/soc/intel/baytrail/chip.c +++ b/src/soc/intel/baytrail/chip.c @@ -21,8 +21,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = baytrail_init_cpus, };
diff --git a/src/soc/intel/braswell/chip.c b/src/soc/intel/braswell/chip.c index 991e30f..cb1c37d 100644 --- a/src/soc/intel/braswell/chip.c +++ b/src/soc/intel/braswell/chip.c @@ -24,8 +24,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = soc_init_cpus };
diff --git a/src/soc/intel/broadwell/chip.c b/src/soc/intel/broadwell/chip.c index 4caa236..e81890e 100644 --- a/src/soc/intel/broadwell/chip.c +++ b/src/soc/intel/broadwell/chip.c @@ -23,8 +23,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = &broadwell_init_cpus, };
diff --git a/src/soc/intel/cannonlake/chip.c b/src/soc/intel/cannonlake/chip.c index e323346..df9b908 100644 --- a/src/soc/intel/cannonlake/chip.c +++ b/src/soc/intel/cannonlake/chip.c @@ -184,8 +184,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .acpi_fill_ssdt = generate_cpu_entries, };
diff --git a/src/soc/intel/common/block/p2sb/p2sb.c b/src/soc/intel/common/block/p2sb/p2sb.c index 050f958..731ce50 100644 --- a/src/soc/intel/common/block/p2sb/p2sb.c +++ b/src/soc/intel/common/block/p2sb/p2sb.c @@ -124,7 +124,7 @@
static const struct device_operations device_ops = { .read_resources = read_resources, - .set_resources = DEVICE_NOOP, + .set_resources = noop_set_resources, .ops_pci = &pci_dev_ops_pci, };
diff --git a/src/soc/intel/denverton_ns/chip.c b/src/soc/intel/denverton_ns/chip.c index dbee297..fbe2b82 100644 --- a/src/soc/intel/denverton_ns/chip.c +++ b/src/soc/intel/denverton_ns/chip.c @@ -42,8 +42,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = denverton_init_cpus, #if CONFIG(HAVE_ACPI_TABLES) .acpi_fill_ssdt = generate_cpu_entries, diff --git a/src/soc/intel/icelake/chip.c b/src/soc/intel/icelake/chip.c index 36cd0d1..43216e6 100644 --- a/src/soc/intel/icelake/chip.c +++ b/src/soc/intel/icelake/chip.c @@ -140,8 +140,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .acpi_fill_ssdt = generate_cpu_entries, };
diff --git a/src/soc/intel/jasperlake/chip.c b/src/soc/intel/jasperlake/chip.c index 643d851..7b53e17 100644 --- a/src/soc/intel/jasperlake/chip.c +++ b/src/soc/intel/jasperlake/chip.c @@ -147,8 +147,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, #if CONFIG(HAVE_ACPI_TABLES) .acpi_fill_ssdt = generate_cpu_entries, #endif diff --git a/src/soc/intel/skylake/chip.c b/src/soc/intel/skylake/chip.c index 6e471fb..9df078b 100644 --- a/src/soc/intel/skylake/chip.c +++ b/src/soc/intel/skylake/chip.c @@ -95,8 +95,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, #if CONFIG(HAVE_ACPI_TABLES) .acpi_fill_ssdt = generate_cpu_entries, #endif diff --git a/src/soc/intel/tigerlake/chip.c b/src/soc/intel/tigerlake/chip.c index b93d1fc..073c8d2 100644 --- a/src/soc/intel/tigerlake/chip.c +++ b/src/soc/intel/tigerlake/chip.c @@ -147,8 +147,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, #if CONFIG(HAVE_ACPI_TABLES) .acpi_fill_ssdt = generate_cpu_entries, #endif diff --git a/src/soc/intel/xeon_sp/cpx/chip.c b/src/soc/intel/xeon_sp/cpx/chip.c index 5f1dedf..196f3df 100644 --- a/src/soc/intel/xeon_sp/cpx/chip.c +++ b/src/soc/intel/xeon_sp/cpx/chip.c @@ -31,8 +31,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = cpx_init_cpus, };
diff --git a/src/soc/intel/xeon_sp/skx/chip.c b/src/soc/intel/xeon_sp/skx/chip.c index fbd13d5..be452a0 100644 --- a/src/soc/intel/xeon_sp/skx/chip.c +++ b/src/soc/intel/xeon_sp/skx/chip.c @@ -482,8 +482,8 @@ };
static struct device_operations cpu_bus_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = xeon_sp_init_cpus, #if CONFIG(HAVE_ACPI_TABLES) /* defined in src/soc/intel/common/block/acpi/acpi.c */ diff --git a/src/soc/nvidia/tegra124/soc.c b/src/soc/nvidia/tegra124/soc.c index 270e5e5..1f9f290 100644 --- a/src/soc/nvidia/tegra124/soc.c +++ b/src/soc/nvidia/tegra124/soc.c @@ -42,8 +42,8 @@ }
static struct device_operations soc_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .enable_resources = soc_enable, .init = soc_init, }; diff --git a/src/soc/nvidia/tegra210/soc.c b/src/soc/nvidia/tegra210/soc.c index 5fc1e6a..f5eb44f 100644 --- a/src/soc/nvidia/tegra210/soc.c +++ b/src/soc/nvidia/tegra210/soc.c @@ -51,7 +51,7 @@
static struct device_operations soc_ops = { .read_resources = soc_read_resources, - .set_resources = DEVICE_NOOP, + .set_resources = noop_set_resources, };
static void enable_tegra210_dev(struct device *dev) diff --git a/src/soc/rockchip/rk3288/soc.c b/src/soc/rockchip/rk3288/soc.c index f7f1ec9..08b72ea 100644 --- a/src/soc/rockchip/rk3288/soc.c +++ b/src/soc/rockchip/rk3288/soc.c @@ -24,8 +24,8 @@ }
static struct device_operations soc_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .init = soc_init, };
diff --git a/src/soc/samsung/exynos5250/cpu.c b/src/soc/samsung/exynos5250/cpu.c index 8b087c9..8278b1e 100644 --- a/src/soc/samsung/exynos5250/cpu.c +++ b/src/soc/samsung/exynos5250/cpu.c @@ -112,8 +112,8 @@ }
static struct device_operations cpu_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .enable_resources = cpu_enable, .init = cpu_init, }; diff --git a/src/soc/samsung/exynos5420/cpu.c b/src/soc/samsung/exynos5420/cpu.c index dd27730..4bb03f2 100644 --- a/src/soc/samsung/exynos5420/cpu.c +++ b/src/soc/samsung/exynos5420/cpu.c @@ -142,8 +142,8 @@ }
static struct device_operations cpu_ops = { - .read_resources = DEVICE_NOOP, - .set_resources = DEVICE_NOOP, + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, .enable_resources = cpu_enable, .init = cpu_init, };
9elements QA has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40207 )
Change subject: Replace DEVICE_NOOP with noop_(set|read)_resources ......................................................................
Patch Set 3:
Automatic boot test returned (PASS/FAIL/TOTAL): 3/0/3 Emulation targets: EMULATION_QEMU_X86_Q35 using payload TianoCore : SUCCESS : https://lava.9esec.io/r/2235 EMULATION_QEMU_X86_Q35 using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/2234 EMULATION_QEMU_X86_I440FX using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/2233
Please note: This test is under development and might not be accurate at all!