diff options
author | Nico Huber <nico.h@gmx.de> | 2020-04-05 14:05:24 +0200 |
---|---|---|
committer | Angel Pons <th3fanbus@gmail.com> | 2020-04-10 11:50:22 +0000 |
commit | 2f8ba69b0ee5deafa9bad20c2a7b2b4785fcb565 (patch) | |
tree | 05ed912a3b8e0d11daa2d83030f93d9e90d46d90 /src/soc/intel | |
parent | a461b694a6c0468cd679628aeebf83437027fb45 (diff) |
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>
Diffstat (limited to 'src/soc/intel')
-rw-r--r-- | src/soc/intel/apollolake/chip.c | 4 | ||||
-rw-r--r-- | src/soc/intel/baytrail/chip.c | 4 | ||||
-rw-r--r-- | src/soc/intel/braswell/chip.c | 4 | ||||
-rw-r--r-- | src/soc/intel/broadwell/chip.c | 4 | ||||
-rw-r--r-- | src/soc/intel/cannonlake/chip.c | 4 | ||||
-rw-r--r-- | src/soc/intel/common/block/p2sb/p2sb.c | 2 | ||||
-rw-r--r-- | src/soc/intel/denverton_ns/chip.c | 4 | ||||
-rw-r--r-- | src/soc/intel/icelake/chip.c | 4 | ||||
-rw-r--r-- | src/soc/intel/jasperlake/chip.c | 4 | ||||
-rw-r--r-- | src/soc/intel/skylake/chip.c | 4 | ||||
-rw-r--r-- | src/soc/intel/tigerlake/chip.c | 4 | ||||
-rw-r--r-- | src/soc/intel/xeon_sp/cpx/chip.c | 4 | ||||
-rw-r--r-- | src/soc/intel/xeon_sp/skx/chip.c | 4 |
13 files changed, 25 insertions, 25 deletions
diff --git a/src/soc/intel/apollolake/chip.c b/src/soc/intel/apollolake/chip.c index cf4763d67d..1075642517 100644 --- a/src/soc/intel/apollolake/chip.c +++ b/src/soc/intel/apollolake/chip.c @@ -219,8 +219,8 @@ static struct device_operations pci_domain_ops = { }; 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 b51d8c31de..912347c325 100644 --- a/src/soc/intel/baytrail/chip.c +++ b/src/soc/intel/baytrail/chip.c @@ -21,8 +21,8 @@ static struct device_operations pci_domain_ops = { }; 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 991e30f3de..cb1c37d934 100644 --- a/src/soc/intel/braswell/chip.c +++ b/src/soc/intel/braswell/chip.c @@ -24,8 +24,8 @@ static struct device_operations pci_domain_ops = { }; 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 4caa23653d..e81890e899 100644 --- a/src/soc/intel/broadwell/chip.c +++ b/src/soc/intel/broadwell/chip.c @@ -23,8 +23,8 @@ static struct device_operations pci_domain_ops = { }; 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 e323346a12..df9b908813 100644 --- a/src/soc/intel/cannonlake/chip.c +++ b/src/soc/intel/cannonlake/chip.c @@ -184,8 +184,8 @@ static struct device_operations pci_domain_ops = { }; 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 050f95868e..731ce50d4a 100644 --- a/src/soc/intel/common/block/p2sb/p2sb.c +++ b/src/soc/intel/common/block/p2sb/p2sb.c @@ -124,7 +124,7 @@ static void read_resources(struct device *dev) 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 dbee2977a2..fbe2b8264f 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 pci_domain_ops = { }; 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 36cd0d15e5..43216e6cc1 100644 --- a/src/soc/intel/icelake/chip.c +++ b/src/soc/intel/icelake/chip.c @@ -140,8 +140,8 @@ static struct device_operations pci_domain_ops = { }; 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 643d8511d4..7b53e17bd2 100644 --- a/src/soc/intel/jasperlake/chip.c +++ b/src/soc/intel/jasperlake/chip.c @@ -147,8 +147,8 @@ static struct device_operations pci_domain_ops = { }; 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 6e471fb2d3..9df078bad8 100644 --- a/src/soc/intel/skylake/chip.c +++ b/src/soc/intel/skylake/chip.c @@ -95,8 +95,8 @@ static struct device_operations pci_domain_ops = { }; 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 b93d1fc2ba..073c8d2c69 100644 --- a/src/soc/intel/tigerlake/chip.c +++ b/src/soc/intel/tigerlake/chip.c @@ -147,8 +147,8 @@ static struct device_operations pci_domain_ops = { }; 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 5f1dedf497..196f3df0d1 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 pci_domain_ops = { }; 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 fbd13d524c..be452a05b6 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 pci_domain_ops = { }; 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 */ |