Felix Held has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/49941 )
Change subject: soc/amd/picasso/chip: use switch/case statement in enable_dev() ......................................................................
soc/amd/picasso/chip: use switch/case statement in enable_dev()
The default case is only needed to make the compiler happy.
Signed-off-by: Felix Held felix-coreboot@felixheld.de Change-Id: Idf54e7128f9e9d96f15ac7ab121f22621e033fac --- M src/soc/amd/picasso/chip.c 1 file changed, 9 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/41/49941/1
diff --git a/src/soc/amd/picasso/chip.c b/src/soc/amd/picasso/chip.c index d31e94a..91dd4c4 100644 --- a/src/soc/amd/picasso/chip.c +++ b/src/soc/amd/picasso/chip.c @@ -82,12 +82,18 @@ static void enable_dev(struct device *dev) { /* Set the operations if it is a special bus type */ - if (dev->path.type == DEVICE_PATH_DOMAIN) { + switch (dev->path.type) { + case DEVICE_PATH_DOMAIN: dev->ops = &pci_domain_ops; - } else if (dev->path.type == DEVICE_PATH_CPU_CLUSTER) { + break; + case DEVICE_PATH_CPU_CLUSTER: dev->ops = &cpu_bus_ops; - } else if (dev->path.type == DEVICE_PATH_MMIO) { + break; + case DEVICE_PATH_MMIO: set_mmio_dev_ops(dev); + break; + default: + break; } }