From: Ruiqiang Hao <ruiqiang....@windriver.com>

In commit de8f520a0c92 (driver:mpam: Fix the compilations issues when
ACPI is not selected) introduced compiler warning below, add #ifdef
statement around variable 'prot' and replace ACPI with CONFIG_ACPI to
solve this problem.

drivers/platform/mpam/mpam_devices.c: In function 'mpam_msc_drv_probe':
drivers/platform/mpam/mpam_devices.c:1598:18: warning: unused variable 'prot' 
[-Wunused-variable]
 1598 |         pgprot_t prot;
      |                  ^~~~

Signed-off-by: Ruiqiang Hao <ruiqiang....@windriver.com>
---
 drivers/platform/mpam/mpam_devices.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/platform/mpam/mpam_devices.c 
b/drivers/platform/mpam/mpam_devices.c
index b3aab46e06a1..3dfa114abea0 100644
--- a/drivers/platform/mpam/mpam_devices.c
+++ b/drivers/platform/mpam/mpam_devices.c
@@ -1595,7 +1595,9 @@ static void mpam_pcc_rx_callback(struct mbox_client *cl, 
void *msg)
 static int mpam_msc_drv_probe(struct platform_device *pdev)
 {
        int err;
+#ifdef CONFIG_ACPI
        pgprot_t prot;
+#endif
        void * __iomem io;
        struct mpam_msc *msc;
        struct resource *msc_res;
@@ -1672,7 +1674,7 @@ static int mpam_msc_drv_probe(struct platform_device 
*pdev)
                                err = PTR_ERR(msc->pcc_chan);
                                break;
                        }
-#ifdef ACPI
+#ifdef CONFIG_ACPI
                        prot = 
__acpi_get_mem_attribute(msc->pcc_chan->shmem_base_addr);
                        io = ioremap_prot(msc->pcc_chan->shmem_base_addr,
                                          msc->pcc_chan->shmem_size, 
pgprot_val(prot));
-- 
2.39.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#12462): 
https://lists.yoctoproject.org/g/linux-yocto/message/12462
Mute This Topic: https://lists.yoctoproject.org/mt/98753839/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to