From patchwork Tue Jul 13 00:25:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= X-Patchwork-Id: 1504292 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org; receiver=) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GP1f90Y00z9sX3 for ; Tue, 13 Jul 2021 10:26:41 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4GP1dZ6mnNz302g for ; Tue, 13 Jul 2021 10:26:10 +1000 (AEST) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=209.85.128.46; helo=mail-wm1-f46.google.com; envelope-from=kswilczynski@gmail.com; receiver=) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4GP1cs5s6Zz2yP6 for ; Tue, 13 Jul 2021 10:25:32 +1000 (AEST) Received: by mail-wm1-f46.google.com with SMTP id i2-20020a05600c3542b02902058529ea07so1119952wmq.3 for ; Mon, 12 Jul 2021 17:25:32 -0700 (PDT) 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=Q1JaKWz4ljmDgmlS6XOgBpL8dJbggktcA486snVdwEo=; b=CB/bTjAIQEYVD2dhjzHj7jcf3u4kGaGQfvp3TbHQHfMG2LYNrkZExd5TA1ERrXqkLS BvEfZWDdrO37/WjVeXi8JQ80LramM9ThycRAcY2Tpr+70FP/WEdvaIhZOugJyIVKz20S aZnqXuJh1OTgK5F08O33FYYQ5wfPNNaVIEgybBqxZ2CwwcXHSTxnpYqs/yxYRdo29H7m LCwJo9z4W/+mvvKLRuXgE5nUc/6cSK5bxHPqZAAOUYHII7qvscUUfKAJxccv9iQ5269z aYSQuPsRkulJVXw9i9lAy+fND8Q4+CqpLaoC39yGu8K21PcnaOP7tyXNGNadJOMr/jZf lFkg== X-Gm-Message-State: AOAM533akPv7K8yORphPqh5GneTFJUVYYIGz0ZG1LyBTdu69VL8KBrmc 7FFi8R55MshR0oDzNSyrF6Q= X-Google-Smtp-Source: ABdhPJziVUbprznFZuoOf+eG8kg08hyPDAKraPFSp2ML3Rde1dpKkVWCkubdOfyTsnbJzZC0XgepIQ== X-Received: by 2002:a05:600c:a45:: with SMTP id c5mr17728264wmq.153.1626135927526; Mon, 12 Jul 2021 17:25:27 -0700 (PDT) Received: from workstation.lan ([95.155.85.46]) by smtp.gmail.com with ESMTPSA id p5sm38895wme.2.2021.07.12.17.25.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jul 2021 17:25:27 -0700 (PDT) From: =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= To: Bjorn Helgaas Subject: [PATCH 1/2] PCI: Use pcie_reset_state_t type in function arguments Date: Tue, 13 Jul 2021 00:25:24 +0000 Message-Id: <20210713002525.203840-1-kw@linux.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pci@vger.kernel.org, Oliver O'Halloran , Paul Mackerras , linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" The pcie_reset_state_t type has been introduced in the commit f7bdd12d234d ("pci: New PCI-E reset API") along with the enum pcie_reset_state, but it has never been used for anything else other than to define the members of the enumeration set in the enum pcie_reset_state. Thus, replace the direct use of enum pcie_reset_state in function arguments and replace it with pcie_reset_state_t type so that the argument type matches the type used in enum pcie_reset_state. Signed-off-by: Krzysztof Wilczyński --- drivers/pci/pci.c | 4 ++-- include/linux/pci.h | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index aacf575c15cf..5c3386a73eb1 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -2194,7 +2194,7 @@ EXPORT_SYMBOL(pci_disable_device); * implementation. Architecture implementations can override this. */ int __weak pcibios_set_pcie_reset_state(struct pci_dev *dev, - enum pcie_reset_state state) + pcie_reset_state_t state) { return -EINVAL; } @@ -2206,7 +2206,7 @@ int __weak pcibios_set_pcie_reset_state(struct pci_dev *dev, * * Sets the PCI reset state for the device. */ -int pci_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state) +int pci_set_pcie_reset_state(struct pci_dev *dev, pcie_reset_state_t state) { return pcibios_set_pcie_reset_state(dev, state); } diff --git a/include/linux/pci.h b/include/linux/pci.h index 540b377ca8f6..15f93de69e6a 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -191,7 +191,6 @@ enum { }; typedef unsigned int __bitwise pcie_reset_state_t; - enum pcie_reset_state { /* Reset is NOT asserted (Use to deassert reset) */ pcie_deassert_reset = (__force pcie_reset_state_t) 1, @@ -1205,7 +1204,7 @@ extern unsigned int pcibios_max_latency; void pci_set_master(struct pci_dev *dev); void pci_clear_master(struct pci_dev *dev); -int pci_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state); +int pci_set_pcie_reset_state(struct pci_dev *dev, pcie_reset_state_t state); int pci_set_cacheline_size(struct pci_dev *dev); int __must_check pci_set_mwi(struct pci_dev *dev); int __must_check pcim_set_mwi(struct pci_dev *dev); @@ -2079,7 +2078,7 @@ extern u8 pci_cache_line_size; void pcibios_disable_device(struct pci_dev *dev); void pcibios_set_master(struct pci_dev *dev); int pcibios_set_pcie_reset_state(struct pci_dev *dev, - enum pcie_reset_state state); + pcie_reset_state_t state); int pcibios_add_device(struct pci_dev *dev); void pcibios_release_device(struct pci_dev *dev); #ifdef CONFIG_PCI From patchwork Tue Jul 13 00:25:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= X-Patchwork-Id: 1504291 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org; receiver=) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GP1dF1Kmsz9sX3 for ; Tue, 13 Jul 2021 10:25:53 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4GP1dF0FMTz3bX3 for ; Tue, 13 Jul 2021 10:25:53 +1000 (AEST) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=209.85.221.43; helo=mail-wr1-f43.google.com; envelope-from=kswilczynski@gmail.com; receiver=) Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4GP1cs5ZbQz2yMq for ; Tue, 13 Jul 2021 10:25:32 +1000 (AEST) Received: by mail-wr1-f43.google.com with SMTP id d12so27390376wre.13 for ; Mon, 12 Jul 2021 17:25:32 -0700 (PDT) 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=bui7AgdPIiwwrYwMh79xgVS7mq+OX7ceu5SE/Hq8sVc=; b=tCacwCiukxmqaIRuLL9DDtRL3ICyw6KQ2r71lm8cZcP13GkScueuCg+cva+0dGFnal 0XeXOq7DpWQj2qOFM0f4EOHHDa9WxiJkRmiNPpdu0jCfIh2r17o97KBcxURxRh6qdupD DzpWsT01nRh3K1vhGm8KdxbFXUzGASIfF8Vyxk7Hb39gcf368fGAD7xLEAiRpoDCCuCH N8Gv9zyk9ToPfyUBD1mn9BTy7MhE6MKcsax7AaQIXaYF/18qUPTE/vt39K2bmUylqetd jTXoXnyWR0nRT2exRY6/UmVaLKlHtx3YxUvdlOvBBFlzmbZyy9bDyj/tAC9ot2CjM8AZ MDYQ== X-Gm-Message-State: AOAM530V6jdwokJuKGf2UYGMSFKLGw3Md3HwJqxWRfMuKtBAnEkHmgMF 4goiBJQgJWQ5BJXhzTH4T2U= X-Google-Smtp-Source: ABdhPJwBMvQ6lKonrvm8WyUjCvo327ju2Dz8Wj7wvkaN1fP7TiUWp6kySHD0TLvAM1NwWrQHjogLyA== X-Received: by 2002:a5d:6ac4:: with SMTP id u4mr1997170wrw.166.1626135928773; Mon, 12 Jul 2021 17:25:28 -0700 (PDT) Received: from workstation.lan ([95.155.85.46]) by smtp.gmail.com with ESMTPSA id p5sm38895wme.2.2021.07.12.17.25.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jul 2021 17:25:28 -0700 (PDT) From: =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= To: Bjorn Helgaas Subject: [PATCH 2/2] powerpc/eeh: Use pcie_reset_state_t type in function arguments Date: Tue, 13 Jul 2021 00:25:25 +0000 Message-Id: <20210713002525.203840-2-kw@linux.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210713002525.203840-1-kw@linux.com> References: <20210713002525.203840-1-kw@linux.com> MIME-Version: 1.0 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pci@vger.kernel.org, Oliver O'Halloran , Paul Mackerras , linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" The pcie_reset_state_t type has been introduced in the commit f7bdd12d234d ("pci: New PCI-E reset API") along with the enum pcie_reset_state, but it has never been used for anything else other than to define the members of the enumeration set in the enum pcie_reset_state. Thus, replace the direct use of enum pcie_reset_state in function arguments and replace it with pcie_reset_state_t type so that the argument type matches the type used in enum pcie_reset_state. Signed-off-by: Krzysztof Wilczyński --- arch/powerpc/kernel/eeh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c index 3bbdcc86d01b..15485abb89ff 100644 --- a/arch/powerpc/kernel/eeh.c +++ b/arch/powerpc/kernel/eeh.c @@ -714,7 +714,7 @@ static void eeh_restore_dev_state(struct eeh_dev *edev, void *userdata) * Return value: * 0 if success */ -int pcibios_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state) +int pcibios_set_pcie_reset_state(struct pci_dev *dev, pcie_reset_state_t state) { struct eeh_dev *edev = pci_dev_to_eeh_dev(dev); struct eeh_pe *pe = eeh_dev_to_pe(edev);