Felix Held has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/56705 )
Change subject: soc/amd/common/block/gpio_banks: use unsigned int for gevent parameter ......................................................................
soc/amd/common/block/gpio_banks: use unsigned int for gevent parameter
A valid GEVENT number is never negative. The local variable in set_single_gpio still needs to be a signed integer, since the return value of get_gpio_gevent being -1 indicates that the GPIO can't generate a GEVENT. The check for that makes the function return before calling program_smi of program_sci, so the parameter of those functions can be changed to unsigned.
Signed-off-by: Felix Held felix-coreboot@felixheld.de Change-Id: I6ce23ceed1585589932824b8cab2a138328672a9 --- M src/soc/amd/common/block/gpio_banks/gpio.c 1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/56705/1
diff --git a/src/soc/amd/common/block/gpio_banks/gpio.c b/src/soc/amd/common/block/gpio_banks/gpio.c index 6e141f6..e897371 100644 --- a/src/soc/amd/common/block/gpio_banks/gpio.c +++ b/src/soc/amd/common/block/gpio_banks/gpio.c @@ -27,7 +27,7 @@ return -1; }
-static void program_smi(uint32_t flags, int gevent_num) +static void program_smi(uint32_t flags, unsigned int gevent_num) { uint8_t level;
@@ -52,7 +52,7 @@ * In a similar fashion, polarity (rising/falling, hi/lo) of each GPE is * represented as a single bit in SMI_SCI_TRIG register. */ -static void program_sci(uint32_t flags, int gevent_num) +static void program_sci(uint32_t flags, unsigned int gevent_num) { struct sci_source sci;