From patchwork Fri May 19 09:34:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 96337 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1110605vqo; Fri, 19 May 2023 02:56:11 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ79n4Hpyn4tZZvglDG6ZBRU5t78LrPqAKGQY8W5gA6jqrAdtFBKzoI/xj8SFEN1WlplK0is X-Received: by 2002:a17:903:26d3:b0:1ac:6e1f:d19c with SMTP id jg19-20020a17090326d300b001ac6e1fd19cmr1962007plb.41.1684490170838; Fri, 19 May 2023 02:56:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684490170; cv=none; d=google.com; s=arc-20160816; b=ZyFDYCn/H4NVM4c/i2gaNT/RuV+peM8JclxjyKnXNdQgFKhnRaLZq/Agg1CxR2WfLR A41AQTioSy6vAxhjXVHSJgDc04Dzc53+Ly8zUW96fXO0JEnZ/YraM4cddZgjlLhAHj95 AfFGIu51mlFIGPBCchqOqbqQpiByX6HhCr844ty8fMmz1+1krOZhItWVx4n0I+XMJLTZ ReYQdP54fQJbcHsTQ6hiCN5wbEhpFOOCtuHS3WpAxIvfh6E9jcx8peAMzTZsJ+UWAAWH Z0dX/JXYEDwpR4SEi9FNWHqVsHgWlHmdY6+o1/KT1DekDSm23tqDFja6vMWqI099OZCX jTdw== 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=++AtMLdTHHHsLChJeOGz/QqUlgZQBrR9bXUNPk4Vqho=; b=pgYyzdCaCyl4sMEy+zt/FGJcOwu5kNzBrfvV0xwE9cmuWMi97Lj5P/DninlDV9PMt6 tSwTYPB5aisIWzENGjXMwYINaZqDGqbY1RzRQWmaGxnOcIwOaeDhpxbLxUwAWUgASMxN 9AZlfQR15METZmVKYyZqITomfbCwTMrWNVVyHbjPsUkJW9NqWEAEIuxRffQ7gA/5aP2w GUzgQ943bJtoyao+mjtU+171c1N2+4XeVdyLggMLsMnP64BP7QkvkRdfRPSYz0gYuP2J 7gMClQd29RUtxKsA2Yuhj/HKnqUQfFOLQQSegsqoAYQsXw6TCXagFoCa0pT5ydVFhgRR 9efA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="F/3GLRHw"; 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 f2-20020a170902ce8200b001ae8b0f8491si210761plg.454.2023.05.19.02.55.55; Fri, 19 May 2023 02:56:10 -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="F/3GLRHw"; 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 S231727AbjESJgp (ORCPT + 99 others); Fri, 19 May 2023 05:36:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231772AbjESJg1 (ORCPT ); Fri, 19 May 2023 05:36:27 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AB031BC1; Fri, 19 May 2023 02:36:00 -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 59C0A655B6; Fri, 19 May 2023 09:34:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1AB93C433EF; Fri, 19 May 2023 09:34:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684488892; bh=LAoKjMeFQXh9WKY0mviRB9jJBiyu4k4R57L17sXUcpQ=; h=From:To:Cc:Subject:Date:From; b=F/3GLRHwi6iVYpdhFPhRF1YVpQnKl0RmfNAgxXmXJRGW6yigVmLWXuaaGAYage971 OFvBGWZmieCFmAmpr5XqpL8O/67Vte/QeVkxtkjiGBiUPnTv9JrinKxOr9wZ2NJSU+ 3xPQBfz4ehvL2qGwMoEQAcYsHLUs/8F5wOxmiC2UY0ZP1dz9aEwvV6RhPjyDmFia2r TGgiOJNZRZjrx/9kaDmWvUOjUIKQNi66r8Cw6qKKSGBP5zsF2R3JBPoOKWaiSmkCjU HpDUCAUalun0TpDRA7oBhLR/nfmDHVIfEy3hi5EvaVQVRH3pJScXgTy5+wlERDGjhh fTucJeEuDxCFQ== 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] [v2] dmaengine: ste_dma40: use proper format string for resource_size_t Date: Fri, 19 May 2023 11:34:38 +0200 Message-Id: <20230519093447.4097040-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?1766315965187801794?= X-GMAIL-MSGID: =?utf-8?q?1766315965187801794?= From: Arnd Bergmann A fixup for a printk format string warning causes an out-of-bounds variable access as the %pR string expects a struct resource instead of a plain resource_size_t. Change both to the special %pap and %pap helpers for these types. Fixes: 5a1a3b9c19dd ("dmaengine: ste_dma40: Get LCPA SRAM from SRAM node") Fixes: ef1e1c41a11d ("dmaengine: ste_dma40: use correct print specfier for resource_size_t") Signed-off-by: Arnd Bergmann --- v2: fix up incorrect fix misusing %pR --- 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 8e9c02f83fc7..803c65cd6712 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 %pR\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);