From patchwork Fri Aug 9 16:33:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 170959 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp10236590ile; Fri, 9 Aug 2019 09:34:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqwFhoIvzjMIgGXpokhSVihcNdyOp0hge0+Jj52+2gLiqONjcjXGIr2Y9dwC1N41LQ3oc5o9 X-Received: by 2002:a17:902:a712:: with SMTP id w18mr12569724plq.274.1565368442316; Fri, 09 Aug 2019 09:34:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565368442; cv=none; d=google.com; s=arc-20160816; b=xG1pbVX4T10FjQ5oBA7E9i6EML9xWlSFbKsOwM7470TFv9HvaYG89Nna8CsfLBKHJC USAZDrwTqtGQVWYAbZsFj8bzytKSkA9IcBKPeslK3AEOrBjnnNIZucVuqCmkPL2vyT0B QettkobswNxa3sx47aopCl0/KSvPBaET+dbCvezYJ2Tk5hyn47v85345JwBpozeoboE7 s/4VWrC6lngQ7DmwswKYmnGQyGXxmSqGloz6HDbTNTzaCs6vTUKw9SeVbf06S2Pk7px4 W6kO5bm/vO9yPSAxQJu+ybQDp1eUCeNZFzsWNgvpmtpaqGI+2Qgl0jS4rRIe8YFnG1sU Ajew== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=hqbZrt+/GBJaVFud82CXSB+QHNyLNoEvs9bu1P81nN8=; b=A8sL52NMS51jrycXTRaBF/n0a+X0atTS1G20vd3Vei+FAUv0eyQFaqpDjRjDSatAIX 0KfPnQj0E/VpDx95JTRJC9WqYrv83aVLNgKtL2MHxn1JuEg6sdua9lgLPw2DuYWun8f9 X3d3WQibI7q97RLa7/KuDRFsRvc1GTmHJhEfKiIzJnZuf5qEdheoof861OVj9bUM6L8b MXeRgDv5UlzTCTA27p6oh1f5wdVqlE2SgtRVdtmU2kRx4zgi+1Q9KLO011v0luGCymyc gE5EIgm0DtUoCRF8H3B/eKir9DI8701b7R82b/fk0JQZszyr9XYn+lMpG+IXbF+2oU5G zxYw== ARC-Authentication-Results: i=1; mx.google.com; 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 cl14si25178855plb.341.2019.08.09.09.34.01; Fri, 09 Aug 2019 09:34:02 -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; 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 S2437180AbfHIQeB (ORCPT + 28 others); Fri, 9 Aug 2019 12:34:01 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:43109 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2407445AbfHIQd6 (ORCPT ); Fri, 9 Aug 2019 12:33:58 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.129]) with ESMTPA (Nemesis) id 1MwQGj-1iCHo22V1R-00sLsu; Fri, 09 Aug 2019 18:33:43 +0200 From: Arnd Bergmann To: soc@kernel.org Cc: Arnd Bergmann , Russell King , Dan Williams , Vinod Koul , Linus Walleij , Bartosz Golaszewski , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, linux-gpio@vger.kernel.org, linux-i2c@vger.kernel.org Subject: [PATCH 3/7] dma: iop-adma: use correct printk format strings Date: Fri, 9 Aug 2019 18:33:17 +0200 Message-Id: <20190809163334.489360-3-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190809163334.489360-1-arnd@arndb.de> References: <20190809162956.488941-1-arnd@arndb.de> <20190809163334.489360-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:K2Gx1fY8Ljd2NDS0Jw6+u8SOqS2PIq6MXC+1tPMpqkPHMkN2W/I iUBsOGMIfYW0btXkuSVHgws6TSChnnyEjdPzKqoXg730XHuYfskdrup3mtEge1rLJ+RCNvQ GQbLW5G77AESmvtOHKekKJvRWjugWQADMHgElxGI6TZPj1M/u2a4Z8vgEVUsbkqZx9E69wR Q+AKv4g8mPLpqgrMovg+g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:QlJroodNYQw=:7aGy8w9I7kaBCshH9xaCjU wXcGD7f/tjxfwmYWN0zF6a6BNWSScNC/Is7ufjpFaHt2cDsuBKoX3K3cuXluPLwW6I3Qisz3m U+42mPjMLyNFXswlSWWkloOyq+wzFchxwUWpSBj7/RUTP4lyyyI371+rz3Wc3bFpy8G1XkncX LoovGzApYsKtu1YPo1rEDONjs4MydfqiVD6Wg32W2qIqY5K8vWcPuJBEK5Cb+0/efGgbsNQV7 V3wOvTjX70IxhULQLgAOMt2Bb4YJgU1rztLd+tOvjMRSAFBjDz/Zd7yLOvgx8lGvyRcQFrSh4 rWTbIxgkc8UNl+eNyAsDeUi8uOphzhhXMi9NhAm9eGpMfZ+X2VEEkWvst5wPCoK2BkgLtu9iX pz3uTyHAQmgP78WyaeDMfD2uTJdp0eqjnxj/uy9YlSZm8RVQqeM99+n9825SzW0xxl+GQvu0N UwMPpWclDbP+vbdalZWzI5/8G+R2l5XV7wknLNi/L47H7ak53NkcdoXB+EbsO9mVne++T9wmn dcjnvVDeJ9qTx7yl7+w4dLPEtykr+QZ2wNwJ3vCqyKeDwFVkNcGJjk36HA7Zigxn8acuLL603 M5dXoM+K4YhwfCd74Vhb5K7ND0GQ5kYbSogwdlOihfCjtVVqF51qXlKOnxfj02+v7s2e/sDsR pgZ94SPPF4hfRTom/6Acj8gyvdZq2e569om+DLW6j7bdszTGSgVGdr3oT+fRdUmHuG0RJ3tWd 18Cx/AYE/Vj++D0bSBIgCfsEps3UlwrZw+gGjg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Signed-off-by: Arnd Bergmann --- drivers/dma/iop-adma.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) -- 2.20.0 diff --git a/drivers/dma/iop-adma.c b/drivers/dma/iop-adma.c index 7857b54770d1..aebdd671651a 100644 --- a/drivers/dma/iop-adma.c +++ b/drivers/dma/iop-adma.c @@ -117,9 +117,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); @@ -307,9 +307,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) @@ -517,7 +517,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); @@ -550,7 +550,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); @@ -583,7 +583,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); @@ -621,7 +621,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)) @@ -684,7 +684,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);