From 3e034b6e9aaddcca1996773b25d2ee88940d1144 Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Wed, 29 Jul 2020 17:39:21 -0700 Subject: Change all assert(0) to BUG() I would like to make assertions evaluate at compile time where possible, but sometimes people used a literal assert(0) to force an assertion in a certain code path. We already have BUG() for that so let's just replace those instances with that. Signed-off-by: Julius Werner Change-Id: I674e5f8ec7f5fe8b92b1c7c95d9f9202d422ce32 Reviewed-on: https://review.coreboot.org/c/coreboot/+/44047 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh Reviewed-by: Aaron Durbin Reviewed-by: Angel Pons --- src/soc/intel/common/block/gpio/gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/soc/intel/common/block') diff --git a/src/soc/intel/common/block/gpio/gpio.c b/src/soc/intel/common/block/gpio/gpio.c index ee91aa6550..d6958b111f 100644 --- a/src/soc/intel/common/block/gpio/gpio.c +++ b/src/soc/intel/common/block/gpio/gpio.c @@ -78,7 +78,7 @@ static inline size_t gpio_group_index(const struct pad_community *comm, } printk(BIOS_ERR, "%s: pad %d is not found in community %s!\n", __func__, relative_pad, comm->name); - assert(0); + BUG(); return i; } -- cgit v1.2.3