Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1041391pxx; Tue, 27 Oct 2020 07:00:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzqT3IZ7aM3CYtXsDUSd7DZvOvsU46MAiuj04nugiIluytC+C4i5h11zvhGQqszkbQKnrvn X-Received: by 2002:a17:906:68c4:: with SMTP id y4mr2587399ejr.197.1603807252553; Tue, 27 Oct 2020 07:00:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603807252; cv=none; d=google.com; s=arc-20160816; b=Etbm3WPUsZG7l6eHGJQIiQvpCfDvG1zOfuKwDM9GoqmFZoXc9VCtIA1YSBtj4htPgp GEhHSTDqJGG8lEUECBn+G+hQyJrQrCeZfSUvRSFvdEQ/a+JUqrmVw0Y+Qci7wtJz5HMo 8bvOSn6hh92yVrMAi57Z32HgmJt9L8luW0EY68JzwB/BbAH7YuQ3Fu4Hj2kynHct7qtu uoONIPECOwg++VSUKBzWvm/lpzkda5/L7Wb6q/+E87qteFwUd/q2KQsylNAk/17+7eMc eDRKy1j36R+lyUmjFOFLe3PZNLLV7kNsFR3i1d5hZv5xUCqjFh1a9JLf9v7fEogyqGUX WVlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:references:in-reply-to :message-id:date:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=QnjFmCKddvni8+tvDZDplS2Vg1yXuwUz8+xryIaeyR8=; b=xXV7v0hrcyeTAkTkU/0WkTjPLzVJ2JLUPKwb5SLII4BBGPSYqZjH3EWMIwOWgv5VOX v9E2C2T2jZcXhQxF4Cw96AQyPQdsp5nvHLSzgJ2gn80yhWfckSfWl3NJoji6KWtHUX8g KukdwAuFWTOD+CVJTCiIl2fbDZEss8UHMk6XJ0yRIVwZOUZE//Ex23uJf+ASqGTqsXM9 O1FWtr9c7yxqzfpkWdV4CrfKj3O5TpgNV4m6VbW0dHxfwO0cWPlC5KRxIgOa+x/HM5x/ I84NNGa9wD7CU94WEM5W7q/gPNi+D53RDDWliCa8H/jbRMiwEN+NUiKtLzGF2R6a5s9v vZXA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id sd16si1020323ejb.498.2020.10.27.07.00.28; Tue, 27 Oct 2020 07:00:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2409036AbgJ0C5T (ORCPT + 99 others); Mon, 26 Oct 2020 22:57:19 -0400 Received: from mga01.intel.com ([192.55.52.88]:23078 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2408622AbgJ0C5R (ORCPT ); Mon, 26 Oct 2020 22:57:17 -0400 IronPort-SDR: ghEaewmGwiyrHAt+mbJ2p08RsyQopMW1CcuE6JansBGaJ86rDpaAMLz0HtbNFstK0CP8uKRGFO qWnG0A8P+zQA== X-IronPort-AV: E=McAfee;i="6000,8403,9786"; a="185753256" X-IronPort-AV: E=Sophos;i="5.77,422,1596524400"; d="scan'208";a="185753256" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Oct 2020 19:57:16 -0700 IronPort-SDR: N26GHuD3IgSfoKuPgtwNEZAV7nch5YMHENxpHmTHI1g6aYWxQ2O6PgscC2WjfQmYJf1JJh1ITH HW51O6pcwV7A== X-IronPort-AV: E=Sophos;i="5.77,422,1596524400"; d="scan'208";a="322772469" Received: from dhrubajy-mobl.amr.corp.intel.com (HELO skuppusw-mobl5.amr.corp.intel.com) ([10.254.101.53]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Oct 2020 19:57:15 -0700 From: Kuppuswamy Sathyanarayanan To: bhelgaas@google.com Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, ashok.raj@intel.com, sathyanarayanan.kuppuswamy@linux.intel.com, knsathya@kernel.org Subject: [PATCH v11 1/5] PCI: Conditionally initialize host bridge native_* members Date: Mon, 26 Oct 2020 19:57:04 -0700 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If CONFIG_PCIEPORTBUS is not enabled in kernel then initialing struct pci_host_bridge PCIe specific native_* members to "1" is incorrect. So protect the PCIe specific member initialization with CONFIG_PCIEPORTBUS. Signed-off-by: Kuppuswamy Sathyanarayanan --- drivers/pci/probe.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 4289030b0fff..756fa60ca708 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -588,12 +588,14 @@ static void pci_init_host_bridge(struct pci_host_bridge *bridge) * may implement its own AER handling and use _OSC to prevent the * OS from interfering. */ +#ifdef CONFIG_PCIEPORTBUS bridge->native_aer = 1; bridge->native_pcie_hotplug = 1; - bridge->native_shpc_hotplug = 1; bridge->native_pme = 1; - bridge->native_ltr = 1; bridge->native_dpc = 1; +#endif + bridge->native_ltr = 1; + bridge->native_shpc_hotplug = 1; device_initialize(&bridge->dev); } -- 2.17.1