From 4a1744663647e5e1c29748ce3caaa01852d54d5c Mon Sep 17 00:00:00 2001 From: Andrei Emeltchenko Date: Fri, 22 Dec 2023 13:05:14 +0200 Subject: [PATCH] drivers: pcie: Remove magic number Use definitions instead of magic numbers. Signed-off-by: Andrei Emeltchenko --- drivers/pcie/host/pcie.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pcie/host/pcie.c b/drivers/pcie/host/pcie.c index d827e326fd7..52c7053e5b7 100644 --- a/drivers/pcie/host/pcie.c +++ b/drivers/pcie/host/pcie.c @@ -159,7 +159,8 @@ static bool pcie_get_bar(pcie_bdf_t bdf, } /* IO/memory decode should be disabled before sizing/update BAR. */ - pcie_conf_write(bdf, PCIE_CONF_CMDSTAT, cmd_reg & (~0x3)); + pcie_conf_write(bdf, PCIE_CONF_CMDSTAT, + cmd_reg & (~(PCIE_CONF_CMDSTAT_IO | PCIE_CONF_CMDSTAT_MEM))); pcie_conf_write(bdf, reg, 0xFFFFFFFFU); size = pcie_conf_read(bdf, reg);