From patchwork Mon Mar 3 17:33:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liviu Dudau X-Patchwork-Id: 25626 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f198.google.com (mail-ob0-f198.google.com [209.85.214.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7525E206F3 for ; Mon, 3 Mar 2014 17:38:17 +0000 (UTC) Received: by mail-ob0-f198.google.com with SMTP id wn1sf7042312obc.1 for ; Mon, 03 Mar 2014 09:38:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=5NdOW7YcLtEK/mRbyWNYJFkchO/zBnVWGflh27oKpQw=; b=GxBieyGu7bdtaLEM7oIYMt+sxnfamzh9zGuchJei8/NDftKyjVrK2iueHdUwet9PWq rSHlrvbwRas9taY8onPqd4oGq39h4uB3QEVv/H0JxNnzo/2Yiq2QC93HLvuQbGrpICCk SnI65weAfJqc0MHeuAV809EePYxZ1dtLC+z+sPwPBndE1LVfR8DDPvGaC1duSHqkintF OqS5XnJfBk3Cw8OuEMxqZwOJX/G2SnYE7IAB+egsZCV3uOg+/RocYZzMtdJXMipxFuMD FtKivUfEjtZpN6ZoyryWfw3IXpcegUcU+Nxga0wzeMSwOuGMjRDGcr39C/gDmKPgsPDz NVGQ== X-Gm-Message-State: ALoCoQk83SDd80NVWFl3ZRK+JZ4zJhxkWYk0faqLxB7M0RiqmZJkirUNLktYgUuNkgIs/GZWEavj X-Received: by 10.182.66.193 with SMTP id h1mr14235529obt.47.1393868296745; Mon, 03 Mar 2014 09:38:16 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.95.119 with SMTP id h110ls2322980qge.54.gmail; Mon, 03 Mar 2014 09:38:16 -0800 (PST) X-Received: by 10.52.81.66 with SMTP id y2mr440363vdx.23.1393868296552; Mon, 03 Mar 2014 09:38:16 -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 cp10si3381874ved.20.2014.03.03.09.38.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 03 Mar 2014 09:38:16 -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 cz12so3993943veb.16 for ; Mon, 03 Mar 2014 09:38:16 -0800 (PST) X-Received: by 10.220.103.141 with SMTP id k13mr17969010vco.25.1393868296459; Mon, 03 Mar 2014 09:38:16 -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 u1csp70099vcs; Mon, 3 Mar 2014 09:38:16 -0800 (PST) X-Received: by 10.68.136.41 with SMTP id px9mr17946761pbb.14.1393868295669; Mon, 03 Mar 2014 09:38:15 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id iy3si11396416pbb.64.2014.03.03.09.38.15; Mon, 03 Mar 2014 09:38:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754811AbaCCRiG (ORCPT + 26 others); Mon, 3 Mar 2014 12:38:06 -0500 Received: from fw-tnat.cambridge.arm.com ([217.140.96.21]:53666 "EHLO cam-smtp0.cambridge.arm.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753149AbaCCReA (ORCPT ); Mon, 3 Mar 2014 12:34:00 -0500 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 s23HXGxC016067; Mon, 3 Mar 2014 17:33:18 GMT From: Liviu Dudau To: linux-pci , Bjorn Helgaas , Catalin Marinas , Will Deacon , linaro-kernel Cc: Benjamin Herrenschmidt , LKML , "devicetree@vger.kernel.org" , LAKML , Tanmay Inamdar Subject: [PATCH v4 5/6] pci: Use parent domain number when allocating child busses. Date: Mon, 3 Mar 2014 17:33:15 +0000 Message-Id: <1393867996-32299-6-git-send-email-Liviu.Dudau@arm.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1393867996-32299-1-git-send-email-Liviu.Dudau@arm.com> References: <1393867996-32299-1-git-send-email-Liviu.Dudau@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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