From patchwork Thu Oct 3 15:52:19 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: 175181 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp620127ill; Thu, 3 Oct 2019 10:20:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqy8OxTjxRlDEJDjYaZq7hVoPPNR/bzwTzfczWpLj7oboYhhLDlF9h4QvNb3hyk92gfRo8Xv X-Received: by 2002:aa7:df14:: with SMTP id c20mr10732831edy.133.1570123212862; Thu, 03 Oct 2019 10:20:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570123212; cv=none; d=google.com; s=arc-20160816; b=USU2oneGTSIEJ6Hhix/uvwOc4BwmtJn9PbmGnoVids+pQxa5xFTM5GmmYP/6/AXiDM GsNjvId7YRBCyIgebs4+GIUxy3PYYfTnOYKK/xk7qdFO6y+g2ZtnxznMsvBUeWrG/teH y+RP5uuPit0nlc9ano2W5LOTOzBwdDVgX9X2/+YjvjMdEURQC/dP2HtnXiH6Y7NRmKB7 nyzJYZvrm5BBxEPU6UrvHsuhzIt7sWJKLxUg8nNFl9L4tUvIwz7waeDvGynwX6M3SxzC oU/KX87z21NYtYbqetXQX8hzJzUJktDYl6RKbFokEQsjeI7jfupuDuvOGCOD768m78k2 yvZA== 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=5R13D3I3AaMwlb+m81wivDuZHa5HsF2F5a1qRkuyBvg=; b=o9ZVjhqyrF2on5hrdzwLgbMPRVVM5nQh4J8d+8TtpW+rnr5wBS1ZZ3P1S9X4GTAWT8 4I7gx7l8GRRsA34bygIf5fuX6+Y20m9+WSJ0yZYwuY7uOaNHTZ9YCWIiyx+EFnSdlGGX BozbRSGzASAPRVNIAmxh8UWY2lJvBkXCDkor5Nz4Lb9BnQ2MsUMsa59G7hy1R/2Q8rjK QS4GHMpwvkLTptSlrG2jSnA92G628cwpTpA0Yz7WtE+uPk9I/QUILCnqrktMNx8VKSSu PNy9Sc2eWEMHXBtfoq2sVNorNdVr5n29uATHJeRP4uJ/24xakwnWS692Pj/fX36bRkyz br8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cl3iIDIP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 i17si1602939ejy.374.2019.10.03.10.20.12; Thu, 03 Oct 2019 10:20:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=cl3iIDIP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391008AbfJCRUK (ORCPT + 27 others); Thu, 3 Oct 2019 13:20:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:45652 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388806AbfJCQSy (ORCPT ); Thu, 3 Oct 2019 12:18:54 -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 3F66D215EA; Thu, 3 Oct 2019 16:18:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570119533; bh=d4ncFyiCsd77a457JAwmaPtaDLK0wuqOVsHZty0nllA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cl3iIDIPzWye/+hBgRNcbeDGIbey5WPY1IpVDqseQdnH2swkTGHNtjlNDt7zxtVrY XfNOfvecHs/BosCu5K5zqITLJzT2G2UPqjYTpghtxyP66RzZn6SdCJswp2C+2VaJph ePexUnVBNnAA9GacgCKUNyjg8iwhTHlCRgfJttX4= 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 4.19 073/211] dmaengine: iop-adma: use correct printk format strings Date: Thu, 3 Oct 2019 17:52:19 +0200 Message-Id: <20191003154504.592616869@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154447.010950442@linuxfoundation.org> References: <20191003154447.010950442@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 a410657f7bcd6..012584cf3c17b 100644 --- a/drivers/dma/iop-adma.c +++ b/drivers/dma/iop-adma.c @@ -125,9 +125,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); @@ -315,9 +315,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) @@ -525,7 +525,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); @@ -558,7 +558,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); @@ -591,7 +591,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); @@ -629,7 +629,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)) @@ -692,7 +692,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);