From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E47BA606A32D for ; Thu, 3 Dec 2026 10:20:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=3cFVYD+b; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=IBwiIVxe DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=54LzJ3edcTn2BFoqosOdTmYaVw4nNKE9euwr4w4ajoc=; b=3cFVYD+brk8aO1gHPUuaUngGRC YFR7N1U6fYICgFzDShWGz8j05jmcuF0jWXFGnzb4TC9Rm9AUvnaKtdmh15498zKx+2PGEzwCuST7E 9gfPSD15bDYG7wqQ6edMiSpVgidlNUTmT76Qb0HhOwqqzt38jE2KGxXfgJmViV8ihg3TWuZdu+bmG uoj/YqKRjXM7meR1dEx6xTmqiZBF86tNiGr9/kapciTE+19QCXYUIRnb+ImTuLPDzTcACxdKTXb+3 b1oXX/wjQkZDRjkaViYRvHZioaqw+csf2/C0clW/qPJrATVHIyHx+lyHvk8F07awG594uVhoCdPpH SufUbNLw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZ3vf-0000000E9C7-01lb; Thu, 03 Dec 2026 10:20:43 +0000 Received: from mgamail.intel.com ([198.175.65.17]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZ3vb-0000000E9BY-25W7 for linux-arm-kernel@lists.infradead.org; Thu, 03 Dec 2026 10:20:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796293240; x=1827829240; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=54LzJ3edcTn2BFoqosOdTmYaVw4nNKE9euwr4w4ajoc=; b=IBwiIVxe7Rtax0BBBJ+lmfBhFjKc4uuHuFKOMYDPP0yIFNNd235Qhp/T t0An6Af4eFjuAotxPjUYqDVT/XQXt+NUsKiT8xfLhxvkF4iAiHLaAglLv Xgq8JFyq7wyac9v9FgUweATfvjyKbj4zw2+lrmKKFHnluZEBsiGvRFr7d lh8wvLnG5HTUCJhUqGq4UAADsATo1dFhRpKrqnsnRdt2d9rfx8RJoU5mg sSy+wveFCjyvwVb5bak8fkhzEOkKlzlmPmEKuOJQAex5CBalB8vlLqXhH JvQQig7JcSwqaXvsdJq0MPnRkdmNs8nYjfSSfRiLhJ2Y2PCgv21VqYaIh Q==; X-CSE-ConnectionGUID: OJaz1ZO3RsKRYagkCvNqEg== X-CSE-MsgGUID: iJxC0QdfQ3612xsiBB4w8g== X-IronPort-AV: E=McAfee;i="6800,10657,11984"; a="5254635" X-IronPort-AV: E=Sophos;i="6.27,248,1787036400"; d="scan'208";a="5254635" Received: from fmviesa013.fm.intel.com ([10.60.135.153]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2026 02:20:39 -0800 X-CSE-ConnectionGUID: NE3bi1iVS5Kzvv88AQdPIg== X-CSE-MsgGUID: goDgcv5aTdep06ZCnOLuLw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,248,1787036400"; d="scan'208";a="15749164" Received: from inaky-mobl1.amr.corp.intel.com (HELO localhost) ([10.245.244.115]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2026 02:20:35 -0800 Date: Thu, 3 Dec 2026 12:20:32 +0200 From: Andy Shevchenko To: Michael Walle Cc: William Breathitt Gray , Linus Walleij , Bartosz Golaszewski , Petar Stepanovic , SriNavmani A , Prasad Bolisetty , Tzu-Hao Wei , Karthikeyan Mitran , Mathieu Dubois-Briand , Lee Jones , Long Zhao , Joseph Telaak , linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [RFT PATCH v2 04/14] gpio: rtd1625: create the IRQ domain from the gpio-regmap callback Message-ID: References: <20261127145232.814492-1-mwalle@kernel.org> <20261127145232.814492-5-mwalle@kernel.org> X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261203_022040_196699_91DD2607 X-CRM114-Status: GOOD ( 19.72 ) X-Spam-Score: -4.4 (----) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Mon, Nov 30, 2026 at 03:37:17PM +0100, Michael Walle wrote: ... > >> +static void rtd1625_gpio_remove_irq_domain(struct gpio_regmap *gpio_reg) > >> +{ > >> + struct rtd1625_gpio *data = gpio_regmap_get_drvdata(gpio_reg); > >> + > >> + for (unsigned int i = 0; i < RTD1625_MAX_IRQS; i++) { > > > >> + if (data->irqs[i]) > > > > Do you need this? It seems to me that irq_to_desc() returns NULL > > and scoped_irqdesc_get_and_buslock() does nothing. Yes, I know > > it's a tricky code. > > Maybe, but I couldn't find any code already relying on that. So do > we really want to do that here? Because nobody before really went via the macro jungle to understand the behaviour? It took me half an hour to hour to get it, actually. > Alternatively, we could add num_irqs to struct rtd1625_gpio and just > end the for loop at that boundary. But I'm not sure that's worth it. > > I don't care too much. I'm fine either way, but I haven't looked too > closely if passing 0 as irq is fine. This depends on the IRQ == 0 valid or invalid. In Linux we consider IRQ == 0 as NOIRQ. Do we have some specific code that break this? > >> + irq_set_chained_handler_and_data(data->irqs[i], NULL, NULL); > >> + } > >> + > >> + for (irq_hw_number_t hwirq = 0; hwirq < data->info->num_gpios; hwirq++) > >> + irq_dispose_mapping(irq_find_mapping(data->domain, hwirq)); > >> + > >> + irq_domain_remove(data->domain); > >> +} -- With Best Regards, Andy Shevchenko