From nobody Sat Feb 7 22:54:50 2026 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) (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 B806A238D29; Fri, 7 Feb 2025 15:11:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.21 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738941115; cv=none; b=D7oG5sp/p0JeRH9zAVcZAj6lnzV0S8oiiLJC+6kl0wBh1y4dMt5ut6WRmL/XKBPUWsuq4EPe0j0MDj968kxzzKVSXNrhHBeoRjSPppnvoHMFc+BKgbLA82usqOXW1gVatUy4MUkPYvtyQFisH8PzofhnbrP507GvvUlt4V80tx4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738941115; c=relaxed/simple; bh=tlKUSEgfkOWxUCWS9Kma7VNMHWLG4r8SidwahNgYw8s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=r552MTBBY0Qz4rBU2igA8HetGxb/vBSwkSS0vaTmOQyIZwBRxM2rBpDFM0Iyfh9hMruWaP6ElLECn/Bhf8ENNqcEA7fM655v03/8ciLtzwQ/im7hneDzua2zBNb2bcOmvLZyH5kg93Ut7HrIIlAfIwCJoMyfJ2TnaOggNXU6Sb0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=S43s8UJe; arc=none smtp.client-ip=198.175.65.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none 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.b="S43s8UJe" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1738941113; x=1770477113; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=tlKUSEgfkOWxUCWS9Kma7VNMHWLG4r8SidwahNgYw8s=; b=S43s8UJeZJDL1k6gLgVgaiFo0L99Si2fkQaSMrTtZdZcChbhwNggkDbV 5A/xOUoBoCc65n7us7WzKOmHQ3nLWaHlyNfzHKi241MPx9jemAfMfcfqE GoWLyD7Yax1z8KnpV2NEVEjNKQrAc8hmOkhEKlvvsbtvkrYZnxiviPJGX +MDIEsueW4dqEg1N7CHY/mUOsU7gtIrsIsTCGH+GJ7vVmse+g+K/fwMkt iXNA9G60O5mrBNS3iGNjElwZNGXPFyGP9yE28sZ6+jWqhONc3ECBwX1qu XuSqU32azlBJfxjExm1AeIoarcQyx03tvQz1ltJ2K8AbEA1+4TnR8ExYX Q==; X-CSE-ConnectionGUID: tq4Hs5gvS+irNuS+V8ar4A== X-CSE-MsgGUID: BRhMJC5vSP6UT65hFRXxxA== X-IronPort-AV: E=McAfee;i="6700,10204,11338"; a="39491581" X-IronPort-AV: E=Sophos;i="6.13,267,1732608000"; d="scan'208";a="39491581" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Feb 2025 07:11:53 -0800 X-CSE-ConnectionGUID: rzRxEP5vRMWjZHWnSkf11A== X-CSE-MsgGUID: VIMm2EoXRyiybpNILX7A/A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="111395741" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa010.jf.intel.com with ESMTP; 07 Feb 2025 07:11:51 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 306A1116; Fri, 07 Feb 2025 17:11:50 +0200 (EET) From: Andy Shevchenko To: Bartosz Golaszewski , Andy Shevchenko , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Linus Walleij , Bartosz Golaszewski Subject: [PATCH v2 1/3] gpiolib: Deduplicate some code in for_each_requested_gpio_in_range() Date: Fri, 7 Feb 2025 17:07:34 +0200 Message-ID: <20250207151149.2119765-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20250207151149.2119765-1-andriy.shevchenko@linux.intel.com> References: <20250207151149.2119765-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Refactor for_each_requested_gpio_in_range() to deduplicate some code which is basically repeats the for_each_hwgpio(). In order to achieve this, split the latter to two, for_each_hwgpio_in_range() and for_each_hwgpio(). Signed-off-by: Andy Shevchenko --- include/linux/gpio/driver.h | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h index a307d8ed9c51..024112ef5a78 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h @@ -548,6 +548,23 @@ DEFINE_CLASS(_gpiochip_for_each_data, }), const char **label, int *i) =20 +/** + * for_each_hwgpio_in_range - Iterates over all GPIOs in a given range + * @_chip: Chip to iterate over. + * @_i: Loop counter. + * @_base: First GPIO in the ranger. + * @_size: Amount of GPIOs to check starting from @base. + * @_label: Place to store the address of the label if the GPIO is request= ed. + * Set to NULL for unused GPIOs. + */ +#define for_each_hwgpio_in_range(_chip, _i, _base, _size, _label) \ + for (CLASS(_gpiochip_for_each_data, _data)(&_label, &_i); \ + *_data.i < _size; \ + (*_data.i)++, kfree(*(_data.label)), *_data.label =3D NULL) \ + if (IS_ERR(*_data.label =3D \ + gpiochip_dup_line_label(_chip, _base + *_data.i))) {} \ + else + /** * for_each_hwgpio - Iterates over all GPIOs for given chip. * @_chip: Chip to iterate over. @@ -555,13 +572,8 @@ DEFINE_CLASS(_gpiochip_for_each_data, * @_label: Place to store the address of the label if the GPIO is request= ed. * Set to NULL for unused GPIOs. */ -#define for_each_hwgpio(_chip, _i, _label) \ - for (CLASS(_gpiochip_for_each_data, _data)(&_label, &_i); \ - *_data.i < _chip->ngpio; \ - (*_data.i)++, kfree(*(_data.label)), *_data.label =3D NULL) \ - if (IS_ERR(*_data.label =3D \ - gpiochip_dup_line_label(_chip, *_data.i))) {} \ - else +#define for_each_hwgpio(_chip, _i, _label) \ + for_each_hwgpio_in_range(_chip, _i, 0, _chip->ngpio, _label) =20 /** * for_each_requested_gpio_in_range - iterates over requested GPIOs in a g= iven range @@ -572,13 +584,8 @@ DEFINE_CLASS(_gpiochip_for_each_data, * @_label: label of current GPIO */ #define for_each_requested_gpio_in_range(_chip, _i, _base, _size, _label) = \ - for (CLASS(_gpiochip_for_each_data, _data)(&_label, &_i); \ - *_data.i < _size; \ - (*_data.i)++, kfree(*(_data.label)), *_data.label =3D NULL) \ - if ((*_data.label =3D \ - gpiochip_dup_line_label(_chip, _base + *_data.i)) =3D=3D NULL) {} \ - else if (IS_ERR(*_data.label)) {} \ - else + for_each_hwgpio_in_range(_chip, _i, _base, _size, _label) \ + if (_label =3D=3D NULL) {} else =20 /* Iterates over all requested GPIO of the given @chip */ #define for_each_requested_gpio(chip, i, label) \ --=20 2.43.0.rc1.1336.g36b5255a03ac From nobody Sat Feb 7 22:54:50 2026 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) (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 7702E1EB1A4; Fri, 7 Feb 2025 15:11:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.8 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738941118; cv=none; b=AsOCtexF6L3ys1l5NgGzsJ3CQXD3DJzFiJFxUtS3Jg5TyBnE4H1xOVysR7vU/Xpsw+OeBDRu+6mU3IasBYoGVrVKa//wTHSftXsifiOTeMeSTbCnfbhuJFqpm/eY62XxftM1xa0rtG0l9lpARDDgXsspKBVIBqL8txX3uCef8A8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738941118; c=relaxed/simple; bh=MJujtC3ZW+VSXyU6bigjgtlw84B4aNtIkZUpkniiuy4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=h6s4BK1ymM8qpAlyq5NvZBtj0DJKOolpJw1GZo5PKEjmiwW4mH65dufFRS2/NSpb87HqR82OlsQs0RIrV11B3EBsQVjxrqKrhci2MMEfa9V1wAk/3XMIW8Ae6e0k8fwH7iAz5BEGZkz2xArJEjhj36xrkbANwEAXO9xQ2WmHpfE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=EosEbuOH; arc=none smtp.client-ip=192.198.163.8 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none 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.b="EosEbuOH" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1738941116; x=1770477116; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=MJujtC3ZW+VSXyU6bigjgtlw84B4aNtIkZUpkniiuy4=; b=EosEbuOHb/GqzRpKTlCe34aHcfoT3zQfl6/1wXvqiaRMO//E+sVHXlq7 Dy8cbxKs1514Ro3CiqIbRt1BObncG/2HteJgo8H8XuD9dC6UL1IJwJBJE tFdbCrk/SYTWpM6Mhevbas0uIq7NFUZj8jOtAK93kRPf9QrXGMS2wajId 1yjjvQHwkreFgCe8WwsfOYjl1GoQpBiEcJQ3772mOM1uC6udjpC5sg7NW p5YpKLB5kLnS+pO1QO1nTfauiIZ7HZ+vL9emHku22DuUWzNz6TiS/vwNQ t+6aSO4i45Q8GMCYuqfGCPQhQkEo6Dvf3tfK+kwomClVqHWXzGlVi5oJL w==; X-CSE-ConnectionGUID: DCq4+78gQ5yufGligIL+sA== X-CSE-MsgGUID: U4/1qoPcTiqLT0bbrZBGKA== X-IronPort-AV: E=McAfee;i="6700,10204,11338"; a="57120807" X-IronPort-AV: E=Sophos;i="6.13,267,1732608000"; d="scan'208";a="57120807" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Feb 2025 07:11:53 -0800 X-CSE-ConnectionGUID: RLZdE5Y9Rfepa10I7zZ9yA== X-CSE-MsgGUID: ubym+9i3SFCE7/IQLaZHbg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.13,267,1732608000"; d="scan'208";a="111511667" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa006.jf.intel.com with ESMTP; 07 Feb 2025 07:11:52 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 38DB938D; Fri, 07 Feb 2025 17:11:50 +0200 (EET) From: Andy Shevchenko To: Bartosz Golaszewski , Andy Shevchenko , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Linus Walleij , Bartosz Golaszewski Subject: [PATCH v2 2/3] gpiolib: Simplify implementation of for_each_hwgpio_in_range() Date: Fri, 7 Feb 2025 17:07:35 +0200 Message-ID: <20250207151149.2119765-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20250207151149.2119765-1-andriy.shevchenko@linux.intel.com> References: <20250207151149.2119765-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The whole purpose of the custom CLASS() is to have possibility to initialise the counter variable _i to 0. This can't be done with simple __free() macro as it will be not allowed by C language. OTOH, the CLASS() operates with the pointers and explicit usage of the scoped variable _data is not needed, since the pointers are kept the same over the iterations. Simplify the implementation of for_each_hwgpio_in_range(). Signed-off-by: Andy Shevchenko --- include/linux/gpio/driver.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h index 024112ef5a78..ae93f75170f2 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h @@ -559,11 +559,9 @@ DEFINE_CLASS(_gpiochip_for_each_data, */ #define for_each_hwgpio_in_range(_chip, _i, _base, _size, _label) \ for (CLASS(_gpiochip_for_each_data, _data)(&_label, &_i); \ - *_data.i < _size; \ - (*_data.i)++, kfree(*(_data.label)), *_data.label =3D NULL) \ - if (IS_ERR(*_data.label =3D \ - gpiochip_dup_line_label(_chip, _base + *_data.i))) {} \ - else + _i < _size; \ + _i++, kfree(_label), _label =3D NULL) \ + if (IS_ERR(_label =3D gpiochip_dup_line_label(_chip, _base + _i))) {} el= se =20 /** * for_each_hwgpio - Iterates over all GPIOs for given chip. --=20 2.43.0.rc1.1336.g36b5255a03ac From nobody Sat Feb 7 22:54:50 2026 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) (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 07DCB238D2A; Fri, 7 Feb 2025 15:11:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.8 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738941115; cv=none; b=ZpbBJ8kKnAcfeH8Tm6sqH7VnRDDkx3HMu4usWyaG1LXFFOl006vSNJjk+8KjdtPRT3cRmGhksCoWWAb8tBTeoKEqJHm0a+7ShHQN7g0pOnYVps2Qdxv+VS/SQs3WIMRjTJpyBS2OJvoWqeRciidsuNbMZJDmUqLVwYTyqVs+fiA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738941115; c=relaxed/simple; bh=ThnJYelAyD/24+XCZmw6arGXFsBrBIHKJODdjcHXUfw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lkPXxDEJtEovobXFQHC6oXp2BoE+Z2OCNAmOGA34Yhpef7rcLgzQRqPsysaUquPmjiQrDSH+B8MqzW1u3W0v9zh5T1WKp39a3dbHtOk/hWc410qRvnf7W4u5Ot96VxGetEp6zs73m1TUBVmxffKcOWON1sKYO2oeQbcjE0eLR78= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=ggDmtcAm; arc=none smtp.client-ip=192.198.163.8 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none 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.b="ggDmtcAm" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1738941114; x=1770477114; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ThnJYelAyD/24+XCZmw6arGXFsBrBIHKJODdjcHXUfw=; b=ggDmtcAmyIA4rBieME+A3EJ4LMD+t6Pt1mZWp4OyuSgzF1QpT7u1nwpL 7Y5ssnjqEDaTR1IwDnFMoNp0SfC0pbuaAxYBStSthTGetTqU/ewMtIu5z 59F0cTCMUPcUsi0Td5YiBrEXvFI3JJT6bagsBLXDQQr9IMiO5XOMe/TbU Tm9t1xY/kccuwAGDqWA6OVCiDXe6EAEJAjHixXR8l8jUpD1TemICz/VrO oQxO9HN7TY7puNOdKa0ve9BRem3g7heyF0sbPFEMZxopaDrftmz+NWIhk bVOgo0uYwjk+QE1mWO+zgwvkwyLcf8dhUUZdLuDgPwYrt/Wdp8F2jUC/M A==; X-CSE-ConnectionGUID: 5qJgNfWJS4Gv7/mfmv2Q9g== X-CSE-MsgGUID: UOznrxQOTWy+KzSfHEAOjA== X-IronPort-AV: E=McAfee;i="6700,10204,11338"; a="57120802" X-IronPort-AV: E=Sophos;i="6.13,267,1732608000"; d="scan'208";a="57120802" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Feb 2025 07:11:53 -0800 X-CSE-ConnectionGUID: B+7Ylw0rRDiV3LEpswjoVg== X-CSE-MsgGUID: 3ZqSQFRwTDKWFk4U4FmUOA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.13,267,1732608000"; d="scan'208";a="111511665" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa006.jf.intel.com with ESMTP; 07 Feb 2025 07:11:52 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 45BA6428; Fri, 07 Feb 2025 17:11:50 +0200 (EET) From: Andy Shevchenko To: Bartosz Golaszewski , Andy Shevchenko , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Linus Walleij , Bartosz Golaszewski Subject: [PATCH v2 3/3] gpiolib: Switch to use for_each_if() helper Date: Fri, 7 Feb 2025 17:07:36 +0200 Message-ID: <20250207151149.2119765-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20250207151149.2119765-1-andriy.shevchenko@linux.intel.com> References: <20250207151149.2119765-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The for_each_*() APIs that are conditional can be written shorter and less error prone with for_each_if() helper in use. Switch them to use this helper. Signed-off-by: Andy Shevchenko --- include/linux/gpio/driver.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h index ae93f75170f2..a7e9c1d3df71 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h @@ -532,6 +532,7 @@ struct gpio_chip { =20 char *gpiochip_dup_line_label(struct gpio_chip *gc, unsigned int offset); =20 +#define for_each_if(condition) if (!(condition)) {} else =20 struct _gpiochip_for_each_data { const char **label; @@ -561,7 +562,7 @@ DEFINE_CLASS(_gpiochip_for_each_data, for (CLASS(_gpiochip_for_each_data, _data)(&_label, &_i); \ _i < _size; \ _i++, kfree(_label), _label =3D NULL) \ - if (IS_ERR(_label =3D gpiochip_dup_line_label(_chip, _base + _i))) {} el= se + for_each_if(!IS_ERR(_label =3D gpiochip_dup_line_label(_chip, _base + _i= ))) =20 /** * for_each_hwgpio - Iterates over all GPIOs for given chip. @@ -583,7 +584,7 @@ DEFINE_CLASS(_gpiochip_for_each_data, */ #define for_each_requested_gpio_in_range(_chip, _i, _base, _size, _label) = \ for_each_hwgpio_in_range(_chip, _i, _base, _size, _label) \ - if (_label =3D=3D NULL) {} else + for_each_if(_label) =20 /* Iterates over all requested GPIO of the given @chip */ #define for_each_requested_gpio(chip, i, label) \ @@ -869,7 +870,7 @@ static inline void gpiochip_unlock_as_irq(struct gpio_c= hip *gc, =20 #define for_each_gpiochip_node(dev, child) \ device_for_each_child_node(dev, child) \ - if (!fwnode_property_present(child, "gpio-controller")) {} else + for_each_if(fwnode_property_present(child, "gpio-controller")) =20 static inline unsigned int gpiochip_node_count(struct device *dev) { --=20 2.43.0.rc1.1336.g36b5255a03ac