From patchwork Tue May 18 14:08:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Green Wan X-Patchwork-Id: 1480275 X-Patchwork-Delegate: uboot@andestech.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FkyY76VdCz9sTD for ; Wed, 19 May 2021 00:09:15 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 952A982E6F; Tue, 18 May 2021 16:09:08 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 5403D82E77; Tue, 18 May 2021 16:09:05 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,RDNS_NONE, SPF_HELO_NONE,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.2 Received: from transporter.internal.sifive.com (unknown [64.62.193.209]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3770882E6C for ; Tue, 18 May 2021 16:09:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=green.wan@sifive.com Received: from gamma15.internal.sifive.com (gamma15.internal.sifive.com [10.14.21.64]) by transporter.internal.sifive.com (Postfix) with ESMTPS id 8E1F3200A9; Tue, 18 May 2021 07:08:59 -0700 (PDT) Received: from localhost (gamma15.internal.sifive.com [local]) by gamma15.internal.sifive.com (OpenSMTPD) with ESMTPA id 35c57a32; Tue, 18 May 2021 14:08:59 +0000 (UTC) From: Green Wan To: Cc: bmeng.cn@gmail.com, ycliang@andestech.com, Green Wan , Neil Armstrong , u-boot@lists.denx.de (open list) Subject: [PATCH] drivers: pci: pcie_dw_common: fix Werror compilation error Date: Tue, 18 May 2021 07:08:55 -0700 Message-Id: <20210518140856.204973-1-green.wan@sifive.com> X-Mailer: git-send-email 2.31.0 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean Fix compilation error when Werror is turned on. The warning could possible break some CI builds. Signed-off-by: Green Wan --- drivers/pci/pcie_dw_common.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/pci/pcie_dw_common.c b/drivers/pci/pcie_dw_common.c index 785fd3aad0..fde7c36558 100644 --- a/drivers/pci/pcie_dw_common.c +++ b/drivers/pci/pcie_dw_common.c @@ -213,7 +213,7 @@ int pcie_dw_read_config(const struct udevice *bus, pci_dev_t bdf, va_address = set_cfg_address(pcie, bdf, offset); - value = readl(va_address); + value = readl((void __iomem *)va_address); debug("(addr,val)=(0x%04x, 0x%08lx)\n", offset, value); *valuep = pci_conv_32_to_size(value, offset, size); @@ -257,9 +257,9 @@ int pcie_dw_write_config(struct udevice *bus, pci_dev_t bdf, va_address = set_cfg_address(pcie, bdf, offset); - old = readl(va_address); + old = readl((void __iomem *)va_address); value = pci_conv_size_to_32(old, value, offset, size); - writel(value, va_address); + writel(value, (void __iomem *)va_address); return pcie_dw_prog_outbound_atu_unroll(pcie, PCIE_ATU_REGION_INDEX1, PCIE_ATU_TYPE_IO, pcie->io.phys_start, @@ -337,28 +337,28 @@ void pcie_dw_setup_host(struct pcie_dw *pci) pci->cfg_base, pci->cfg_base + pci->cfg_size, pci->cfg_size); - dev_dbg(pci->dev, "IO space: [0x%llx - 0x%llx, size 0x%lx]\n", + dev_dbg(pci->dev, "IO space: [0x%llx - 0x%llx, size 0x%llx]\n", pci->io.phys_start, pci->io.phys_start + pci->io.size, pci->io.size); - dev_dbg(pci->dev, "IO bus: [0x%lx - 0x%lx, size 0x%lx]\n", + dev_dbg(pci->dev, "IO bus: [0x%llx - 0x%llx, size 0x%llx]\n", pci->io.bus_start, pci->io.bus_start + pci->io.size, pci->io.size); - dev_dbg(pci->dev, "MEM space: [0x%llx - 0x%llx, size 0x%lx]\n", + dev_dbg(pci->dev, "MEM space: [0x%llx - 0x%llx, size 0x%llx]\n", pci->mem.phys_start, pci->mem.phys_start + pci->mem.size, pci->mem.size); - dev_dbg(pci->dev, "MEM bus: [0x%lx - 0x%lx, size 0x%lx]\n", + dev_dbg(pci->dev, "MEM bus: [0x%llx - 0x%llx, size 0x%llx]\n", pci->mem.bus_start, pci->mem.bus_start + pci->mem.size, pci->mem.size); if (pci->prefetch.size) { - dev_dbg(pci->dev, "PREFETCH space: [0x%llx - 0x%llx, size 0x%lx]\n", + dev_dbg(pci->dev, "PREFETCH space: [0x%llx - 0x%llx, size 0x%llx]\n", pci->prefetch.phys_start, pci->prefetch.phys_start + pci->prefetch.size, pci->prefetch.size); - dev_dbg(pci->dev, "PREFETCH bus: [0x%lx - 0x%lx, size 0x%lx]\n", + dev_dbg(pci->dev, "PREFETCH bus: [0x%llx - 0x%llx, size 0x%llx]\n", pci->prefetch.bus_start, pci->prefetch.bus_start + pci->prefetch.size, pci->prefetch.size); }