From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=198.175.65.17 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796293239; b=Ir3rcq/AfTD9tcTt/z4AbulORD91D/45SUi0zhT04KWFjJoapKVsXFpsCMZlrSy77eNQ DSN+hRQBWKM9qkDfII0mnkd6yDNturjACfyaykG0BZWFWQ5efr5/QiVILRvdgK7wI59Qk O7hS7BUKrBR5GH2LbBJ/Ci4ir7F2suV1kH5Yf9zStfgiyozFU9XQLebtKlpVxk2SaxY6m eBoQ466nWdHbdmSs6metw5SYsWoLdm+1FaRSkqEa8UE+gYDvKSmSMVja5BsyY6ShE+rgN nVxX6/4gK5LRbBPGXAIG1I4dVzwQzIFl/+w3Xuqq1Z+hOpqliDyRgJ5plLOooabAfFA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796293239; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:Date:From:To:Cc: Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To:Organization; bh=54LzJ3edcTn2BFoqosOdTmYaVw4nNKE9euwr4w4ajoc=; b=TO/WhfQtjzCRdHFk1kWBIuxnJb+HcXwT+vOWmd2J3bQaIY2BkcQf+Fn5GF9D0HeS97J+ 9lMU0ko3W3BUmjyeaRCCV47v4MSygrS+OPZhhsBwkHaL9oWR7AZ3Z0hmOtqUb9IFD9uGm 61+zRf2OAw9S1IBkPyJgdVWQeN04lX8r27HkN0G50qeKzJpE3paIjxRcwECTvfxn7u+Jr TlnwkvWYbchuwMynLqE+kKF9M3Rh2WhtAyuAOtmQljP6shBHXyJ+toIYmoApSpDHNcgwK Bh7197yzMoKQCUKh7N+9zX+6U1uXaChGaBJChvv/nSKfirIpePUwn4FQzrGJVfSFGUw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=IBwiIVxe; arc=none smtp.remote-ip=198.175.65.17 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 44F5D606A32F for ; Thu, 3 Dec 2026 10:20:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 44F5D606A32F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; 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; 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: gpfT4J9nRJyryTNzoei0cg== X-CSE-MsgGUID: KdwCml8BQlW4yS7buGwp+Q== X-IronPort-AV: E=McAfee;i="6800,10657,11984"; a="5254634" X-IronPort-AV: E=Sophos;i="6.27,248,1787036400"; d="scan'208";a="5254634" 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-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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 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