From patchwork Tue Mar 4 15:50:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liviu Dudau X-Patchwork-Id: 25687 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f71.google.com (mail-pb0-f71.google.com [209.85.160.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1F61D2066C for ; Tue, 4 Mar 2014 15:52:13 +0000 (UTC) Received: by mail-pb0-f71.google.com with SMTP id up15sf14502684pbc.6 for ; Tue, 04 Mar 2014 07:52:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=gM7qkwzStXW2qw+iWZVmodF0q9O3FqheaBW3YKhO3WM=; b=JDSX4PmVz4h9yQbpjvVY7K3sV4TCorxTvyxBKcsGPwqqtmV/iKXukdUeLQAyAbWwJ5 0ussacCKan8grENnSn/XobyKLzqe1nxug7j008eI9k4XZLwFjGHIVGB4rQiNwVz1+2aT 4Z3wgbfGgS5a3l5tXNmvFeYzUWo6ZbZsGA/6ixZInCXVCvyg7zvPEIOTMzP2mhLrtX4s aoawOlsRU86K4IxI9Miw6MF20tWxqkKdiOkAoQvSdFY0S1fkFW3wGyaPsrOcEuaCjPDB kcgHAtGAGiufolewIhFcf19lEEjv5m5F2ZeLIGqb+bF0HgXB4/F4RlHMvr+3Alw1L4ha 9Pcw== X-Gm-Message-State: ALoCoQlXscIT5zDROFYb9sy0u26td1sUViUkQ4ra8UqJZUxJMwMcqSvrH+M1u8lgiGDmVZnl8023 X-Received: by 10.68.216.230 with SMTP id ot6mr151183pbc.3.1393948333254; Tue, 04 Mar 2014 07:52:13 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.102.244 with SMTP id w107ls2502134qge.26.gmail; Tue, 04 Mar 2014 07:52:13 -0800 (PST) X-Received: by 10.58.97.171 with SMTP id eb11mr134036veb.64.1393948333111; Tue, 04 Mar 2014 07:52:13 -0800 (PST) Received: from mail-ve0-f171.google.com (mail-ve0-f171.google.com [209.85.128.171]) by mx.google.com with ESMTPS id tz5si1243042vdc.33.2014.03.04.07.52.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 04 Mar 2014 07:52:13 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.171; Received: by mail-ve0-f171.google.com with SMTP id cz12so5885422veb.2 for ; Tue, 04 Mar 2014 07:52:13 -0800 (PST) X-Received: by 10.220.191.134 with SMTP id dm6mr181796vcb.16.1393948333012; Tue, 04 Mar 2014 07:52:13 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.130.193 with SMTP id u1csp136055vcs; Tue, 4 Mar 2014 07:52:12 -0800 (PST) X-Received: by 10.194.71.78 with SMTP id s14mr322289wju.11.1393948331887; Tue, 04 Mar 2014 07:52:11 -0800 (PST) Received: from casper.infradead.org (casper.infradead.org. [2001:770:15f::2]) by mx.google.com with ESMTPS id eo11si16233582wjd.21.2014.03.04.07.52.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Mar 2014 07:52:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:770:15f::2 as permitted sender) client-ip=2001:770:15f::2; Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WKrcX-0004mi-I9; Tue, 04 Mar 2014 15:51:05 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WKrcR-0008OQ-MN; Tue, 04 Mar 2014 15:50:59 +0000 Received: from fw-tnat.cambridge.arm.com ([217.140.96.21] helo=cam-smtp0.cambridge.arm.com) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WKrc6-0008Ib-EG for linux-arm-kernel@lists.infradead.org; Tue, 04 Mar 2014 15:50:40 +0000 Received: from e106497-lin.cambridge.arm.com (e106497-lin.cambridge.arm.com [10.1.195.170]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id s24Fo4cX013537; Tue, 4 Mar 2014 15:50:06 GMT From: Liviu Dudau To: linux-pci , Bjorn Helgaas , Catalin Marinas , Will Deacon , linaro-kernel Subject: [PATCH v5 5/7] pci: Use parent domain number when allocating child busses. Date: Tue, 4 Mar 2014 15:50:02 +0000 Message-Id: <1393948204-11555-6-git-send-email-Liviu.Dudau@arm.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1393948204-11555-1-git-send-email-Liviu.Dudau@arm.com> References: <1393948204-11555-1-git-send-email-Liviu.Dudau@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140304_105038_853148_79BEE207 X-CRM114-Status: UNSURE ( 6.18 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [217.140.96.21 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: "devicetree@vger.kernel.org" , Arnd Bergmann , Benjamin Herrenschmidt , LKML , Tanmay Inamdar , LAKML X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: liviu.dudau@arm.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 pci_alloc_child_bus() uses the newly allocated child bus to figure out the domain number that is going to use for setting the device name. A better option is to use the parent bus domain number. Signed-off-by: Liviu Dudau diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 26237a0..a12cda5 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -677,7 +677,7 @@ static struct pci_bus *pci_alloc_child_bus(struct pci_bus *parent, * now as the parent is not properly set up yet. */ child->dev.class = &pcibus_class; - dev_set_name(&child->dev, "%04x:%02x", pci_domain_nr(child), busnr); + dev_set_name(&child->dev, "%04x:%02x", pci_domain_nr(parent), busnr); /* * Set up the primary, secondary and subordinate