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: 95536 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp36162vqo; Wed, 17 May 2023 13:32:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5r6iOUVJvv2zL/ISK/SSlt6U/nYe7+9LgAkuzmhyOtZCQEFYgd43qQbw0IRAhCYXt8Qh5u X-Received: by 2002:a17:90a:7563:b0:253:38ff:be4b with SMTP id q90-20020a17090a756300b0025338ffbe4bmr57555pjk.47.1684355531935; Wed, 17 May 2023 13:32:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684355531; cv=none; d=google.com; s=arc-20160816; b=uYpgj5GM7f9zs20z0FurrTUHWxAitvGRzFMf9cxr4bj60AHMgf0WrYtDM2goP6UnRK 4jAQgPXSrbrcBLRY4N1ySrIh9p8OOAHxMnhTM242qoKlRjdfjzBGbZsRHiwdTjEvBEwM 2RvLSxxOkbUVYT9KPn3PR+tIba54aNcmCSpvBylBMLFR0XslshRk+GPKLkWwLC1v+gH5 agaJ0bviTga693LhZOs73N/FNB7VS+wU+1HlZ+P7/ymZH0b5T3mBN/xXpxMPQsuCEftF 0qwdHUwO5Gdoej9hW0dvjsAXS1VpjdfcSYaoO+qUsyY/hu/HSBO6RpimrmkphHXYQWT6 aKzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=w5pQcmhXuvHXZZp+HLxQwp+cpWDmYdUV4HoDyVV9JNQ=; b=NDBhskp2LH6frzcI6vmTf6QxpBhB0ok6m39k9gaNtMZ/OF7JwO6q7MRde6bnk99QbA 9LBz6EUymqjio1+Nx5ln/xT/+oU3iPm0MI3Zu7JHhrAkdr4xGiZgOaxUkm62B1kG2Xpj uBHCfewv7y/CD7rm21l2zPI566VJWOgZTIhkvvwc6f+p6RYToinRilrIUjLu/n1u91Ao SVb0ia5qiX3Z+Aa5p9x8B2DUwCN8Qi9hPg/Hu/59EWrm5fdZnYmS0thxIqyuoZX5o/1r +myjZZ0Dg048KZBMU5LzJX2iDZL5UlwHq537ErIcXSOFSAKMKw6IaaUasQOutQCQLj3f 0tsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dKTVy9RV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z10-20020a17090acb0a00b002496cedea8esi2519937pjt.24.2023.05.17.13.31.59; Wed, 17 May 2023 13:32:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dKTVy9RV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229647AbjEQUT7 (ORCPT + 99 others); Wed, 17 May 2023 16:19:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229448AbjEQUT6 (ORCPT ); Wed, 17 May 2023 16:19:58 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58B681FE5; Wed, 17 May 2023 13:19:57 -0700 (PDT) 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 E8E02636B3; 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-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766174786306527830?= X-GMAIL-MSGID: =?utf-8?q?1766174786306527830?= 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);