From patchwork Wed May 17 20:19:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13245647 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 27F07C7EE22 for ; Wed, 17 May 2023 20:20:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=hN2+XOnWyVBchduUDFgYbxyA6k8XzuZ944WgIHvuDCw=; b=B1xuOfeDg7MfoG tZFEJir2CrfL1y1DoLvux6VUObKD5lDkax6UCgJZ309UY43Fl9giO+IbwscfhEeZEboXo28Q55qHG sFGTd4caMkg8mWajoJyec2xoepHrzdcDXs/8bJoVElMy0eARVcZX9+3eLGCIjCCbuYe7GRnJk8CIa u9Zf2t2RAt4t60Tjx6R7j8CstaGqSeCUyL1Z4G74j4GxMWrPLO41BfsSMnpXEsGI6glX4IupdHmF2 USC12Au/+BbqHf4/G47sdD9pb6PG/OnwBdIzhXUpybBW7/Mhxm+62Gxp9ZhLT/FqJQOtyvKEBIhIY XdevrATxf9iIYA1M36+Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pzNcu-00AyWC-0n; Wed, 17 May 2023 20:20:00 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pzNcr-00AyVC-1F for linux-arm-kernel@lists.infradead.org; Wed, 17 May 2023 20:19:58 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E8B4564AFE; Wed, 17 May 2023 20:19:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9214EC433EF; Wed, 17 May 2023 20:19:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684354796; bh=h3i1Kbtu2+A1CAmny+IHIGNGTx6Ino27EpoDhBCMCUg=; h=From:To:Cc:Subject:Date:From; b=dKTVy9RVKLUOGSJm4GI2wiXXavIxvJWRQOXFML1qF5dX6IQv/j/BQ6OaaGy1EZqrF QjDxyEbxGDQMGJU6/anHP0DmQ1SbRsrsqNQd+pDZ/H+Na1pefAzI2HHDI5F+wEXZgx 1HOHkb86GpqWY1YuS/jZ/Q1TACdvCNg/xWDInApnYvb875r1BuhPrO41mIt5fh1nEI akTM8FKO4g1jA4i1ku59nOLBOhiEh3Jcdy9CH0ndt1QvULB22Ks2YcRN6t0KAFbhbm 9LbEfcVyimFeGNWIdT9yHa1J4HlFev9CcniTZC+iStMbCy37giqWRUAR8saClYm0zk DptvrOxjgrWLg== From: Arnd Bergmann To: Linus Walleij , Vinod Koul Cc: Arnd Bergmann , Julia Lawall , linux-arm-kernel@lists.infradead.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] dmaengine: ste_dma40: use proper format string for resource_size_t Date: Wed, 17 May 2023 22:19:47 +0200 Message-Id: <20230517201951.619693-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230517_131957_466589_BB5E4B87 X-CRM114-Status: GOOD ( 14.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Arnd Bergmann When LPAE is set, both the dma_addr_t and resource_size_t become 64 bit wide, causing a warning about the format string: drivers/dma/ste_dma40.c: In function 'd40_probe': drivers/dma/ste_dma40.c:3539:23: error: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t' {aka 'long long unsigned int'} [-Werror=format=] 3539 | dev_info(dev, "found LCPA SRAM at 0x%08x, size 0x%08x\n", Change both to the special %pap and %pap helpers for these types. Fixes: 5a1a3b9c19dd ("dmaengine: ste_dma40: Get LCPA SRAM from SRAM node") Signed-off-by: Arnd Bergmann --- drivers/dma/ste_dma40.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index 9ff6dd9e2fa2..dbc988cfc4bf 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -3536,8 +3536,8 @@ static int __init d40_probe(struct platform_device *pdev) } base->lcpa_size = resource_size(&res_lcpa); base->phy_lcpa = res_lcpa.start; - dev_info(dev, "found LCPA SRAM at 0x%08x, size 0x%08x\n", - (u32)base->phy_lcpa, base->lcpa_size); + dev_info(dev, "found LCPA SRAM at %pad, size %pa\n", + &base->phy_lcpa, &base->lcpa_size); /* We make use of ESRAM memory for this. */ val = readl(base->virtbase + D40_DREG_LCPA);