Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp342817ybg; Mon, 1 Jun 2020 02:52:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwo4s3s7mGplMsvP1zSQySK78I4FcKxo27VrxPqOEmOi8AGk9kyjLsYu+FymfddDGQkCZBF X-Received: by 2002:a50:ac84:: with SMTP id x4mr21579038edc.124.1591005135218; Mon, 01 Jun 2020 02:52:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591005135; cv=none; d=google.com; s=arc-20160816; b=u/Gg3/IRFZxhstyZ0VVShaYfmf32yycLBtINnsM71K1MDc2zlI9+8bCi/rokglNC7o KxxNjvi6DMa2W62nOW7ILxoPA9okqGh+OnqyzEgguCWfcc7NLh2ZWax1BCtR3Bly3dma zGHsHegxeDllr115rFd1czYzNb6CN+3Jy5OxTkXAiWwMWqJoK5DrCkwQenBVHzojKHA5 hUveuY/6eUk/qFZWyt4neU8cvAnRKGMG98efjub5sGhhN9Xbn8SuyPEOdRL+vseWd1RP HcdnqpXPeZxE+/9vKvQIaDuE4i3AkFSZKlX5DAi1sD8W1D/4wQLsR2i4gHzv/xOQ1aya BPmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Uz9/BKug/qye6puYR+4p5iYwq/hQCNsE8MJiffuGNfE=; b=FbTwRHUyHcRR/A9eb0z2rpqsnSDMDOPyxMS/QOSJU61ZndoeQI/byn9eIHsZYP1YKb 27fSSRmeFhxpEsErdmoj7VW2j/qw9IZN3y/npsgdWAhyiDi2/EMWxib4P38rgH/0N7c9 S7JrTjRtok75NiRN6sXiejoSxuOtoNlsie1aaGF4rKh1CqwbQMZm6hqDRd5q2tI76RSp j47zr6IS7TD4DHPy/pOV4hhdIeu6t1OcN85tHJ8tj2zulJlPBB+JXQBXZ3msa3DGAsSi u7U0BndgjCrUfmb1n44LzypXfSv2X2jTcAUOUdEN6QO6LT/ic13Log9PkYRVp/xT6Ka1 UzXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vw6iMKZo; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q25si1915578edb.587.2020.06.01.02.51.52; Mon, 01 Jun 2020 02:52: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=default header.b=vw6iMKZo; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725974AbgFAJsG (ORCPT + 99 others); Mon, 1 Jun 2020 05:48:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:51964 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725290AbgFAJsG (ORCPT ); Mon, 1 Jun 2020 05:48:06 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 D6B53206C3; Mon, 1 Jun 2020 09:48:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591004885; bh=t58s93YEjg685z8DSWWCBbOs5EB6tH/ebWHiYN4Wr8I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vw6iMKZoMGkvhHzqZvOc5GnWU1yuK8WeZ7NQpTyJiJkvtgtzqC9LB0+Xsfthu9oOP QaYbERmzIj/NZUX3TWU36u8uw4gsQPacwZ8lLQhxexqcXFFveEuZZJRB+InpLq9I2H Lwadj8BbmWSx2ROq9Y4XcUk/wxfctjukLWM6bJpI= Date: Mon, 1 Jun 2020 11:48:02 +0200 From: Greg Kroah-Hartman To: Vladimir Oltean Cc: Sergei Shtylyov , Arnd Bergmann , Andrew Morton , bgolaszewski@baylibre.com, mika.westerberg@linux.intel.com, efremov@linux.com, ztuowen@gmail.com, lkml , netdev Subject: Re: [PATCH v2] devres: keep both device name and resource name in pretty name Message-ID: <20200601094802.GA1824038@kroah.com> References: <20200531180758.1426455-1-olteanv@gmail.com> <39107d25-f6e6-6670-0df6-8ae6421e7f9a@cogentembedded.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 01, 2020 at 12:36:08PM +0300, Vladimir Oltean wrote: > Hi Sergei, > > On Mon, 1 Jun 2020 at 10:51, Sergei Shtylyov > wrote: > > > > Hello! > > > > On 31.05.2020 21:07, Vladimir Oltean wrote: > > > > > From: Vladimir Oltean > > > > > > Sometimes debugging a device is easiest using devmem on its register > > > map, and that can be seen with /proc/iomem. But some device drivers have > > > many memory regions. Take for example a networking switch. Its memory > > > map used to look like this in /proc/iomem: > > > > > > 1fc000000-1fc3fffff : pcie@1f0000000 > > > 1fc000000-1fc3fffff : 0000:00:00.5 > > > 1fc010000-1fc01ffff : sys > > > 1fc030000-1fc03ffff : rew > > > 1fc060000-1fc0603ff : s2 > > > 1fc070000-1fc0701ff : devcpu_gcb > > > 1fc080000-1fc0800ff : qs > > > 1fc090000-1fc0900cb : ptp > > > 1fc100000-1fc10ffff : port0 > > > 1fc110000-1fc11ffff : port1 > > > 1fc120000-1fc12ffff : port2 > > > 1fc130000-1fc13ffff : port3 > > > 1fc140000-1fc14ffff : port4 > > > 1fc150000-1fc15ffff : port5 > > > 1fc200000-1fc21ffff : qsys > > > 1fc280000-1fc28ffff : ana > > > > > > But after the patch in Fixes: was applied, the information is now > > > presented in a much more opaque way: > > > > > > 1fc000000-1fc3fffff : pcie@1f0000000 > > > 1fc000000-1fc3fffff : 0000:00:00.5 > > > 1fc010000-1fc01ffff : 0000:00:00.5 > > > 1fc030000-1fc03ffff : 0000:00:00.5 > > > 1fc060000-1fc0603ff : 0000:00:00.5 > > > 1fc070000-1fc0701ff : 0000:00:00.5 > > > 1fc080000-1fc0800ff : 0000:00:00.5 > > > 1fc090000-1fc0900cb : 0000:00:00.5 > > > 1fc100000-1fc10ffff : 0000:00:00.5 > > > 1fc110000-1fc11ffff : 0000:00:00.5 > > > 1fc120000-1fc12ffff : 0000:00:00.5 > > > 1fc130000-1fc13ffff : 0000:00:00.5 > > > 1fc140000-1fc14ffff : 0000:00:00.5 > > > 1fc150000-1fc15ffff : 0000:00:00.5 > > > 1fc200000-1fc21ffff : 0000:00:00.5 > > > 1fc280000-1fc28ffff : 0000:00:00.5 > > > > > > That patch made a fair comment that /proc/iomem might be confusing when > > > it shows resources without an associated device, but we can do better > > > than just hide the resource name altogether. Namely, we can print the > > > device name _and_ the resource name. Like this: > > > > > > 1fc000000-1fc3fffff : pcie@1f0000000 > > > 1fc000000-1fc3fffff : 0000:00:00.5 > > > 1fc010000-1fc01ffff : 0000:00:00.5 sys > > > 1fc030000-1fc03ffff : 0000:00:00.5 rew > > > 1fc060000-1fc0603ff : 0000:00:00.5 s2 > > > 1fc070000-1fc0701ff : 0000:00:00.5 devcpu_gcb > > > 1fc080000-1fc0800ff : 0000:00:00.5 qs > > > 1fc090000-1fc0900cb : 0000:00:00.5 ptp > > > 1fc100000-1fc10ffff : 0000:00:00.5 port0 > > > 1fc110000-1fc11ffff : 0000:00:00.5 port1 > > > 1fc120000-1fc12ffff : 0000:00:00.5 port2 > > > 1fc130000-1fc13ffff : 0000:00:00.5 port3 > > > 1fc140000-1fc14ffff : 0000:00:00.5 port4 > > > 1fc150000-1fc15ffff : 0000:00:00.5 port5 > > > 1fc200000-1fc21ffff : 0000:00:00.5 qsys > > > 1fc280000-1fc28ffff : 0000:00:00.5 ana > > > > > > Fixes: 8d84b18f5678 ("devres: always use dev_name() in devm_ioremap_resource()") > > > Signed-off-by: Vladimir Oltean > > [...] > > > > You didn't write the version log -- what changed since v1? > > > > MBR, Sergei > > The changes in v2 are that I'm checking for memory allocation errors. You always need to mention that below the --- line, as the documentation says to. Please send a v3 with that fixed up. thanks, greg k-h