From patchwork Sat Mar 5 00:04:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102605 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp349949lbc; Fri, 4 Mar 2016 16:05:07 -0800 (PST) X-Received: by 10.98.93.211 with SMTP id n80mr16264297pfj.61.1457136307600; Fri, 04 Mar 2016 16:05:07 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c74si8936472pfj.65.2016.03.04.16.05.07 for ; Fri, 04 Mar 2016 16:05:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-scsi-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-scsi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760507AbcCEAFG (ORCPT ); Fri, 4 Mar 2016 19:05:06 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:51056 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760491AbcCEAFF (ORCPT ); Fri, 4 Mar 2016 19:05:05 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue102) with ESMTPA (Nemesis) id 0MCqZf-1akU1Z07nf-009fvV; Sat, 05 Mar 2016 01:04:58 +0100 From: Arnd Bergmann To: "Nicholas A. Bellinger" Cc: Arnd Bergmann , Varun Prakash , linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] cxgbit: fix dma_addr_t printk format Date: Sat, 5 Mar 2016 01:04:41 +0100 Message-Id: <1457136294-2229829-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:FLORESTPKICLHgn0IZ06dC0tN6fiWci0vADgxlup/mXiJfTHb2j FDk7EWMoN5C1MocumyhJwEvnNpdsYg/f2EMQbM1cx7tuEi2ota50pBGCRiQ2UscOTcSbisz Lsd56jy1wclrqBRX3OfWc+wcSyF22cVB1zPOP0MqRbYUXHu5KyfPj/KAqFIAE+pMaeWuGkh 2sXJFbaNgybK/crbhf3pg== X-UI-Out-Filterresults: notjunk:1; V01:K0:u/xkTBiJl9Y=:yp4pzD0vxfuKB7eHMZA92S rJ3M+qKlWOG53pwLh9bOzxTGgB/ix0J6fAcH9LZ9hd9M6giN8UYZrtDzOw8sDeO3xMGagjiRC wklC86mqbIrEE4omkL5GfgIylmDyWCilhbYINw8jXB7b6xOoQxJ4i9fjtiV4iK5ajxMn0gAuS tPAUmtPLuK+Aotnf19IR9mG+5qPxp6jtKtm+0waCKtPs+q1TnIvsev4cJDFZeOqIVwhmCBlKf uEg05WPAa+atTFJLYm1jrpWUle9LnKnp7HqdYcN8nUt/1ADIT5lPkB0JPypdiqiCAnXySOT8W oya1Wba4ztz5B/dGjqU7wgIJPeP8vKM3emFoTyBUe5lmd4VdHLV6DzcaH1qIcN67hOj2WcD2u w2MmyTTRViUCInVoUZGj6x0uzuxCa9O3vFg3Wa34X6TVpyqEC5wHbmOxw2COh0MGi1YsgFSqM hd+nVqOZ4yC8BoapB/1uuco+PCnYTGWsJb4Qnbc9BvoBGa4k/TcUoaFsheHYyBELHhF/eGtNm wEciF+/vZjok6Il/tRJ2xg+55kCvWEkY+7MWfNcSgIxWGB577xshYhMLt6aVg551eqNYW9jXH pUEKa/ek+GFwieScfZTneqMT8IafaT6zCSVj/AvA9tgaWiogQO+LPTUwa7YDMIN1VoGK7uTlv 4XqIVZWZXNKzCUHR06F9q9o6+SZIUpRPhAfS8yd/pjqVYeKC8FgxmYllzwUAu2w7/lHk= Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The newly added driver prints a dma_addr_t using the %llx format string, but that is wrong on most 32-bit architectures: drivers/target/iscsi/cxgbit/cxgbit_ddp.c: In function 'cxgbit_dump_sgl': drivers/target/iscsi/cxgbit/cxgbit_ddp.c:180:10: error: format '%llx' expects argument of type 'long long unsigned int', but argument 8 has type 'dma_addr_t {aka unsigned int}' [-Werror=format=] pr_info("\t%d/%u, 0x%p: len %u, off %u, pg 0x%p, dma 0x%llx, %u\n", Unfortunately, we can't use the %pad format string here because we are not printing an lvalue, so we have to add a cast to u64, which matches the format string on all architectures. Signed-off-by: Arnd Bergmann Fixes: c49aa56e556d ("cxgbit: add cxgbit_ddp.c") --- drivers/target/iscsi/cxgbit/cxgbit_ddp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.0 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/target/iscsi/cxgbit/cxgbit_ddp.c b/drivers/target/iscsi/cxgbit/cxgbit_ddp.c index 07e2bc86d0df..d667bc88e21d 100644 --- a/drivers/target/iscsi/cxgbit/cxgbit_ddp.c +++ b/drivers/target/iscsi/cxgbit/cxgbit_ddp.c @@ -179,7 +179,7 @@ cxgbit_dump_sgl(const char *cap, struct scatterlist *sgl, int nents) for_each_sg(sgl, sg, nents, i) pr_info("\t%d/%u, 0x%p: len %u, off %u, pg 0x%p, dma 0x%llx, %u\n", i, nents, sg, sg->length, sg->offset, sg_page(sg), - sg_dma_address(sg), sg_dma_len(sg)); + (u64)sg_dma_address(sg), sg_dma_len(sg)); } static int cxgbit_ddp_sgl_check(struct scatterlist *sgl, int nents)