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 Kroah-Hartman X-Patchwork-Id: 175130 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp555158ill; Thu, 3 Oct 2019 09:28:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqxwP+YFvHasoSBYSXIvEEYAVhKQRupxwShTucqbmc01kXS8gVsNk/NmgvuPFKX0lpljcSVx X-Received: by 2002:a17:906:1e57:: with SMTP id i23mr8504250ejj.204.1570120112865; Thu, 03 Oct 2019 09:28:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570120112; cv=none; d=google.com; s=arc-20160816; b=eIt0ydmyK32yM80Rog2cvb6Y2DqzUdKyl27/eKp4mbTMiYhBs4E1vncotEJv7cW4/F Ie3bh7AVjvIq1P2L/x+lltcY42J4fr5G+hK1AndkdrcKy6+OVQ1V4RQJ717q+qCQxjI9 k+zzQbDiYf+3eA3Xj6TmuGhsPeN+NLPk215yM2QnWd+Jp/yuzHr/gyTmErVOty41LT3u 5LhCq6yU5Y88ISqX+Rg3SisrOUZ8hMD10UI+hDlAXYquKPV0mHAfBxmrwJjBSL6PtqDc FJZzS7girFvm0NDZM9kXYS2/ivFmCFHxD6QHiAcFi23J6EVFA2QpmrO7L6IA94D9CCoU bOiw== 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=YRefuwux4kEathvtRzXmyvJoYNJqWe6r4oHwtoDoiAZzLvQgnFkduo85HOZXrVz7PT 4FvN6+VWsWo3+liltQkGIBl8le33ViCvVfrim99MzBY/LAMdbyw67XtF0dML+CksqnhG iFEaL09iWSCxrIpVT1AkO7IjlX2oNZAf5pDzMdG4+1CBowwpDgvOmWjqVjJJ89abW4os TpORKmvd0K3ifXbkYU3PpUp2BpfP/UW0BNxGbkzRWadXkJFFPHXcOzaBfGAGpowEx09T 7Iao6zhWvvzG78uudOKiaKrJKcTr+Z61/JyPagsUPd6aFR3XGlSs6pbqxwnCReXPWqsO j7zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=my5hyzm6; 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 c9si1788053eda.229.2019.10.03.09.28.32; Thu, 03 Oct 2019 09:28:32 -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=my5hyzm6; 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 S2389308AbfJCQ2b (ORCPT + 14 others); Thu, 3 Oct 2019 12:28:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:32930 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730116AbfJCQ2a (ORCPT ); Thu, 3 Oct 2019 12:28:30 -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 BAF5B21A4C; Thu, 3 Oct 2019 16:28:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570120109; bh=dmdbnGlcQ67LSvX15BeOkemg/oVzkc782wV47LPJXig=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=my5hyzm6vYTIvyTwPuGN5/+GR9Ng+KHeFlPtJK0FAYwYOn5PJFVkMukBoFiv3lpMg Cjk7BVee2LRkEAmjNVSjf0oucqSCa6x/Mr+3uGQ7HElmGQ8Fxe3g8oL4s0mxLLmrrq qNmb6vC8QBvLLGpvGd6VsHLI95lkxlHm1qOL+VMM= 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.2 100/313] dmaengine: iop-adma: use correct printk format strings Date: Thu, 3 Oct 2019 17:51:18 +0200 Message-Id: <20191003154542.760274754@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154533.590915454@linuxfoundation.org> References: <20191003154533.590915454@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);