Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp508797rdb; Fri, 6 Oct 2023 09:42:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEPa46TcWCMxZ3lvvpdY0K7R4Wg76sXnc1xgFTWUlvDBFjL/qh1Q5R2KR5izOYK/RX8Nkje X-Received: by 2002:a05:6a00:1792:b0:68f:c8b4:1a2b with SMTP id s18-20020a056a00179200b0068fc8b41a2bmr8009573pfg.17.1696610525699; Fri, 06 Oct 2023 09:42:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696610525; cv=none; d=google.com; s=arc-20160816; b=0pIi0M0oYmABBig2Dqig5ASlqUkMqZXOYlMt5yArTP/mCptwpHM2B1O1T4VX1LzCw/ GVJWwf7z+wX4Qd8StLCZBZUs5iKQzOwgK6oDSTlEskwEB2oiJ46ByjCCHB9ly0VqcTvF IvaFA15UDECu4fhj5gfAtXgrLlkv6Exkm000bgoFGq0tfbxB8ZOA5bg1srI8zfvVUlOl T33fn/mboQQpIzIZpRnJWmKN6YIvJ9e93WV65r45JMTSRnMTIeyDNu4+NqJTQhvWkhxu RCWsd6CCBdLHU8QxqO8ER6MjGuCVo0bDAqLdaz47mTBjVlhwcxY7pil2WsDOJavOiiOz hoYA== 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=Z0AuKFUo2gW1sREjdEHcDpoZN6RFLy8MXud/wrRs/aM=; fh=k582jSlci6uTztoHpzXN2a6Foym20J+xbJc48KNsUhM=; b=fFa+KB/qGo9mkW+DnXMs6sV8Dt+/E3U0L/I0jBYzrgUU7qZWMYliBsL4NEwYM64O1j ISr7IEpA1BSYWig6PSaBPq18TCmNp6rHwJf3l4pqo1ZBr/lfkUXr4tzxb4C1/6ULSC3E 37+pswU7S0xvNRArGzmddSuLLcpg/ev1mYsHqEOHaHDlP13vGR+2+g0aIbGqBpXSJG1Q pv8+SZxdCPGY2XoH8emW9mLLPAYCpUUsv61o64xgNKmM03OUKrz6ec3EwJR0Q6Q8f04t NaUbl77+7pLUAuG0nelQZdl/Q/KMj1uHynt3O+2NwWalfItXE2BYizN8ns7WoiCI5rVq AfWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VqxV2wKZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id t29-20020a63b25d000000b005859c221c6dsi4116784pgo.221.2023.10.06.09.42.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 09:42:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VqxV2wKZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id 7B665816EBD1; Fri, 6 Oct 2023 09:41:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233024AbjJFQli (ORCPT + 99 others); Fri, 6 Oct 2023 12:41:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232950AbjJFQl2 (ORCPT ); Fri, 6 Oct 2023 12:41:28 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03FC6AD; Fri, 6 Oct 2023 09:41: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=1696610485; x=1728146485; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Mm/55LXHi28066oVFk7+DbJoQjq6buhXunb9T8tkOO0=; b=VqxV2wKZWAabdgkBbwxtQkYMnkqieUik/GQuzoMZNQKHvz6MnZGq1ext BTMwBnGXGU6w5HJPK17GouMkhdG9WYiC7tsJjZSIG7SojDxiU9RBLFAU1 EcnA5o2rYKdCvdNmG+D/6qj/oZv4/l6xe/Egj5BCRHxmRpYJjjVCigx9r DayjMY/xTN9BTLIfS9c3f2LqBbZp886xDydJWxYJLJoD3YSrwk6idc7w4 wy4iShiimYV8Bi9s8eoscBuqOFm2EH+OB3X+m62dodsy3MHebBrt1lChb 0bFWoOf/y0oqby2ocJvo5YLBJQCKBsCW/e/yu3dt8pDS1re8YJkBPGzc3 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10855"; a="364063161" X-IronPort-AV: E=Sophos;i="6.03,204,1694761200"; d="scan'208";a="364063161" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2023 09:41:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10855"; a="842892845" X-IronPort-AV: E=Sophos;i="6.03,204,1694761200"; d="scan'208";a="842892845" Received: from rchatre-ws.ostc.intel.com ([10.54.69.144]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2023 09:41:23 -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 V2 03/18] vfio/pci: Use unsigned int instead of unsigned Date: Fri, 6 Oct 2023 09:40:58 -0700 Message-Id: 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=2.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.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 (lipwig.vger.email [0.0.0.0]); Fri, 06 Oct 2023 09:41:59 -0700 (PDT) X-Spam-Level: ** 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 --- drivers/vfio/pci/vfio_pci_intrs.c | 37 ++++++++++++++++++------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/drivers/vfio/pci/vfio_pci_intrs.c b/drivers/vfio/pci/vfio_pci_intrs.c index b5b1c09bef25..c49588c8f4a3 100644 --- a/drivers/vfio/pci/vfio_pci_intrs.c +++ b/drivers/vfio/pci/vfio_pci_intrs.c @@ -553,8 +553,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 +585,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 +605,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 +649,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 +758,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 +773,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 +785,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