From patchwork Mon Feb 1 16:34:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101004 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp130869lbb; Mon, 1 Feb 2016 08:35:38 -0800 (PST) X-Received: by 10.98.11.143 with SMTP id 15mr9116199pfl.134.1454344538628; Mon, 01 Feb 2016 08:35:38 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x16si47264437pfa.181.2016.02.01.08.35.38; Mon, 01 Feb 2016 08:35:38 -0800 (PST) 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 S1753654AbcBAQfg (ORCPT + 30 others); Mon, 1 Feb 2016 11:35:36 -0500 Received: from mout.kundenserver.de ([212.227.126.135]:61391 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752590AbcBAQfe (ORCPT ); Mon, 1 Feb 2016 11:35:34 -0500 Received: from wuerfel.localnet ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue005) with ESMTPSA (Nemesis) id 0MAAfN-1aF1xZ0KvB-00BOyP; Mon, 01 Feb 2016 17:34:56 +0100 From: Arnd Bergmann To: Doug Ledford , Sean Hefty , Hal Rosenstock Cc: Greg Kroah-Hartman , linux-rdma@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] staging: amso1100: fix format string for 64-bit phys_addr Date: Mon, 01 Feb 2016 17:34:52 +0100 Message-ID: <2307631.X1DYNXxKPZ@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) MIME-Version: 1.0 X-Provags-ID: V03:K0:ue22fc2MWOW7OVOjdaZ07jEnRqmfNO/2dgIzGyCv6XxxcOLrkMK JJiE6Yykj4d7flv4Lj2+kn7OHuhGAmvt39vdq2FaIOoVYdqU5Bd1GFe9N+SLbO7/dOpwsyf SSjyzzM+cvDzC9oOGI6Rvq7yHlj7BwNDi35BAObrJwHusM3uq3coIIBNa2P9ISgtB5Mj0yB tWRHL8stO6w/KmD8z1Vlg== X-UI-Out-Filterresults: notjunk:1; V01:K0:ZA8DQ+01z94=:LmppLn+z/ptsDT+D5bMUeG GqwAEJbksUgvdNnzN6VaHIYSRiEr68cmF32nh5+aebtIzGznvVkAlCiW9neL5J9eOlEX5q1Xc c2CUAhTJR4Y/QhPQ4iRrYb0fnYJvjK1jk0wOwq/u9+XC3ujlXFaSS34/ofA3GtTql+NVBwRhJ 0XJ0NDPE5gJ6gjxGpYapETslbDUcMirP5OeRviBhvwVsHvVHBXDlzHFKtOwdQEYWMLfT6v2OB Su/iHrlAOdwHyzV8bBFm1DJtR1/0NWM/L9Bo0jA6IhLzXuWGQ3Fjc/lbZniH7DJLj3l64TLnC Flv9rurxiWTDi2pQVcoSpsr8jVELXWA3GFuDdnhBNTKoT1hb1S2uNdAR/AFyzFHH93JCOwSTI uzUMl/H0luslwALai+VD8e09Pq8apj/w9UdR7b+YvlJ4T+FDvQIeF575Y+De/MdIztB4xlIWi q7FTL6F5bEq6TyBJlgiSeZANrun686/6+mCh5fkd9wMXQPrUr32DbvwaxBntW5N0MXn6MldUM 0YEVNrz8rV8kozOjTuZ37FY1wtR5qkluMUQ8c9lXfZb3R/+t25Yh6GGyVDjZ08kF25SXRgbhc lte7hidnokmKXvOaqd8R2oMRwTC+Kfuy11egEp5baRc9+wR1mP7BEzV9AIGgwhLVUOvstRHQf DvbHMPmhTYfnpiQ4DxbGVfz2CSNKLjW/fMHlhvCYUqnpVOSQF1DJWs8BxssSDMid0JePeupeX 1SP5msDb2sgM7j8F Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The amso1100 driver prints a phys_addr_t by casting it to a pointer, which causes a warning when phys_addr_t is 64-bit and pointers are 32-bit: drivers/staging/rdma/amso1100/c2.c: In function 'c2_rx_error': drivers/staging/rdma/amso1100/c2.c:430:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] This changes the format string to print the address as a 64-bit number all the time to avoids the warnings. Ideally we would use the %pap format string for phys_addr_t, but that doesn't work here easily as it requires passing a pointer to the address. Signed-off-by: Arnd Bergmann --- Found on ARM randconfig testing. This must have been there forever but is rather hard to trigger even with randconfig builds. diff --git a/drivers/staging/rdma/amso1100/c2.c b/drivers/staging/rdma/amso1100/c2.c index b46ebd1ae15a..170a42a60552 100644 --- a/drivers/staging/rdma/amso1100/c2.c +++ b/drivers/staging/rdma/amso1100/c2.c @@ -426,8 +426,8 @@ static void c2_rx_error(struct c2_port *c2_port, struct c2_element *elem) pr_debug(" index : %Zu\n", elem - c2_port->rx_ring.start); pr_debug(" len : %u\n", rx_desc->len); - pr_debug(" rxp_hdr : %p [PA %p]\n", rxp_hdr, - (void *) __pa((unsigned long) rxp_hdr)); + pr_debug(" rxp_hdr : %p [PA %016llx\n", rxp_hdr, + (u64)__pa((unsigned long) rxp_hdr)); pr_debug(" flags : 0x%x\n", rxp_hdr->flags); pr_debug(" status: 0x%x\n", rxp_hdr->status); pr_debug(" len : %u\n", rxp_hdr->len);