From patchwork Fri Mar 26 18:14:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muhammad Usama Anjum X-Patchwork-Id: 12168001 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5FC3BC433DB for ; Sat, 27 Mar 2021 05:56:25 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F3787619DC for ; Sat, 27 Mar 2021 05:56:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F3787619DC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.102012.195711 (Exim 4.92) (envelope-from ) id 1lQ1vO-0002zs-9S; Sat, 27 Mar 2021 05:55:54 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 102012.195711; Sat, 27 Mar 2021 05:55:54 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lQ1vO-0002zl-6U; Sat, 27 Mar 2021 05:55:54 +0000 Received: by outflank-mailman (input) for mailman id 102012; Fri, 26 Mar 2021 18:14:53 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lPqyz-0001PT-DB for xen-devel@lists.xenproject.org; Fri, 26 Mar 2021 18:14:53 +0000 Received: from mail-ed1-x530.google.com (unknown [2a00:1450:4864:20::530]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 79f21421-deeb-4e81-8d58-2bdcee3a6bad; Fri, 26 Mar 2021 18:14:52 +0000 (UTC) Received: by mail-ed1-x530.google.com with SMTP id z1so7334178edb.8 for ; Fri, 26 Mar 2021 11:14:52 -0700 (PDT) Received: from LEGION ([111.119.187.49]) by smtp.gmail.com with ESMTPSA id gj26sm4087570ejb.67.2021.03.26.11.14.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Mar 2021 11:14:50 -0700 (PDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 79f21421-deeb-4e81-8d58-2bdcee3a6bad DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=7OwN9sCDoll1kfeOV96JvARjVXcCMVl5pE1420CYpOw=; b=grFMxIfnyiOWnB9RplEKcznwJgBk59Dlw9m/Qd10lgjvSNTNyzIknJNEsP1Iwd8yNr HRPlwIIiJtJjlO56hyU+aj25+jJzjSuEL6e8XvtMnonsZO+DF3p2//gSHa0AgfmAKhSK lUvmNgqIUyOGCWYRIocMdwhD4n8gQlW56XzgqdVjVKtK362IkPsTOi6dKFyDylOD1njO FWZFFFKwXsoV+F6LURvZ9bXSfQhbbFRI3ivclSqPkze8Gu3nrm0G29dikRKZoDblCDNH mmcPUn1iQxeZmfWhELA4i+As9kT/iYgE+Dlk3135pa+uE/d6S+bfjxf9Ej1F62aWDSBg Swlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=7OwN9sCDoll1kfeOV96JvARjVXcCMVl5pE1420CYpOw=; b=MxaArpvejsu8wIYFNdEFWBFy0EWDzUrQBFbck1ojQpovy8vNTXLAg25gC6bhcbqo3D k+ITrmvwRuUqNEbWAfvg5p9a9uyUHL1WKzGtcu8j70XoKHTSuPJuCUlGw4fu9kvnpLnG t5dfqhae49iriMb6X6bLRi2z/Bu5tqcpJj0kc7r0LFCKrLoXGupeo2SQKcA00nTYKFx1 x/nFmBnCZbu50tjpTdWgjHFeorru+e6M5q883BgYmYKA13jUkWJD6U5MFXXs5VDfO6pR /wBL4O9Kxd+QFTswDslk+vXEIp0nZaX7wY+GPywHMIiJyGcvdGwTIMhBqQCz4EipGhHV wnbw== X-Gm-Message-State: AOAM5325Im8eZhjgKm8xvr3lX7QO+wKAtTNVmcJjMJIPS1+lccYrmzDB /467q7AFe/dKTLNIRu5M8xo= X-Google-Smtp-Source: ABdhPJxuA8CArC7vp83Y/bQZyxiB/zWeAqtySapkwLOjb+muwylYkJwlFNtddIpQu548xwd6Df9rEw== X-Received: by 2002:a05:6402:1545:: with SMTP id p5mr16503433edx.155.1616782491559; Fri, 26 Mar 2021 11:14:51 -0700 (PDT) Date: Fri, 26 Mar 2021 23:14:42 +0500 From: Muhammad Usama Anjum To: Boris Ostrovsky , Juergen Gross , Stefano Stabellini , "moderated list:XEN HYPERVISOR INTERFACE" , open list , kernel-janitors@vger.kernel.org, colin.king@canonical.com, dan.carpenter@oracle.com Cc: musamaanjum@gmail.com Subject: [PATCH] xen/pciback: Fix incorrect type warnings Message-ID: <20210326181442.GA1735905@LEGION> MIME-Version: 1.0 Content-Disposition: inline Correct enum pci_channel_io_normal should be used instead of putting integer value 1. Fix following smatch warnings: drivers/xen/xen-pciback/pci_stub.c:805:40: warning: incorrect type in argument 2 (different base types) drivers/xen/xen-pciback/pci_stub.c:805:40: expected restricted pci_channel_state_t [usertype] state drivers/xen/xen-pciback/pci_stub.c:805:40: got int drivers/xen/xen-pciback/pci_stub.c:862:40: warning: incorrect type in argument 2 (different base types) drivers/xen/xen-pciback/pci_stub.c:862:40: expected restricted pci_channel_state_t [usertype] state drivers/xen/xen-pciback/pci_stub.c:862:40: got int drivers/xen/xen-pciback/pci_stub.c:973:31: warning: incorrect type in argument 2 (different base types) drivers/xen/xen-pciback/pci_stub.c:973:31: expected restricted pci_channel_state_t [usertype] state drivers/xen/xen-pciback/pci_stub.c:973:31: got int Signed-off-by: Muhammad Usama Anjum Reviewed-by: Juergen Gross --- drivers/xen/xen-pciback/pci_stub.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/xen/xen-pciback/pci_stub.c b/drivers/xen/xen-pciback/pci_stub.c index cb904ac83006..f8e4faa96ad6 100644 --- a/drivers/xen/xen-pciback/pci_stub.c +++ b/drivers/xen/xen-pciback/pci_stub.c @@ -802,7 +802,7 @@ static pci_ers_result_t xen_pcibk_slot_reset(struct pci_dev *dev) "guest with no AER driver should have been killed\n"); goto end; } - result = common_process(psdev, 1, XEN_PCI_OP_aer_slotreset, result); + result = common_process(psdev, pci_channel_io_normal, XEN_PCI_OP_aer_slotreset, result); if (result == PCI_ERS_RESULT_NONE || result == PCI_ERS_RESULT_DISCONNECT) { @@ -859,7 +859,7 @@ static pci_ers_result_t xen_pcibk_mmio_enabled(struct pci_dev *dev) "guest with no AER driver should have been killed\n"); goto end; } - result = common_process(psdev, 1, XEN_PCI_OP_aer_mmio, result); + result = common_process(psdev, pci_channel_io_normal, XEN_PCI_OP_aer_mmio, result); if (result == PCI_ERS_RESULT_NONE || result == PCI_ERS_RESULT_DISCONNECT) { @@ -970,7 +970,7 @@ static void xen_pcibk_error_resume(struct pci_dev *dev) kill_domain_by_device(psdev); goto end; } - common_process(psdev, 1, XEN_PCI_OP_aer_resume, + common_process(psdev, pci_channel_io_normal, XEN_PCI_OP_aer_resume, PCI_ERS_RESULT_RECOVERED); end: if (psdev)