Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp704596pxb; Thu, 19 Nov 2020 11:38:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJwTMQQKueHtGs6VOU1/NXhpOPKDsAumK4RM5J7ulqbORyWtucN/Z66M51YgPD7T23+T8ZtZ X-Received: by 2002:a17:906:bc43:: with SMTP id s3mr4525870ejv.411.1605814718424; Thu, 19 Nov 2020 11:38:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605814718; cv=none; d=google.com; s=arc-20160816; b=CQBFmZ1yH92a7tgzdiiFx6TRjMt6P1buYOR33Cz/eBt8Pn6P9GlwrFkmW4WjsV4wyS eActwubB/hCzjgNnQ1ytDVf6j1PrHkzf7MWks4wSI7bSpmH6kgEy/7OG0hB0HfNe3qCs 2uXmITMDNdvVgAkUwn1W/oqU6IvZgmbqeSc/VbSvy52SP8UWVwRiVzQprLlYU3DEMevq Vnfz7F61b7uBL50ZFLMVxX3PwTxDtG3AyOql3aTBS0qZDSATbI7dfRVpPdOiM/ojAhdi Zx71CQyBa8VLIxi7wmUguqIizITqwGK4Hi+IhMuR5RhYVUwyz7O9E9CnZmT7HWschdtV XiAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=+RsXs6d5zLocoD3v0aXRhHxQS4iZdKhWSWC5sNTBtyM=; b=g8I17OegmCRIi3VOdF3xPwFskoht5pzwbL4wetHS5lVvb59vByi0DJafQtUoBDL0+l bHh/uVk8MhjWnf9EnuTw2pNesrxZk/WZY7t7FcFyK1UPgTNHNqqPCvOomGX6c7nyt+HJ H4fTYcCLuD5BwaO0Gi33VTMpQTamYdPFQl6KzTx0Xm8ojbEfK1SRgHj2IiQPKYOxvg5t bRiUNgzFIDb/AKWZ3W9tCPdAooXohoSxD2Wr+0NEwXOma8q6s0Lz7yHAcHyFesnQMoGh 65baJN52llM/syKGFUQdtJDNb+lO25/pJcyorF8zZjOLa6FJJgdYtSgl79x8R/63AD+v aLYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="bOixT/3U"; 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 w6si473213edf.136.2020.11.19.11.38.14; Thu, 19 Nov 2020 11:38:38 -0800 (PST) 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=default header.b="bOixT/3U"; 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 S1728302AbgKSTff (ORCPT + 99 others); Thu, 19 Nov 2020 14:35:35 -0500 Received: from mail.kernel.org ([198.145.29.99]:40310 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727192AbgKSTff (ORCPT ); Thu, 19 Nov 2020 14:35:35 -0500 Received: from localhost (129.sub-72-107-112.myvzw.com [72.107.112.129]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 29B5122201; Thu, 19 Nov 2020 19:35:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605814534; bh=Th0cyt4YYbn1KfH1XyPGrc0EoMvuViVWq1FOPk9NPJM=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=bOixT/3UwVfeX8klYWuIsFXoH6O0fkhQB42HxLZBAgImMpqYapfxTeevHjlBesukn efBMaZJGVRkVpBxCHqI6ajZhEmVWrwsbJcV491TEhYVoAUCTo+tJua1/zeHMl1+47g jcEIcc6VKpdIuvUpXyAxsUyBuQfDKiuoJoC4t2LU= Date: Thu, 19 Nov 2020 13:35:32 -0600 From: Bjorn Helgaas To: Alexander Lobakin Cc: Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH pci-next] pci: remap: keep both device name and resource name for config space Message-ID: <20201119193532.GA195197@bjorn-Precision-5520> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Please look at the git history and follow the subject line convention. On Thu, Nov 19, 2020 at 07:04:42PM +0000, Alexander Lobakin wrote: > Follow the rule taken in commit 35bd8c07db2c > ("devres: keep both device name and resource name in pretty name") > and keep both device and resource names while requesting memory > regions for PCI config space to prettify e.g. /proc/iomem output: > > Before (DWC Host Controller): > > 18b00000-18b01fff : dbi > 18b10000-18b11fff : config > 18b20000-18b21fff : dbi > 18b30000-18b31fff : config > 19000000-19ffffff : pci@18b00000 > 19000000-190fffff : PCI Bus 0000:01 > 19000000-1900ffff : 0000:01:00.0 > 19100000-191fffff : PCI Bus 0000:01 > 1a000000-1affffff : pci@18b20000 > 1a000000-1a0fffff : PCI Bus 0001:01 > 1a000000-1a00ffff : 0001:01:00.0 > 1a100000-1a1fffff : PCI Bus 0001:01 > > After: > > 18b00000-18b01fff : 18b00000.pci dbi > 18b10000-18b11fff : 18b00000.pci config > 18b20000-18b21fff : 18b20000.pci dbi > 18b30000-18b31fff : 18b20000.pci config Makes sense. I would remove the rest of this output from the commit log since it isn't relevant and doesn't change. > 19000000-19ffffff : pci@18b00000 > 19000000-190fffff : PCI Bus 0000:01 > 19000000-1900ffff : 0000:01:00.0 > 19100000-191fffff : PCI Bus 0000:01 > 1a000000-1affffff : pci@18b20000 > 1a000000-1a0fffff : PCI Bus 0001:01 > 1a000000-1a00ffff : 0001:01:00.0 > 1a100000-1a1fffff : PCI Bus 0001:01 > > Signed-off-by: Alexander Lobakin > --- > drivers/pci/pci.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c > index e578d34095e9..0716691f7d14 100644 > --- a/drivers/pci/pci.c > +++ b/drivers/pci/pci.c > @@ -4188,7 +4188,14 @@ void __iomem *devm_pci_remap_cfg_resource(struct device *dev, > } > > size = resource_size(res); > - name = res->name ?: dev_name(dev); > + > + if (res->name) > + name = devm_kasprintf(dev, GFP_KERNEL, "%s %s", dev_name(dev), > + res->name); > + else > + name = devm_kstrdup(dev, dev_name(dev), GFP_KERNEL); > + if (!name) > + return IOMEM_ERR_PTR(-ENOMEM); > > if (!devm_request_mem_region(dev, res->start, size, name)) { > dev_err(dev, "can't request region for resource %pR\n", res); > -- > 2.29.2 > >