Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp1301584rdh; Fri, 27 Oct 2023 10:02:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG3EUiibLWwbJG6u5j1Oq0BZsRV4t+O1zncOPsL+XMIuPSOjR4g3gk77aEv2ZhO2r2OyN4K X-Received: by 2002:a05:6871:4309:b0:1e9:9537:c1a9 with SMTP id lu9-20020a056871430900b001e99537c1a9mr4462294oab.12.1698426155276; Fri, 27 Oct 2023 10:02:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698426155; cv=none; d=google.com; s=arc-20160816; b=NqHCpOwjdsI+ZZeLh1MdFWFqXLb6Ah4GuCtxPBcgrU9c7egy5Lea6Pt9mSdCvlo3Fk akVsHA97o6nCO0hingz4oVNUdSOyGcYVQKQGRh4dYkDG3jb2e5PMHYOkODcNKycJYqIm r29k4UkWYNoojnx83LsduGKoPwstt3kdnAzPqpeWunq7CtqQtJI2OS8qgvp5fVXssvwm EBOWpoYdIeXhSZFlHTzloKk6MsJF06M/zY4roIYmShLRMKYCXp4ynQ2LybMnIoSU6gAH s6hZo3A1m+8VnJ0JvnMbPKLdyL+2TRxhBML/wbYYOx66Rv+awcnNgpohol0iEOGbuB7P I1Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Zj5L+1J19K+ePqNOm6jhfa/iWqbMLdZGLKg8ShLlCiY=; fh=k582jSlci6uTztoHpzXN2a6Foym20J+xbJc48KNsUhM=; b=nFf7wOYQJiPMt0cFbVQpdYcp+XUnN0u3xSaGjJg6q2Eo1VI0co9iGtXXTLyIsHE6tR d3xeFgHh/nkAe/yTmeBp5I5GkWeBjgpMly1yhu2xLkXa0o/DXF4TaZu2/hrjingYkCLK 5ImcyYWzOMS5E4abEzURM0HFuQqJUHkDz+q3pOPBZgVWyLzZWYud3vr67BI2pqzPyiN3 wHRXyUtrcOdX1jH3sK1URlKZUF3yg74wwvRTKWBQVwgDA9cjtnv714NJHqv8cncDySq6 IayItGaqHBfMT3THUsAH6xTyIIBVm4J+/vhrcIzb2yPtpDmPSqRmjq8f5IZQkjdGZPRA 8LpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=SmrIIn2A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id t15-20020a67a24f000000b00450fc842595si309823vsh.287.2023.10.27.10.02.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 10:02:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=SmrIIn2A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 1928D801B651; Fri, 27 Oct 2023 10:02:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345996AbjJ0RBb (ORCPT + 99 others); Fri, 27 Oct 2023 13:01:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345941AbjJ0RBa (ORCPT ); Fri, 27 Oct 2023 13:01:30 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 291EF1A1; Fri, 27 Oct 2023 10:01:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698426086; x=1729962086; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=15lJMwbf/gDQp6s/rBs3T3D7+FEeslB9BPq+GkkAYEI=; b=SmrIIn2A/YLuwEC7+iKRNoPt1gockL23VWzsa0JEu32LmCJoo6x8VW6z 2iIo61t8btJqvoGqYHzdmGMxHzm1byNFiPhGYgo6PnpGnbyYu/vE8Ka0S Z53/PvX2o0b2/hluNnJa8UbWTjG7K03MtQO13ZOyNZ9MMA9rvGtT88OG7 YIODQwoSQx7Uwsas9sTnzIdMEwoa/g4/5tBWUh/ihowOAPBxmDHWTKeKf 0Nkbc3QrZf362//nHGPx3vaR/+tPzCpST0RdSfttSVnhPlhZS1gk1QgS+ dT1WqPEb/D59+k1o7K82MDSU3Ee9EH/AopEoLjwfmxg4jp0j1a3B3sKfW g==; X-IronPort-AV: E=McAfee;i="6600,9927,10876"; a="611847" X-IronPort-AV: E=Sophos;i="6.03,256,1694761200"; d="scan'208";a="611847" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2023 10:01:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10876"; a="1090988149" X-IronPort-AV: E=Sophos;i="6.03,256,1694761200"; d="scan'208";a="1090988149" Received: from rchatre-ws.ostc.intel.com ([10.54.69.144]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2023 10:01:13 -0700 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, jing2.liu@intel.com, ashok.raj@intel.com, fenghua.yu@intel.com, tom.zanussi@linux.intel.com, reinette.chatre@intel.com, linux-kernel@vger.kernel.org, patches@lists.linux.dev Subject: [RFC PATCH V3 03/26] vfio/pci: Use unsigned int instead of unsigned Date: Fri, 27 Oct 2023 10:00:35 -0700 Message-Id: <640dad3021715f4585f0c0ccb57224826cc82b68.1698422237.git.reinette.chatre@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Fri, 27 Oct 2023 10:02:15 -0700 (PDT) checkpatch.pl warns about usage of bare unsigned. Change unsigned to unsigned int as a preparatory change to avoid checkpatch.pl producing several warnings as the work adding support for backends to VFIO interrupt management progress. Signed-off-by: Reinette Chatre --- Changes since RFC V2: - Include vfio_msi_set_block() in changes. Note to maintainers: After this change checkpatch.pl still has a few complaints about existing code using int32_t instead of s32. This was not changed and these warnings remain. 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 b5b1c09bef25..9f4f3ab48f87 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 (!pci_is_pcie(vdev->pdev)) return -ENOTTY; @@ -769,8 +774,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; @@ -780,11 +786,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) { -- 2.34.1