From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from flow-b5-smtp.messagingengine.com (flow-b5-smtp.messagingengine.com [202.12.124.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B67A8427A1F; Mon, 29 Jun 2026 15:48:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.140 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782748113; cv=none; b=QbUnRpW7CqSKG3RoXq6tgnW654tatDjtWxE0i3ipvPfcf3OAWU7VfQkfaHD+9cAoYtZRGFTSBRYkpW1v023lg9bvKEGf96GkBPXISitRJlFsbicb4SHBs9KJgIeDsjQp6NoTALkn6WlAw4KH7z8c52hdalrW0RlxTFBC6qLKVOs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782748113; c=relaxed/simple; bh=1McCVs2snxu+gNjJm1D421N5eVerVO5vK6JHvxW/TfQ=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=JkXKFk2KDlXlJXEHiJi7KHZnlLSmfiBNTVT4NuzOCwqFNoPrK2cHdXG1yL3YPokO+hwyOgbfsWKZuq+Qn9iX/kTHEZ0PXILsVfk1BV4Qwbo4GqGOfMyC2pyLqp+C5B1rYUd3kSe9hofSJ6tegmtqmUBkIPSeU+bHnf8DKOq3Bpk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de; spf=pass smtp.mailfrom=arndb.de; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b=otExSv6C; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=ZP+OSo5y; arc=none smtp.client-ip=202.12.124.140 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="otExSv6C"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="ZP+OSo5y" Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailflow.stl.internal (Postfix) with ESMTP id 7F8A013001E3; Mon, 29 Jun 2026 11:48:31 -0400 (EDT) Received: from phl-imap-05 ([10.202.2.95]) by phl-compute-04.internal (MEProxy); Mon, 29 Jun 2026 11:48:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1782748111; x=1782755311; bh=OQSYL+rcbbMvXGkfQit/IeSyVBDzp7a1uiLZytls49o=; b= otExSv6CCfwgU+53OmRzfq2B2DYzwG97/7OG2yFVL9SLp2zuXWfhdL/w+7nIA4id pS7hJpE+p/zM36qUEbCM1LqXAUyUGB34hT8s1CLctdvUhUl0w1ZhqpR2HIS3PV7o bsnIFZBboF30NjRkOQ9UT+Q8NXhm9E13I7offTJ2aRcuG8r2Lm82KoHQohaMMwV5 1pog70vnywIoIEN8MJJPZBLCU4XXKtem9FHI/gOfgvqsBOGTC7GkxZFe5P2Lw2ga yjsSm7K9GLJMBOqJ4k1/I3YVG3A8X1aWU9NyZdVYzw3BMgCE/ro9EeoLtAyGzeFK Pl4J0bO7j6edaTVNsgNFEA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1782748111; x= 1782755311; bh=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wBh9Kr050guMXdKmxiwbffVRqy2w X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 215901820082; Mon, 29 Jun 2026 11:48:31 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ThreadId: A045QOfflcQ7 Date: Mon, 29 Jun 2026 17:48:04 +0200 From: "Arnd Bergmann" To: "Geert Uytterhoeven" , "Arnd Bergmann" Cc: "Linus Walleij" , "Bartosz Golaszewski" , "Marcel Holtmann" , "MyungJoo Ham" , "Chanwoo Choi" , "Geert Uytterhoeven" , "Andy Shevchenko" , "Dmitry Torokhov" , "Ulf Hansson" , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, "open list:GPIO SUBSYSTEM" , dri-devel@lists.freedesktop.org, linux-i2c@vger.kernel.org, linux-iio@vger.kernel.org, linux-input@vger.kernel.org, "linux-mmc @ vger . kernel . org" , linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, linux-usb@vger.kernel.org Message-Id: In-Reply-To: References: <20260629135917.1308621-1-arnd@kernel.org> Subject: Re: [PATCH] [RFC] gpiolib: introduce gpio_name() helper Content-Type: text/plain Content-Transfer-Encoding: 7bit On Mon, Jun 29, 2026, at 17:29, Geert Uytterhoeven wrote: > On Mon, 29 Jun 2026 at 15:59, Arnd Bergmann wrote: >> From: Arnd Bergmann >> >> Most remaining users of desc_to_gpio() only call it for printing debug >> information. >> >> Replace this with a new gpiod_name() helper that returns the >> gpio_desc->name string after checking the gpio_desc pointer. >> >> Signed-off-by: Arnd Bergmann > > Thanks for your patch! Thanks for testing! >> --- a/drivers/gpio/gpio-aggregator.c >> +++ b/drivers/gpio/gpio-aggregator.c >> @@ -758,8 +758,8 @@ int gpiochip_fwd_desc_add(struct gpiochip_fwd *fwd, struct gpio_desc *desc, >> >> fwd->descs[offset] = desc; >> >> - dev_dbg(chip->parent, "%u => gpio %d irq %d\n", offset, >> - desc_to_gpio(desc), gpiod_to_irq(desc)); >> + dev_dbg(chip->parent, "%u => gpio %s irq %d\n", offset, >> + gpiod_name(desc), gpiod_to_irq(desc)); >> >> return 0; >> } > > Before, this printed: > > gpio-aggregator gpio-aggregator.1: 0 => gpio 589 irq 188 > gpio-aggregator gpio-aggregator.1: 1 => gpio 590 irq 189 > > After, this prints: > > gpio-aggregator gpio-aggregator.1: 0 => gpio (null) irq 188 > gpio-aggregator gpio-aggregator.1: 1 => gpio (null) irq 189 > > Same results for instantiation using sysfs or configfs[1], although > the latter does have optional support for specifying the name. I wonder how many of the other instances have the same problem then. Would it be appropriate for gpiochip_fwd_desc_add() to set a name itself to address this one? Arnd