soc/mediatek/mt8195/apusys_devapc.c: Fix unsigned comparison
Clang warns about unsigned comparison below 0. Use the enum value itself to fix this warning. Change-Id: I12fccff2fb7d43fd4582afd518a7eab632908a5f Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/74553 Reviewed-by: Yu-Ping Wu <yupingso@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
This commit is contained in:
parent
bd429063d9
commit
4ffce7e8ac
@ -151,7 +151,7 @@ static int set_slave_noc_dapc(u32 slave, enum domain_id domain_id, enum devapc_p
|
||||
u32 apc_set_index;
|
||||
u32 *base;
|
||||
|
||||
if (perm >= PERM_NUM || perm < 0) {
|
||||
if (perm >= PERM_NUM || perm < NO_PROTECTION) {
|
||||
printk(BIOS_ERR, "[NOC_DAPC] permission type:%#x is not supported!\n", perm);
|
||||
return APUSYS_APC_ERR_PERMISSION_NOT_SUPPORTED;
|
||||
}
|
||||
@ -192,7 +192,7 @@ static int set_slave_apc(u32 slave, enum domain_id domain_id, enum devapc_perm_t
|
||||
u32 apc_set_index;
|
||||
u32 *base;
|
||||
|
||||
if (perm >= PERM_NUM || perm < 0) {
|
||||
if (perm >= PERM_NUM || perm < NO_PROTECTION) {
|
||||
printk(BIOS_ERR, "[APUAPC] perm type:%#x is not supported!\n", perm);
|
||||
return APUSYS_APC_ERR_PERMISSION_NOT_SUPPORTED;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user