Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp497488pxt; Thu, 5 Aug 2021 05:02:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRfSnxpeC83Eo/u26wOnLwHpcvE562SM+t5PcPqPRdQghmyGYNkWMNmANLrdqvr0qcl6J8 X-Received: by 2002:a05:6638:410e:: with SMTP id ay14mr4256638jab.76.1628164935114; Thu, 05 Aug 2021 05:02:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628164935; cv=none; d=google.com; s=arc-20160816; b=DgKrF6CrtrSX1fNumo5eiMMSNnqvwTcyZoAu0Doeni4eQpXcIB/8yCDfGW9bl+wArU EjrrA+M6iS0ZG8Sjxle3V+rV/V6/iUnMwh5AtN1YpcVWCQ7raxKfRy161k8u9KFENIs7 +h2bMH6f3VQzpdA/WK8zJYv5kb0ps80o0q1jMMPyu8i/hC492LvfYMoFK2Uq3CPFqYCW 2fxCCvPM2FXXjsI5hiNumUq47c/xKcTxBEGrSNGPBbcOqD+HU24qXFkZJLaLuGDhAeCd EPerFAXiXNxzzLe3z7ic6qvSJLU45Wa/D+AUZ7g/+vx6n+hOt3rMvgvc6XYb2LxoLT4e V/nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/+CDcSfK9J9Fb3PlogccoTe394u4uzuLdgPYnfB5/6Q=; b=VdE6PPVwS4fPWQSZvbc4A/cqsLpMswPBC0HV6rYx6FeN1AeTb3VEyA/ILKrXUpjfMp E/cdLwAHQ7W7SGxH0H4lSP5isYO6aIPr15Sjh9U1tS8jiyFyTIpf6l+REm6Mb2P9ZShB CwFss75KY4B8XCqkkmheH1iDe7OBQPSzS/O3bjPJeZNw4u+w/ie33ZaxLHuvTETXlIYr ZeKKrRVgUOB9116xcv9SP44BCKxJA4ahfFIPl4krC0NqLzWNsGRv7kARIsVws3KeG1kY nU8RAmScyiCMyK6rrmsGZ2uPrImhpzIE0WnEC4l9Ud0kGb6DrmXDKwAzsGLsNzE7/rcU lwug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=g1WNQnAW; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z12si5183844iln.160.2021.08.05.05.02.01; Thu, 05 Aug 2021 05:02:15 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=g1WNQnAW; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239470AbhHEI3X (ORCPT + 99 others); Thu, 5 Aug 2021 04:29:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:44512 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233871AbhHEI3W (ORCPT ); Thu, 5 Aug 2021 04:29:22 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 14D1C60F43; Thu, 5 Aug 2021 08:29:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1628152149; bh=yWq8YLyiFewgrTfnETHlC/L3kFIsqG78OX2q0kQmbRY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g1WNQnAWBAGniaPG60IxnhgbSvUpwPf//+BZ4Drhtsr9Kny8e3rr5vx0p14xA9JYI RBn3IyV/9yTx5/SsEpeZ43GVz/0Z1uMqEPJDyRe5zaJSgAjZW1cFEyRIP1ZvjvmEWG dsK3PA0DekE77A64g3OTdV9CYyl/dZrOF+L9cUj/dmAJ99mKIAg1WVCXhhjhm8h1YR lz4RNycAKYMqKkzI6zEUDDYYWkxZWdh1yJxZz9eWUEic0TuDDVn4y2ssb0IkEPeypY Jw0YL9tHl2eg+5ZLfUqh98ZR22Jjxz1IKbLoYL4whDoDpzB2LZ6QBViZvFzbsG2ve4 Fn/U+cJr+PPZQ== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mBYkP-001DuY-UI; Thu, 05 Aug 2021 10:29:01 +0200 From: Mauro Carvalho Chehab To: Rob Herring Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Bjorn Helgaas , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: [PATCH 2/3] PCI: of: Setup PCI before setting the OF node Date: Thu, 5 Aug 2021 10:28:59 +0200 Message-Id: X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Mauro Carvalho Chehab Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org With this change, it is easier to add a debug printk at pci_set_of_node() in order to address possible issues. Signed-off-by: Mauro Carvalho Chehab --- drivers/pci/probe.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 79177ac37880..c5dfc1afb1d3 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -2374,15 +2374,14 @@ static struct pci_dev *pci_scan_device(struct pci_bus *bus, int devfn) dev->vendor = l & 0xffff; dev->device = (l >> 16) & 0xffff; - pci_set_of_node(dev); - if (pci_setup_device(dev)) { - pci_release_of_node(dev); pci_bus_put(dev->bus); kfree(dev); return NULL; } + pci_set_of_node(dev); + return dev; } -- 2.31.1