From patchwork Mon Sep 25 12:56:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 728201 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (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 8D9E5CE7A94 for ; Mon, 25 Sep 2023 12:58:21 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id EAE2ADEB; Mon, 25 Sep 2023 14:57:28 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EAE2ADEB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1695646699; bh=v1QQpPt7YcIPHxVTsqMuncLT5mIT7SksokPj6/CvQns=; h=From:To:Cc:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=j0T5nBt0sayXIfeFfXJHO++Ksgkz5P5I5QnBNXPjmVvgfEOt/RE0xRMjNo8wDwID8 3xIH6dhkJNYijgdRLoE8bqvt8qKzWBDnhrKJUsGgLHxrJAG97lgoh4VCWlfLbOSknA IrYoE+WC35CsbPAQKcsLTfCOUqUyOH3Mg1q0zX/s= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 82C9DF80552; Mon, 25 Sep 2023 14:56:59 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id EBB7DF8016A; Mon, 25 Sep 2023 14:56:58 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A9B4FF8016A; Mon, 25 Sep 2023 14:56:54 +0200 (CEST) Received: from albert.telenet-ops.be (albert.telenet-ops.be [IPv6:2a02:1800:110:4::f00:1a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 84379F800AE for ; Mon, 25 Sep 2023 14:56:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 84379F800AE Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:ee18:727e:6235:2ac2]) by albert.telenet-ops.be with bizsmtp id qCwn2A00B4XpEKH06CwnFJ; Mon, 25 Sep 2023 14:56:48 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1qkl8R-004XvW-64; Mon, 25 Sep 2023 14:56:47 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1qkl8p-00FRoC-3P; Mon, 25 Sep 2023 14:56:47 +0200 From: Geert Uytterhoeven To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Manuel Lauss Cc: alsa-devel@alsa-project.org, linux-sh@vger.kernel.org, Geert Uytterhoeven , kernel test robot Subject: [PATCH] ASoC: sh: dma-sh7760: Use %pad and %zu to format dma_addr_t and size_t Date: Mon, 25 Sep 2023 14:56:46 +0200 Message-Id: <20230925125646.3681807-1-geert+renesas@glider.be> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Message-ID-Hash: JLRSYRUJ4F4EMIM6XJAXNDHTM4NSFSED X-Message-ID-Hash: JLRSYRUJ4F4EMIM6XJAXNDHTM4NSFSED X-MailFrom: geert@linux-m68k.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: sound/soc/sh/dma-sh7760.c: In function ‘camelot_prepare’: ./include/linux/kern_levels.h:5:25: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘unsigned int’ [-Wformat=] 5 | #define KERN_SOH "\001" /* ASCII Start Of Header */ sound/soc/sh/dma-sh7760.c:198:9: note: in expansion of macro ‘pr_debug’ 198 | pr_debug("PCM data: addr 0x%08lx len %d\n", | ^~~~~~~~ Fix this by using "%pad" and taking the address to format the DMA address. While at it, use "%zu" to format size_t. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202309250903.XNAjFuxy-lkp@intel.com/ Signed-off-by: Geert Uytterhoeven --- sound/soc/sh/dma-sh7760.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/sh/dma-sh7760.c b/sound/soc/sh/dma-sh7760.c index 121e48f984c50cab..85fe126233528252 100644 --- a/sound/soc/sh/dma-sh7760.c +++ b/sound/soc/sh/dma-sh7760.c @@ -195,9 +195,9 @@ static int camelot_prepare(struct snd_soc_component *component, struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct camelot_pcm *cam = &cam_pcm_data[asoc_rtd_to_cpu(rtd, 0)->id]; - pr_debug("PCM data: addr 0x%08lx len %d\n", - (u32)runtime->dma_addr, runtime->dma_bytes); - + pr_debug("PCM data: addr %pad len %zu\n", &runtime->dma_addr, + runtime->dma_bytes); + if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { BRGREG(BRGATXSAR) = (unsigned long)runtime->dma_area; BRGREG(BRGATXTCR) = runtime->dma_bytes;