From patchwork Thu Dec 21 16:15:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 122583 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp1092956qgn; Thu, 21 Dec 2017 08:15:53 -0800 (PST) X-Google-Smtp-Source: ACJfBovVAK2zGEeKHhhnz/4xOmIVQgtHKRFocDi0OwH5747jL1++HWDaQHc76qFH3ydihHDRAxrl X-Received: by 10.98.224.7 with SMTP id f7mr11037247pfh.177.1513872953010; Thu, 21 Dec 2017 08:15:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513872953; cv=none; d=google.com; s=arc-20160816; b=0FeRIxvUQLGXbtTSlV/3diSF2672Ab6r1KYrCQamGBNeSEL1NoztNmRC0Ito9zOqgW mFGHF5xmPZjkIvjkzG7BzjAWNK0otBG/TWrnztjvyE4ezskBscSXd9/KcmDklUVPs70R Dq1odoHHxTWdqjzg94y8MsuMM7Cy6HSTsDsCpkBB+YFJFyFb3u+ZrHEbhFQjp2NBCrKu WE+IrQ+lf6H4sdvv0eCHrwspWhjzQnaL5YqSGzwf5qkVUUSvycxAZMjwiuhPGhjZUPkc rISMGXmtiv0JfsFCV7PgqWby19GgLgh0On07mguwjVd0q0CfT4lYqVEzHltv+P+w1/GB yKkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=jSwCwEy1nALLLZ4RIbjvdVQuCwr/pYnNdvLob4FCx/I=; b=L4SCWtvo2TWgi2ShkybzNRAGKTGWQEOtZ29Xh5vqTF38dRIVrXLBzeQ9FnH6lEtEkr PpdCwSAHZl2IJGt8qfS7i9cTRkxSDZz0udgCZnRP8bnGytfgQYmA04ytISaauR2funVb xkZpUHKkdj6WmjdRzUTRabAuC/3SXUIsgipcAkMfCC6IvMpPxaXWW+wf2CG/kV24ix2f CbNK+A7mvfEEFxcJ5nPR3n8bmRcZ+Dy+ZPl/HH4Ii5XUifHxUe8jOLzIdzbYUxbzp/xw MyiRXeFIQIfjRMhO8kDEFX9rsy3IJGmhOGCd3LWiQN+mrSuELmjE/58FetsNemKmWomQ Fb+w== 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 c82si15193293pfk.246.2017.12.21.08.15.52; Thu, 21 Dec 2017 08:15:52 -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 S1753669AbdLUQPt (ORCPT + 28 others); Thu, 21 Dec 2017 11:15:49 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:55467 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751717AbdLUQPs (ORCPT ); Thu, 21 Dec 2017 11:15:48 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue001 [212.227.15.129]) with ESMTPA (Nemesis) id 0Lg9rw-1ep1ut1QDk-00ngiu; Thu, 21 Dec 2017 17:15:35 +0100 From: Arnd Bergmann To: Hans de Goede , Arnd Bergmann , Greg Kroah-Hartman Cc: Joe Perches , Larry Finger , linux-kernel@vger.kernel.org Subject: [PATCH v2] virt: vbox: use %pap format for printing resource_size_t Date: Thu, 21 Dec 2017 17:15:18 +0100 Message-Id: <20171221161529.3462263-1-arnd@arndb.de>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FkF4F3Q2l26TQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org resource_size_t may be larger than pointers depending on configuration, so we can run into this build warning: drivers/virt/vboxguest/vboxguest_linux.c: In function 'vbg_pci_probe': drivers/virt/vboxguest/vboxguest_linux.c:295:4: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] drivers/virt/vboxguest/vboxguest_linux.c:367:4: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] This uses the special %pap to print the address by reference. Fixes: 0ba002bc4393 ("virt: Add vboxguest driver for Virtual Box Guest integration") Signed-off-by: Arnd Bergmann --- v2: Use %pap instead of the %rR that was just as incorrect, as pointed out by Joe Perches. --- drivers/virt/vboxguest/vboxguest_linux.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.9.0 Acked-by: Hans de Goede diff --git a/drivers/virt/vboxguest/vboxguest_linux.c b/drivers/virt/vboxguest/vboxguest_linux.c index d045aa51ce03..82e280d38cc2 100644 --- a/drivers/virt/vboxguest/vboxguest_linux.c +++ b/drivers/virt/vboxguest/vboxguest_linux.c @@ -291,8 +291,8 @@ static int vbg_pci_probe(struct pci_dev *pci, const struct pci_device_id *id) vmmdev = devm_ioremap(dev, mmio, mmio_len); if (!vmmdev) { - vbg_err("vboxguest: Error ioremap failed; MMIO addr=%p size=%d\n", - (void *)mmio, (int)mmio_len); + vbg_err("vboxguest: Error ioremap failed; MMIO addr=%pap size=%pap\n", + &mmio, &mmio_len); goto err_disable_pcidev; } @@ -362,9 +362,9 @@ static int vbg_pci_probe(struct pci_dev *pci, const struct pci_device_id *id) device_create_file(dev, &dev_attr_host_version); device_create_file(dev, &dev_attr_host_features); - vbg_info("vboxguest: misc device minor %d, IRQ %d, I/O port %x, MMIO at %p (size %d)\n", + vbg_info("vboxguest: misc device minor %d, IRQ %d, I/O port %x, MMIO at %pap (size %pap)\n", gdev->misc_device.minor, pci->irq, gdev->io_port, - (void *)mmio, (int)mmio_len); + &mmio, &mmio_len); return 0;