From patchwork Thu Oct 3 15:51:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 175149 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp573500ill; Thu, 3 Oct 2019 09:43:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqzeBXxq501lTJheyUJwQThOcBXSCcEjv08FdPOxbsTEhk3yHL1H/IOHzboMnAHXYj/Kn8o5 X-Received: by 2002:a17:906:8054:: with SMTP id x20mr1666702ejw.65.1570120990623; Thu, 03 Oct 2019 09:43:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570120990; cv=none; d=google.com; s=arc-20160816; b=iv6CeXsVRe5VPeCTRiQ4sI5i7NRIvo0JR+qjn3T/dlrRDNFaMhA0rTRSbT4OQON7Mk Et58gypPtm5qkQlTDjxiozZuh3G/w1RE2X5sDC7VEDm5cJBAqWCumVlkwGQwTDsoJlZd 0EnhprVHhUsAfM1kvZsY3JJO1InwiXMrIpCA8qkD8PwhH0PVi2uK6bQH0MfFgscDr/hA 37sUFOIjneKYJBn3KgNuCBg8CemygbiItexAin/s3oA4qRJy6D/vA2TIyR5NHuFTMlMT xh65Lv4TMnSh3kr7+wqVZ/sJqnDGzpNjhPRI1omva/4Y9A7y0kMmu1QYdZ7UhQD4dlJ5 E0jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=819/zZRTh8U71bIwoAdqwT6T0Ho1f1Lq8jZd+HlLp/U=; b=jbyGVnAwafPT0pUSJ+kMCc82ebvWA/YxUlUTzg4DD0BJTbT1/y9f7K8X4/agaiaNMA GXDYQdfzYHXN1d1P8HszqwyON+lu639oHnibF0PMoeSiWUr3xEGdhQq04o5sqFkeR5n9 0cbfAfF+dWXA9RahgYOBUwQTcvsWgH3RjRb5CdPE16zR/VBMaoNkm89HB3KGmm7F/ojF SHSi96a/hp8y40+AC3beuNNIqkWWduV1EzABqdM1KSJpRJ6pDAyaBDEKlLWhO4dAcjV+ yIUk3KYHL/1cudquXBeKu7D3slnUVw1NZZ4m3KbfcJmzd8WYSMc1JynbBPNjpZ1r/9tf QEpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=OQ8vi4L4; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f2si1582235ejq.395.2019.10.03.09.43.10; Thu, 03 Oct 2019 09:43:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=OQ8vi4L4; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391597AbfJCQnJ (ORCPT + 14 others); Thu, 3 Oct 2019 12:43:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:54422 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405111AbfJCQnI (ORCPT ); Thu, 3 Oct 2019 12:43:08 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1D7C32070B; Thu, 3 Oct 2019 16:43:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570120987; bh=dmdbnGlcQ67LSvX15BeOkemg/oVzkc782wV47LPJXig=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OQ8vi4L4Q3za7fyzVdZ8G868eigjkDhlDxL4s9klNb+R9wfLwbAVcPp3mXKAPBadX zHNN94E07VT/YlORpM9hs8YMlpni0O9Gl5w61RcTUOMYjIJfVCjcVWaj6Y4ChM/hdS F6/M94bTSgSOZPpKh4VMxHgjn31Y+GxdGJAsVtIs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Vinod Koul , Sasha Levin Subject: [PATCH 5.3 113/344] dmaengine: iop-adma: use correct printk format strings Date: Thu, 3 Oct 2019 17:51:18 +0200 Message-Id: <20191003154551.361789545@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154540.062170222@linuxfoundation.org> References: <20191003154540.062170222@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann [ Upstream commit 00c9755524fbaa28117be774d7c92fddb5ca02f3 ] When compile-testing on other architectures, we get lots of warnings about incorrect format strings, like: drivers/dma/iop-adma.c: In function 'iop_adma_alloc_slots': drivers/dma/iop-adma.c:307:6: warning: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t {aka long long unsigned int}' [-Wformat=] drivers/dma/iop-adma.c: In function 'iop_adma_prep_dma_memcpy': >> drivers/dma/iop-adma.c:518:40: warning: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'size_t {aka long unsigned int}' [-Wformat=] Use %zu for printing size_t as required, and cast the dma_addr_t arguments to 'u64' for printing with %llx. Ideally this should use the %pad format string, but that requires an lvalue argument that doesn't work here. Link: https://lore.kernel.org/r/20190809163334.489360-3-arnd@arndb.de Signed-off-by: Arnd Bergmann Acked-by: Vinod Koul Signed-off-by: Arnd Bergmann Signed-off-by: Sasha Levin --- drivers/dma/iop-adma.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) -- 2.20.1 diff --git a/drivers/dma/iop-adma.c b/drivers/dma/iop-adma.c index c6c0143670d9d..a776857d89c8f 100644 --- a/drivers/dma/iop-adma.c +++ b/drivers/dma/iop-adma.c @@ -116,9 +116,9 @@ static void __iop_adma_slot_cleanup(struct iop_adma_chan *iop_chan) list_for_each_entry_safe(iter, _iter, &iop_chan->chain, chain_node) { pr_debug("\tcookie: %d slot: %d busy: %d " - "this_desc: %#x next_desc: %#x ack: %d\n", + "this_desc: %#x next_desc: %#llx ack: %d\n", iter->async_tx.cookie, iter->idx, busy, - iter->async_tx.phys, iop_desc_get_next_desc(iter), + iter->async_tx.phys, (u64)iop_desc_get_next_desc(iter), async_tx_test_ack(&iter->async_tx)); prefetch(_iter); prefetch(&_iter->async_tx); @@ -306,9 +306,9 @@ iop_adma_alloc_slots(struct iop_adma_chan *iop_chan, int num_slots, int i; dev_dbg(iop_chan->device->common.dev, "allocated slot: %d " - "(desc %p phys: %#x) slots_per_op %d\n", + "(desc %p phys: %#llx) slots_per_op %d\n", iter->idx, iter->hw_desc, - iter->async_tx.phys, slots_per_op); + (u64)iter->async_tx.phys, slots_per_op); /* pre-ack all but the last descriptor */ if (num_slots != slots_per_op) @@ -516,7 +516,7 @@ iop_adma_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dma_dest, return NULL; BUG_ON(len > IOP_ADMA_MAX_BYTE_COUNT); - dev_dbg(iop_chan->device->common.dev, "%s len: %u\n", + dev_dbg(iop_chan->device->common.dev, "%s len: %zu\n", __func__, len); spin_lock_bh(&iop_chan->lock); @@ -549,7 +549,7 @@ iop_adma_prep_dma_xor(struct dma_chan *chan, dma_addr_t dma_dest, BUG_ON(len > IOP_ADMA_XOR_MAX_BYTE_COUNT); dev_dbg(iop_chan->device->common.dev, - "%s src_cnt: %d len: %u flags: %lx\n", + "%s src_cnt: %d len: %zu flags: %lx\n", __func__, src_cnt, len, flags); spin_lock_bh(&iop_chan->lock); @@ -582,7 +582,7 @@ iop_adma_prep_dma_xor_val(struct dma_chan *chan, dma_addr_t *dma_src, if (unlikely(!len)) return NULL; - dev_dbg(iop_chan->device->common.dev, "%s src_cnt: %d len: %u\n", + dev_dbg(iop_chan->device->common.dev, "%s src_cnt: %d len: %zu\n", __func__, src_cnt, len); spin_lock_bh(&iop_chan->lock); @@ -620,7 +620,7 @@ iop_adma_prep_dma_pq(struct dma_chan *chan, dma_addr_t *dst, dma_addr_t *src, BUG_ON(len > IOP_ADMA_XOR_MAX_BYTE_COUNT); dev_dbg(iop_chan->device->common.dev, - "%s src_cnt: %d len: %u flags: %lx\n", + "%s src_cnt: %d len: %zu flags: %lx\n", __func__, src_cnt, len, flags); if (dmaf_p_disabled_continue(flags)) @@ -683,7 +683,7 @@ iop_adma_prep_dma_pq_val(struct dma_chan *chan, dma_addr_t *pq, dma_addr_t *src, return NULL; BUG_ON(len > IOP_ADMA_XOR_MAX_BYTE_COUNT); - dev_dbg(iop_chan->device->common.dev, "%s src_cnt: %d len: %u\n", + dev_dbg(iop_chan->device->common.dev, "%s src_cnt: %d len: %zu\n", __func__, src_cnt, len); spin_lock_bh(&iop_chan->lock);