Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp745071pxx; Mon, 26 Oct 2020 21:57:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyV+iHyKW+8Tt4v9KXcfd8w+tk9uK4g4MqbjOzQmgQUlqVmFe648UYpUUf67OScSCoxAssA X-Received: by 2002:a17:906:1a0e:: with SMTP id i14mr632826ejf.7.1603774654786; Mon, 26 Oct 2020 21:57:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603774654; cv=none; d=google.com; s=arc-20160816; b=QvDJvPXzx6AIpVC2DTjmNJLT3C93QxIgbhr5ADDf5ebVSxlqRlhOu6HybU+K1Z8Jet oyHUHKynFPObliihN+L5eLs7FXLYjf0VuNbM14pCYi1iWLMWVstz/fYhSrNeRohJTTdU qGkzGdF+gEAxh1+R+Qrei089H1W+gbc3jilV3GO2IvUnLP0+MM3jJw+F7RxRhklkBHB/ P1g3FnA3x65+pDEdw+J3Jz0MhxzfYBO6ZxssK48GSW/f7nWV+CJOaSd6w8uaSvqj2yEG 2eT8zSoxySBWkg1lGXBA0sZNoySQth+wg5rlKlxhZZEZ0Nd3lSjCUyABXBlfBBd6fblY 5x5Q== 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=keh1wRHN/4tsslMRzOuTclw7G7x3H0lboZJAsNxWG3ApAQyTPV+y5G4P7LSO36Hgph 15btM2gBDdiC/bYx5MmnsRnFJ8BCNyF9A5nNuICo3L90K27r6MvzRL7HYUcqBeHx6RYi 8+YJTYhmQFPgtV/bWVmKuPjokxB7gdf0j86qLgur1q14ANGhZm5sPkGsclTTYoDkpza9 JK7LQtAT/AKGPz1aFH8EKynb9UH/aoTumww2lUN9gLgr5vd4kvKA8IMvglq/6Qt3HRTx wB+KYWBL8oKTkFErTESfBKTWP2k1BQPcsW2y5pjAcUx1+7HbTl/fqzZhJPYygokhUTAW wsLQ== 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 o2si200971ejn.501.2020.10.26.21.57.13; Mon, 26 Oct 2020 21:57:34 -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 S1791040AbgJZS6J (ORCPT + 99 others); Mon, 26 Oct 2020 14:58:09 -0400 Received: from mga03.intel.com ([134.134.136.65]:52492 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404845AbgJZS6H (ORCPT ); Mon, 26 Oct 2020 14:58:07 -0400 IronPort-SDR: 4k0AKJfjE/eIQLjcI9K2Vr9M/eNPyqEdaIrWRRf3y5AyfSHu5bBqPnchkTEpivXyE9TlUW3CIl jGSSqqmX4RiQ== X-IronPort-AV: E=McAfee;i="6000,8403,9786"; a="168073143" X-IronPort-AV: E=Sophos;i="5.77,420,1596524400"; d="scan'208";a="168073143" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Oct 2020 11:58:06 -0700 IronPort-SDR: caTCKd572v7xQ6AABclg6jnE5hyqcN1jjoLw+eGO1zgUACsPF1FVBmSxQ48kS/Vy5+k5Mc6cvd gNRDKJNgbycg== X-IronPort-AV: E=Sophos;i="5.77,420,1596524400"; d="scan'208";a="525607448" Received: from dhrubajy-mobl.amr.corp.intel.com (HELO skuppusw-mobl5.amr.corp.intel.com) ([10.254.101.53]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Oct 2020 11:58:06 -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 v10 1/5] PCI: Conditionally initialize host bridge native_* members Date: Mon, 26 Oct 2020 11:56:39 -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