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: 8181341 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2C12F9F38B for ; Mon, 1 Feb 2016 16:35:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4DB9420392 for ; Mon, 1 Feb 2016 16:35:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 653A320108 for ; Mon, 1 Feb 2016 16:35:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752576AbcBAQff (ORCPT ); Mon, 1 Feb 2016 11:35:35 -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; ; ) MI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ner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" 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/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);