From patchwork Fri Feb 2 04:56:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Reinette Chatre X-Patchwork-Id: 195563 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp211821dyc; Thu, 1 Feb 2024 20:59:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IHgr8CdUJ817gjbIFY+49mzzBYDi5n34emlsEPbqMB9eLDNocBWAaPa+qK09+97hePOtDvH X-Received: by 2002:a25:dc12:0:b0:dc2:4d19:4fea with SMTP id y18-20020a25dc12000000b00dc24d194feamr4855145ybe.11.1706849949158; Thu, 01 Feb 2024 20:59:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706849949; cv=pass; d=google.com; s=arc-20160816; b=s1mCaJ2Y/FmfyJJUOtewppJ0DlUJZPwEHy+9cDHBvaEk1aFp0d770767Fk8RX3DIji r2zN3jYhSDSziFLKla03QUlRggCFcu/Io/ISboFvyIFL2n8umaNdUO9mAiArS2qQ9wqV 9n/hmA9kmMHjwSpkqqHsFFSJU+cWyCdXqNuomgeV6WLH91LIaMIKmrNYfDnsdlCzXo/0 OM7rVyWiuiIz90Hvylj0RI/w3D2Ih/U06ybyePPZ9lYEW5OuGqPlzBfiwQgE6O6kPoB/ vIxtfQLLgHcZdNZ6Cu4z8LCWa4IEr5rMI8AXV2cWSCSsDsl97+KEEszXRxdPRRYvH7Bt hy1A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=digfdQYLHXIbNNfPRaunuk8o6A/o182DqpyZ6kXWM1g=; fh=6YNxkWumKWm8KmuHmi5/znw4WsOLriowyl42ozfWDug=; b=DRn3ETO5zha7F3XrbkFvBd798U1ChMRMhcgAYZ4VZQg1c+Nq6ebUtsqfeZ7UOP9EaE ScseijUnC9ADTthqJvmMmw58UUrAN3OhKJotjV4xBeuzLYcZoZHILzb7xEg36j+Q7HO/ 8x1Sy+3QEQb2g+pSwWCo8b30L//zk65ysSP4Atbjwt7HbUF2k7Pjw4Ruyf3CbL3WWXhY BVMcuUREXI9q/vDOSKvor6YrI9w/4iiT73OWEm83qbRIf6gAn78yHl85gQkIZH3CHOPJ BklPsnQNWCEXaCOXpds0u4C5Mvgycm7QsqTot/QWhk9lqoumeFZipPN6SED9KaXIWNn1 dhgg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=X06nBpSC; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-49206-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49206-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=1; AJvYcCU0b6Z1MpogKV0yxzpSjvZ5KLms/6dXC5krj6K9mifCRxpaj0FnFUKQzSDqKxWDkE7L5+edRMa7/3UHznyapwQp70790g== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id e22-20020a05622a111600b0042bef93f113si1219686qty.26.2024.02.01.20.59.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 20:59:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49206-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=X06nBpSC; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-49206-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49206-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id D1FD11C23096 for ; Fri, 2 Feb 2024 04:59:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D508417758; Fri, 2 Feb 2024 04:57:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="X06nBpSC" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1A3C5F9C2; Fri, 2 Feb 2024 04:57:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.8 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706849850; cv=none; b=Z86BOmk7lpup2uSX5wPL8LBSC4bxbJCyo5FqkahwnouEbqThfS8OGn5V9E9bkWIcMwQtuElOQ9EH9YOLnpptMNh+2HOnKoOM4/XWo7XriFdIJlqiJ9+fpWAiVD9tdEt7tmsa1HQXip+Sleoix0dzRmfquTaWapLkNuyOYdz4TWw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706849850; c=relaxed/simple; bh=5y4NGXUar57YI25p8xEfMr33IxH4G1iGgFkp7ARQYPM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=duFzRpA0gV3GcRdLKxkPZRlrY6Eh1BfA963R0fIY1O5HI7GLQfoKgFFhzd9IGeWDoBxCuETJ0Z8FrsKDoPzX8qbc4YO8SgtF4b3vr06VhzjZ7UZK+jfWnpn/NIhN1v1eR6dk8xhRiBzfNR1pDpj0uvvf0pjr6clRczUgKj4n8Aw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=X06nBpSC; arc=none smtp.client-ip=192.198.163.8 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706849847; x=1738385847; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=5y4NGXUar57YI25p8xEfMr33IxH4G1iGgFkp7ARQYPM=; b=X06nBpSCcFJa/ccHO+TvH10Yy0jQjTtonVm1Fml/qBWPNDz5EdLqlzGL bEEdf7vgqBZATalA4T466LR0WiyDQYDxGZERujWoWih+ZndAL58QM0HFr JHEA8itFJVAJPNgwbJl2ZPMAdte4dLYu8ZRh64ORySZ/kNCULm8pW9pGu 2QqEZP5av4atOEKfyuEMffnnV6veA4H+tgmHncsnfwE7haAbhopbPmKmd 8hHQR3rRygpKupnCOGVpCA6RIIz7RyWsr1l/2zuKG0mOgnEhVkuYGMrul dSaS7ZJ3j+1nWtH9U+1Gys8CwxiYwmsM+xa+3J69KjZ5p13eqRmHeaEEu w==; X-IronPort-AV: E=McAfee;i="6600,9927,10971"; a="17615791" X-IronPort-AV: E=Sophos;i="6.05,237,1701158400"; d="scan'208";a="17615791" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2024 20:57:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10971"; a="912339759" X-IronPort-AV: E=Sophos;i="6.05,237,1701158400"; d="scan'208";a="912339759" Received: from rchatre-ws.ostc.intel.com ([10.54.69.144]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2024 20:57:24 -0800 From: Reinette Chatre To: jgg@nvidia.com, yishaih@nvidia.com, shameerali.kolothum.thodi@huawei.com, kevin.tian@intel.com, alex.williamson@redhat.com Cc: kvm@vger.kernel.org, dave.jiang@intel.com, ashok.raj@intel.com, reinette.chatre@intel.com, linux-kernel@vger.kernel.org, patches@lists.linux.dev Subject: [PATCH 01/17] vfio/pci: Use unsigned int instead of unsigned Date: Thu, 1 Feb 2024 20:56:55 -0800 Message-Id: <81103b9a7f0448bbd8740389fbb77f78c150620d.1706849424.git.reinette.chatre@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789761891912492524 X-GMAIL-MSGID: 1789761891912492524 checkpatch.pl warns about usage of bare unsigned. Change unsigned to unsigned int to eliminate checkpatch.pl warnings about existing code that are encountered by changes to the interrupt management code at or near lines using bare unsigned. Signed-off-by: Reinette Chatre --- Note to maintainers: Originally formed part of the IMS submission below, but is not specific to IMS. https://lore.kernel.org/lkml/cover.1696609476.git.reinette.chatre@intel.com drivers/vfio/pci/vfio_pci_intrs.c | 42 ++++++++++++++++++------------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/drivers/vfio/pci/vfio_pci_intrs.c b/drivers/vfio/pci/vfio_pci_intrs.c index 237beac83809..f9280e32972a 100644 --- a/drivers/vfio/pci/vfio_pci_intrs.c +++ b/drivers/vfio/pci/vfio_pci_intrs.c @@ -503,8 +503,9 @@ static int vfio_msi_set_vector_signal(struct vfio_pci_core_device *vdev, return ret; } -static int vfio_msi_set_block(struct vfio_pci_core_device *vdev, unsigned start, - unsigned count, int32_t *fds, bool msix) +static int vfio_msi_set_block(struct vfio_pci_core_device *vdev, + unsigned int start, unsigned int count, + int32_t *fds, bool msix) { unsigned int i, j; int ret = 0; @@ -553,8 +554,9 @@ static void vfio_msi_disable(struct vfio_pci_core_device *vdev, bool msix) * IOCTL support */ static int vfio_pci_set_intx_unmask(struct vfio_pci_core_device *vdev, - unsigned index, unsigned start, - unsigned count, uint32_t flags, void *data) + unsigned int index, unsigned int start, + unsigned int count, uint32_t flags, + void *data) { if (!is_intx(vdev) || start != 0 || count != 1) return -EINVAL; @@ -584,8 +586,8 @@ static int vfio_pci_set_intx_unmask(struct vfio_pci_core_device *vdev, } static int vfio_pci_set_intx_mask(struct vfio_pci_core_device *vdev, - unsigned index, unsigned start, - unsigned count, uint32_t flags, void *data) + unsigned int index, unsigned int start, + unsigned int count, uint32_t flags, void *data) { if (!is_intx(vdev) || start != 0 || count != 1) return -EINVAL; @@ -604,8 +606,9 @@ static int vfio_pci_set_intx_mask(struct vfio_pci_core_device *vdev, } static int vfio_pci_set_intx_trigger(struct vfio_pci_core_device *vdev, - unsigned index, unsigned start, - unsigned count, uint32_t flags, void *data) + unsigned int index, unsigned int start, + unsigned int count, uint32_t flags, + void *data) { if (is_intx(vdev) && !count && (flags & VFIO_IRQ_SET_DATA_NONE)) { vfio_intx_disable(vdev); @@ -647,8 +650,9 @@ static int vfio_pci_set_intx_trigger(struct vfio_pci_core_device *vdev, } static int vfio_pci_set_msi_trigger(struct vfio_pci_core_device *vdev, - unsigned index, unsigned start, - unsigned count, uint32_t flags, void *data) + unsigned int index, unsigned int start, + unsigned int count, uint32_t flags, + void *data) { struct vfio_pci_irq_ctx *ctx; unsigned int i; @@ -755,8 +759,9 @@ static int vfio_pci_set_ctx_trigger_single(struct eventfd_ctx **ctx, } static int vfio_pci_set_err_trigger(struct vfio_pci_core_device *vdev, - unsigned index, unsigned start, - unsigned count, uint32_t flags, void *data) + unsigned int index, unsigned int start, + unsigned int count, uint32_t flags, + void *data) { if (index != VFIO_PCI_ERR_IRQ_INDEX || start != 0 || count > 1) return -EINVAL; @@ -766,8 +771,9 @@ static int vfio_pci_set_err_trigger(struct vfio_pci_core_device *vdev, } static int vfio_pci_set_req_trigger(struct vfio_pci_core_device *vdev, - unsigned index, unsigned start, - unsigned count, uint32_t flags, void *data) + unsigned int index, unsigned int start, + unsigned int count, uint32_t flags, + void *data) { if (index != VFIO_PCI_REQ_IRQ_INDEX || start != 0 || count > 1) return -EINVAL; @@ -777,11 +783,11 @@ static int vfio_pci_set_req_trigger(struct vfio_pci_core_device *vdev, } int vfio_pci_set_irqs_ioctl(struct vfio_pci_core_device *vdev, uint32_t flags, - unsigned index, unsigned start, unsigned count, - void *data) + unsigned int index, unsigned int start, + unsigned int count, void *data) { - int (*func)(struct vfio_pci_core_device *vdev, unsigned index, - unsigned start, unsigned count, uint32_t flags, + int (*func)(struct vfio_pci_core_device *vdev, unsigned int index, + unsigned int start, unsigned int count, uint32_t flags, void *data) = NULL; switch (index) {