Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp1136596img; Thu, 28 Feb 2019 13:43:24 -0800 (PST) X-Google-Smtp-Source: APXvYqzVVdD9lw2Zo4FzemUIOnHcLIPTGnJvc+6nM1uvWZKPJXp4rOKircbxigsqmTt94iWvbnTa X-Received: by 2002:a17:902:5a8d:: with SMTP id r13mr1637833pli.190.1551390204470; Thu, 28 Feb 2019 13:43:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551390204; cv=none; d=google.com; s=arc-20160816; b=V/HZxPzf5CC7mJddNdubJGNvwfr7x9Jn3vteoFhEDpch2kam3yAq4XwowDHJTjlLZ3 rxZPiaudL6TuE5/IhePgNoBidMuFqXw1UjxNGSUNvUQ0vJFDF2MXf0nn0H5sBHOTNJMM +Uk3JEA2JsQFRumsaFy0tikC5ntifP+W2Uc9hDQ+eQx0j6oB0QiGbN3/xy58Ia3H6nUV vw6GsedbQVKKBTTm4CSlVmO1MAgNfhmBx5K2vEsJ0zMynlt7tAnV2Y6MmPPHUCMU7giI tUHxcfdpfkK34W8/wWJgmcS/3iK+0YBViOgExkjvrJQaButAPZNC4jfY8okI0MuDKtlM dTag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=RJHJp0v8q0EwV9djfl2B0HUEURFjv69zVjwgW24PDFc=; b=MPmxhQi3jcBd7HvnSEn5F9I9R+JgUlih3ZSI4YKi9UUGVm4HrPoqk5xcugJjgN/JGl CeLmLFApBwMHq3vh4+jwwgmX3h5Zo1mVAG6tR0wzAoU4zuks5cVjwXvUP0963rP6GRYV vwoLvYGdroWZY8+TGbyCtNMZ8B+DX2YR5IdII6TcJyMIUNy7AyL0ZyTLDPO+aIqTYKoz cSL9acb4v8MJn4Or9FjxVwBcg0iYdGcI1+EIHbM4iIwPImxIMg9dB6CyTceYalmxrSFz tth1D7wOM5DGvgVbJSeqUjRlEF7Bx49+vkdhx9yc+6BKf+VAqhAyRBCbNOVUXAAv+Tls cAvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kragniz.eu header.s=google header.b=IpITimNU; 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 c16si18994888pfd.79.2019.02.28.13.43.09; Thu, 28 Feb 2019 13:43:24 -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; dkim=pass header.i=@kragniz.eu header.s=google header.b=IpITimNU; 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 S1731777AbfB1Ttp (ORCPT + 99 others); Thu, 28 Feb 2019 14:49:45 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:50988 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727873AbfB1Tto (ORCPT ); Thu, 28 Feb 2019 14:49:44 -0500 Received: by mail-wm1-f67.google.com with SMTP id x7so10352552wmj.0 for ; Thu, 28 Feb 2019 11:49:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kragniz.eu; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=RJHJp0v8q0EwV9djfl2B0HUEURFjv69zVjwgW24PDFc=; b=IpITimNUIv+V0W8Uqqmg/YLXBEsLaGRBsOda2JUBABdbBjOffSAKDKwBexClRIPr3P T/rzuqkpd19cRJwtr6JRSbA+IPzItgSGNYx52mX3sCFBp4UFq7YKbgTrQakm1YOmZulH YvzA6SdgibJ5Hy9Qt1pcvj5hsmonafR8NO6uw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=RJHJp0v8q0EwV9djfl2B0HUEURFjv69zVjwgW24PDFc=; b=ORKAi5t8hokhlFRD+F69oZd6ATgKSNQIOZXpHDeVHhfjP/+ThwQWaIj+lq7sLcdIT3 7Udmno/HX/S9trGtABZEl9yBVZHMOFplIfZBskCJd31vcrHszMNqj2mF4APig/3oeFoF TPd48wzn5z60MFe/IkPtpSskvlG8yrjm2ozpEcoDRhYM2wYC8ytNgTl57sMd68yoRd2Z Re+i6be2g/0l9GjICc2YxdFOAenJ+aVbEXu8IzBEtL3q8/UkULoZRHtJXCNa6VpYju25 s+NpQJOXnysbhlwqBhx8R41n96nCoJ0z17uC8tIVO2w3koyy0jge2FKOjakJ5hEaawX2 2pvw== X-Gm-Message-State: APjAAAXuPTRgCIrzg973MEcxUqOsaZA36yhLXlzYsCm0ExH9Qu99dKAx Gtx5WDO65a3XekX3GXZAeMxrcQ== X-Received: by 2002:a1c:6643:: with SMTP id a64mr857690wmc.90.1551383382697; Thu, 28 Feb 2019 11:49:42 -0800 (PST) Received: from localhost.localdomain ([213.205.198.100]) by smtp.gmail.com with ESMTPSA id y22sm3928323wmj.6.2019.02.28.11.49.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Feb 2019 11:49:42 -0800 (PST) From: Louis Taylor To: alex.williamson@redhat.com Cc: aik@ozlabs.ru, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, ndesaulniers@google.com, jflat@chromium.org, Louis Taylor Subject: [PATCH] vfio/pci: use correct format characters Date: Thu, 28 Feb 2019 19:48:12 +0000 Message-Id: <20190228194812.30929-1-louis@kragniz.eu> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When compiling with -Wformat, clang emits the following warnings: drivers/vfio/pci/vfio_pci.c:1601:5: warning: format specifies type 'unsigned short' but the argument has type 'unsigned int' [-Wformat] vendor, device, subvendor, subdevice, ^~~~~~ drivers/vfio/pci/vfio_pci.c:1601:13: warning: format specifies type 'unsigned short' but the argument has type 'unsigned int' [-Wformat] vendor, device, subvendor, subdevice, ^~~~~~ drivers/vfio/pci/vfio_pci.c:1601:21: warning: format specifies type 'unsigned short' but the argument has type 'unsigned int' [-Wformat] vendor, device, subvendor, subdevice, ^~~~~~~~~ drivers/vfio/pci/vfio_pci.c:1601:32: warning: format specifies type 'unsigned short' but the argument has type 'unsigned int' [-Wformat] vendor, device, subvendor, subdevice, ^~~~~~~~~ drivers/vfio/pci/vfio_pci.c:1605:5: warning: format specifies type 'unsigned short' but the argument has type 'unsigned int' [-Wformat] vendor, device, subvendor, subdevice, ^~~~~~ drivers/vfio/pci/vfio_pci.c:1605:13: warning: format specifies type 'unsigned short' but the argument has type 'unsigned int' [-Wformat] vendor, device, subvendor, subdevice, ^~~~~~ drivers/vfio/pci/vfio_pci.c:1605:21: warning: format specifies type 'unsigned short' but the argument has type 'unsigned int' [-Wformat] vendor, device, subvendor, subdevice, ^~~~~~~~~ drivers/vfio/pci/vfio_pci.c:1605:32: warning: format specifies type 'unsigned short' but the argument has type 'unsigned int' [-Wformat] vendor, device, subvendor, subdevice, ^~~~~~~~~ The types of these arguments are unconditionally defined, so this patch updates the format character to the correct ones for unsigned ints. Link: https://github.com/ClangBuiltLinux/linux/issues/378 Signed-off-by: Louis Taylor --- drivers/vfio/pci/vfio_pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c index a25659b5a5d1..3fa20e95a6bb 100644 --- a/drivers/vfio/pci/vfio_pci.c +++ b/drivers/vfio/pci/vfio_pci.c @@ -1661,11 +1661,11 @@ static void __init vfio_pci_fill_ids(void) rc = pci_add_dynid(&vfio_pci_driver, vendor, device, subvendor, subdevice, class, class_mask, 0); if (rc) - pr_warn("failed to add dynamic id [%04hx:%04hx[%04hx:%04hx]] class %#08x/%08x (%d)\n", + pr_warn("failed to add dynamic id [%04x:%04x[%04x:%04x]] class %#08x/%08x (%d)\n", vendor, device, subvendor, subdevice, class, class_mask, rc); else - pr_info("add [%04hx:%04hx[%04hx:%04hx]] class %#08x/%08x\n", + pr_info("add [%04x:%04x[%04x:%04x]] class %#08x/%08x\n", vendor, device, subvendor, subdevice, class, class_mask); } -- 2.20.1