Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2160461rwl; Sat, 8 Apr 2023 08:55:34 -0700 (PDT) X-Google-Smtp-Source: AKy350aClvAorbV4MVqRC3VeitnbPtwvlEc1fgwlbqtJt0hg/lVjCCnBPlDIR/jFEc3VJVOnAbSF X-Received: by 2002:a05:6402:4316:b0:504:7642:3038 with SMTP id m22-20020a056402431600b0050476423038mr6027914edc.10.1680969334226; Sat, 08 Apr 2023 08:55:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680969334; cv=none; d=google.com; s=arc-20160816; b=xNFffu+8aZ4NmKKt302s0nCR6R0GC4zeqS+Y2G62VZSFUcPVgPExIzwkBD/h7kcVfe y9MuQnbqxZk2P/FIE7eInau565C+sb+Dua9AWNgK/cjn+X60swpSnkvp92OkobgQ34ab crSSgY4aigiGUQzDFkCFXmsES6rVTuuWzWF6VAxCsPQ1gkzOy5dDYL+2Kg1vzv1dpK/g U2drJ6S1eesOdfhZIX9oGAX6Rggli1pT1rDUDoCVWmdN+NUB+RD85u/A09euDHi5S6Xt BrCsMgHT7GoL4htAKP0hzhI36BEC6OxdNAxm6sYG9njbJtoJzAjM5OWUyID4kFmVl17C N2dw== 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=9SPPUe/3Vip0wDrcbUam+72iuqUbo0HrNwZFsCkDcOE=; b=YeMkX2Aa6VV40pWSB7R6CTdeqABsOwn8ZA6ByzGhSsGlmIjHeoLu6/zRTEbIinhH6o lxYKErvg4mATOGunpYXddsEM7v4Jdo3ka4J0Yh4xZv63DAXu+RucMVD+3B/4WtbTxacc SfQyqDlZL/SeMM4vkpItiUS9zNbNBXt+CcDv84GHSUhNgl5zu34hwtwgqqpusghWmW+G MaR6uXJeQBJXoGfYp43NSVL0IRHCa3gcaZfIzeooyXSRvr7tcCpB3rys0YhU/hDi+AfQ 4xL1yhWBFtnCcMnXVek2+vF5mR/xg/fIIPIih3qa66VhRvaOKBKbmX59wl0aHdloYwFa 2cZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QEVLzhN5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a10-20020aa7cf0a000000b004ad06322427si2614721edy.9.2023.04.08.08.55.06; Sat, 08 Apr 2023 08:55:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QEVLzhN5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230086AbjDHPtX (ORCPT + 99 others); Sat, 8 Apr 2023 11:49:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229486AbjDHPtW (ORCPT ); Sat, 8 Apr 2023 11:49:22 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB7E4CA07 for ; Sat, 8 Apr 2023 08:49:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 74FE360AB7 for ; Sat, 8 Apr 2023 15:49:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B4256C433EF; Sat, 8 Apr 2023 15:49:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680968960; bh=0pyF5BprYbz87qK2AZkPwODALXJFq6DUsJqadpHT440=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QEVLzhN5SEkX1+QZq/Bau27bV5Mh9AnbArhHdJyNTVbn9zfH8iAnGGGBoITMNBoN/ A4Bmgui6JPgoyuvxc2sHGX+q8KPsszDv91VfHzJgJiNfA8NIzDoeqs8X1yrLj34bKD HroYGax7WJ+bYG++j11uqGfNrb/+H7RUp+PEoOy5Jf6ZSBcEZ9boFo3Eaei1aUvF0z +FHQLQpu0vXtA7lqBBxvuKhQDiiqJ/mgEXjt3KSrSn9O7rBLL0rPg5CuS5MTA953Pp R/MNQ4q1u+rEEGFCfpD4VwoEUSTWB/K0i2MPt6N/AKHmUAmQnTVQrfy41NOOTFidnZ D6ALlSY8iR3ww== Received: by pali.im (Postfix) id 17A9D1C97; Sat, 8 Apr 2023 17:49:18 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Michael Ellerman , Christophe Leroy , Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/8] powerpc/85xx: mpc85xx_ds: Simplify mpc85xx_exclude_device() function Date: Sat, 8 Apr 2023 17:48:08 +0200 Message-Id: <20230408154814.10400-3-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230408154814.10400-1-pali@kernel.org> References: <20230408154814.10400-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Function mpc85xx_exclude_device() is installed and used only when pci_with_uli is fsl_pci_primary. So replace check for pci_with_uli by fsl_pci_primary in mpc85xx_exclude_device() and move pci_with_uli variable declaration into function mpc85xx_ds_uli_init() where it is used. Signed-off-by: Pali Rohár --- arch/powerpc/platforms/85xx/mpc85xx_ds.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c index ed7b71d55b10..0c905a838942 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c @@ -108,12 +108,10 @@ void __init mpc85xx_ds_pic_init(void) } #ifdef CONFIG_PCI -static struct device_node *pci_with_uli; - static int mpc85xx_exclude_device(struct pci_controller *hose, u_char bus, u_char devfn) { - if (hose->dn == pci_with_uli) + if (hose->dn == fsl_pci_primary) return uli_exclude_device(hose, bus, devfn); return PCIBIOS_SUCCESSFUL; @@ -124,6 +122,7 @@ static void __init mpc85xx_ds_uli_init(void) { #ifdef CONFIG_PCI struct device_node *node; + struct device_node *pci_with_uli; /* See if we have a ULI under the primary */ -- 2.20.1