From patchwork Thu Dec 8 21:57:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9467197 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A104760231 for ; Thu, 8 Dec 2016 21:58:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 954A228619 for ; Thu, 8 Dec 2016 21:58:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 89D162861B; Thu, 8 Dec 2016 21:58:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1AFE728619 for ; Thu, 8 Dec 2016 21:58:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932564AbcLHV5r (ORCPT ); Thu, 8 Dec 2016 16:57:47 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:50287 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932557AbcLHV5q (ORCPT ); Thu, 8 Dec 2016 16:57:46 -0500 Received: from wuerfel.lan ([78.43.21.235]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.145]) with ESMTPA (Nemesis) id 0LilTh-1cmnQD2F5h-00cwTU; Thu, 08 Dec 2016 22:57:36 +0100 From: Arnd Bergmann To: Saeed Mahameed , Matan Barak , Leon Romanovsky Cc: Arnd Bergmann , "David S. Miller" , Daniel Jurgens , Tariq Toukan , netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 1/3] net/mlx5e: use %pad format string for dma_addr_t Date: Thu, 8 Dec 2016 22:57:03 +0100 Message-Id: <20161208215727.44841-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 MIME-Version: 1.0 X-Provags-ID: V03:K0:lab+ueaZBYUYo5sUQY2C3cug9aRPKRhcnbQzeJQs/ZJhCjRrUVl QI6H7YBFmpDnmKvrATvw0688PNSPDqr8CRAungfcvneRftUQLm9NCXa8ce7Y2pl0CdXGbOb wdKt9jcNsv/Bj0+esIslL7u9o1FntJPnWfM6euYKVn6q0u3rNbHq7mZ6VqGpI3DiWK9Ajlg Mguc8ebRsjr7FurJtJPEA== X-UI-Out-Filterresults: notjunk:1; V01:K0:K4y8uIHnk70=:UqnFrO5yto3c9tPqFTqcxo UxvOiQo9dvGnt3SX/tBkqmO+pNhV32eS/0eENJKRwzpu5Q58qSuM4VjHN7Y9ckKXXiyQRkgxc ugR3KEv4LuyMe97pD+KWIbrAcHmmfparXOFCKCeiVFJ6McYstwestFS2sSgNO8w21AtBCuCeT PMgvDp1dqunTKOCaNW4waBblBWnmC6WNd9i7wFzCM6aOF42Qfy7NlguTFBHVVOAoUgncSDqLP jvEY61Ij5nl16gn+ojZehOXH13WN+8XlQwemMRJz0vtnEv45I74hMbBj+tdEeTayv65E2NG46 yC477FvtWvXVtmj5NgGqmYuEt4SyhB2vJUVRnww9zp1o+lMzk8SB0JcBqlNXz4o5r5kgKp8z7 OplwW/O4BRUsF1Cdzu2GlIcH0D3qt4vCl5iRHFuJD/CI2DZFYa2VFmwfKi3AmiYM1CnbQDIPN Alo7ZveYtJCAGRRmR9F6WvH/Ia+28UhX2GiA5aKHZqVH1Pb0vzCp2j/5IjyomKq78F41hioiY TCgNs7104ay+iqzpwb7QDQmQtoZjWlJSqamiPtFXx3h57tj+IlybbLzUPapHijAM21/RWAofZ aZg76HJMbqaoEM/LVhVVYrflkWX9xEDb6UKy/K6hZGrHuHBePIpVpLidU/jKtxluVC9kDGYFj U6XTrqT6jt4iSAhSJRpc1fZKEUmXt5BgDV3GwYgakggXmWYF2XeHGMrZKPCnBbCL74a/VHbbq gImp5DcB9y4gE6pI Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 32-bit ARM with 64-bit dma_addr_t I get this warning about an incorrect format string: In file included from /git/arm-soc/drivers/net/ethernet/mellanox/mlx5/core/alloc.c:42:0: drivers/net/ethernet/mellanox/mlx5/core/alloc.c: In function ‘mlx5_frag_buf_alloc_node’: drivers/net/ethernet/mellanox/mlx5/core/alloc.c:134:12: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] We have the special %pad format for printing dma_addr_t, so use that to print the correct address and avoid the warning. Fixes: 1c1b522808a1 ("net/mlx5e: Implement Fragmented Work Queue (WQ)") Signed-off-by: Arnd Bergmann Acked-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/alloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/alloc.c b/drivers/net/ethernet/mellanox/mlx5/core/alloc.c index 44791de5afe6..66bd213f35ce 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/alloc.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/alloc.c @@ -130,8 +130,8 @@ int mlx5_frag_buf_alloc_node(struct mlx5_core_dev *dev, int size, if (frag->map & ((1 << buf->page_shift) - 1)) { dma_free_coherent(&dev->pdev->dev, frag_sz, buf->frags[i].buf, buf->frags[i].map); - mlx5_core_warn(dev, "unexpected map alignment: 0x%p, page_shift=%d\n", - (void *)frag->map, buf->page_shift); + mlx5_core_warn(dev, "unexpected map alignment: %pad, page_shift=%d\n", + &frag->map, buf->page_shift); goto err_free_buf; } size -= frag_sz;