From nobody Mon Sep 28 22:30:49 2026 Received: from pdx-out-005.esa.us-west-2.outbound.mail-perimeter.amazon.com (pdx-out-005.esa.us-west-2.outbound.mail-perimeter.amazon.com [52.13.214.179]) (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 A144A3CB550; Sun, 16 Aug 2026 06:07:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=52.13.214.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786860429; cv=none; b=HIJqwomNFu46Mx6E2XndHx+4i5s0Qs2BkOKyfqhqTZzXfpdjga4Dk6bpLG2xCy5TCN2Qxe6mP3UbaHUubNcalDTsrCwf1/CLiKB6cKu9yi6jTXHBS+EebkNrvgpb2bWEAepNnPhg+Wa2WkF+zCjVEyuDeBAwgwFv0JDzWF0wBVE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786860429; c=relaxed/simple; bh=sXPTWHNlPBkHKDT7AuZLb05HsjnI6TVDYudXzM2Ns5U=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ewJVXhmdSjGgBmMnB/BEjhgiKBIwTc23u+YoDsoldJGzAtTG3DYXThUONAc03yAEfuycCCrlheS6/4gy89X8MOgzACjn3J5aXpIztmc7RGVGocPW+3x4mPuU6SGHerytybmYN4exn0nvD0eKcgqRxh91JE94rhlzs8ApRIVDyTU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com; spf=pass smtp.mailfrom=amazon.com; dkim=pass (2048-bit key) header.d=amazon.com header.i=@amazon.com header.b=DzwprpBZ; arc=none smtp.client-ip=52.13.214.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amazon.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=amazon.com header.i=@amazon.com header.b="DzwprpBZ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazoncorp2; t=1786860427; x=1818396427; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=OpkJVVFbsg4IP85fQpO6w/uLcrscuY7nj88/MbhVBhc=; b=DzwprpBZjyFGdAlhMiPewA+lzh/uN8EPbndbVVWUjdxZg3RH4Fl3mig1 Yn5Xbgy8w+SavfGUEXdNr8Ht6oFRwd7zOnBN3UH8M2ZBgnxECJLISW8sZ O+sZyLSdPy2KLusG8ugTxythGVL7EvmMBf8T7/Y3t5CZC/w6JgofeMtqR eyclxEK/ka8gLo1gN+wyjCFp5ZvoLPs8mRXSRwWJWaW61EHGrL89hwMLU XYoC26HbfiSz5yNDqkDNPBv4xST1gld70aI02q6bg4p47cbxTDuXuwW92 NW6fjd4+e92sx/GLEIm4C14/jpv0+tYmR4nvBw+y+nPXIA6BWyVSdo0z8 w==; X-CSE-ConnectionGUID: sqiQs5hURyGOVQlP1PmhNQ== X-CSE-MsgGUID: 3Rlz7WPbT0Cv85JBg50/8g== X-IronPort-AV: E=Sophos;i="6.25,226,1779148800"; d="scan'208";a="26059434" Received: from ip-10-5-0-115.us-west-2.compute.internal (HELO smtpout.naws.us-west-2.prod.farcaster.email.amazon.dev) ([10.5.0.115]) by internal-pdx-out-005.esa.us-west-2.outbound.mail-perimeter.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2026 06:07:05 +0000 Received: from EX19MTAUWA002.ant.amazon.com [205.251.233.234:3092] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.41.125:2525] with esmtp (Farcaster) id 7aa01fe4-cc91-4b4f-a91d-08f6e2ba5676; Sun, 16 Aug 2026 06:07:04 +0000 (UTC) X-Farcaster-Flow-ID: 7aa01fe4-cc91-4b4f-a91d-08f6e2ba5676 Received: from EX19D001UWA001.ant.amazon.com (10.13.138.214) by EX19MTAUWA002.ant.amazon.com (10.250.64.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.45; Sun, 16 Aug 2026 06:07:04 +0000 Received: from dev-dsk-farbere-1a-46ecabed.eu-west-1.amazon.com (172.19.116.181) by EX19D001UWA001.ant.amazon.com (10.13.138.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.45; Sun, 16 Aug 2026 06:06:59 +0000 From: Eliav Farber To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v5 01/13] notifier: add device-managed registration APIs Date: Sun, 16 Aug 2026 06:06:00 +0000 Message-ID: <20260816060648.4030-2-farbere@amazon.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260816060648.4030-1-farbere@amazon.com> References: <20260816060648.4030-1-farbere@amazon.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: EX19D032UWA002.ant.amazon.com (10.13.139.81) To EX19D001UWA001.ant.amazon.com (10.13.138.214) Add devm_atomic_notifier_chain_register() and devm_blocking_notifier_chain_register() that automatically unregister the notifier when the device is unbound. Many drivers repeat the same boilerplate pattern: 1. Register the notifier with *_notifier_chain_register() 2. Check for error 3. Register a devm action to unregister on teardown 4. Implement a per-driver static unregister callback With the new devm_*_notifier_chain_register() APIs, this reduces to a single call with one error path, eliminating per-driver unregister callbacks entirely. The implementation follows the established devres pattern used by other device-managed kernel APIs. A devm variant for raw notifier chains is intentionally not included because raw notifiers require the caller to provide all locking. The devres teardown callback has no way to acquire the caller's lock, and devres_alloc() with GFP_KERNEL cannot be used if the caller's lock is a spinlock. Signed-off-by: Eliav Farber Acked-by: Linus Walleij --- Changes in v5: - Rename notifier_block parameter from 'n' to 'nb' to match the devres struct field name (Uwe Kleine-K=C3=B6nig) Changes in v3: - Drop devm_raw_notifier_chain_register() since raw notifiers require caller-provided locking which is incompatible with the devres teardown callback (Sashiko) Changes in v2: - Drop 'extern' from new function prototypes (Bart Van Assche) - Fix kerneldoc to use 'Return:' format (Bart Van Assche) - Use instead of (Andy Shevchenko) include/linux/notifier.h | 7 +++ kernel/notifier.c | 103 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 110 insertions(+) diff --git a/include/linux/notifier.h b/include/linux/notifier.h index 01b6c9d9956f..4eeae9741a6e 100644 --- a/include/linux/notifier.h +++ b/include/linux/notifier.h @@ -46,6 +46,7 @@ * often but notifier_blocks will seldom be removed. */ =20 +struct device; struct notifier_block; =20 typedef int (*notifier_fn_t)(struct notifier_block *nb, @@ -145,8 +146,14 @@ extern void srcu_init_notifier_head(struct srcu_notifi= er_head *nh); =20 extern int atomic_notifier_chain_register(struct atomic_notifier_head *nh, struct notifier_block *nb); +int devm_atomic_notifier_chain_register(struct device *dev, + struct atomic_notifier_head *nh, + struct notifier_block *nb); extern int blocking_notifier_chain_register(struct blocking_notifier_head = *nh, struct notifier_block *nb); +int devm_blocking_notifier_chain_register(struct device *dev, + struct blocking_notifier_head *nh, + struct notifier_block *nb); extern int raw_notifier_chain_register(struct raw_notifier_head *nh, struct notifier_block *nb); extern int srcu_notifier_chain_register(struct srcu_notifier_head *nh, diff --git a/kernel/notifier.c b/kernel/notifier.c index 2f9fe7c30287..0c39627ea69c 100644 --- a/kernel/notifier.c +++ b/kernel/notifier.c @@ -1,4 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-only +#include #include #include #include @@ -197,6 +198,56 @@ int atomic_notifier_chain_unregister(struct atomic_not= ifier_head *nh, } EXPORT_SYMBOL_GPL(atomic_notifier_chain_unregister); =20 +struct atomic_notifier_chain_devres { + struct atomic_notifier_head *nh; + struct notifier_block *nb; +}; + +static void devm_atomic_notifier_chain_unregister(struct device *dev, void= *res) +{ + struct atomic_notifier_chain_devres *dr =3D res; + + atomic_notifier_chain_unregister(dr->nh, dr->nb); +} + +/** + * devm_atomic_notifier_chain_register - Device-managed atomic notifier re= gistration + * @dev: Device to tie the notifier lifetime to + * @nh: Pointer to head of the atomic notifier chain + * @nb: New entry in notifier chain + * + * Adds a notifier to an atomic notifier chain and registers a cleanup + * action to automatically unregister it when @dev is unbound. + * + * Return: + * 0 on success, negative errno on error. + */ +int devm_atomic_notifier_chain_register(struct device *dev, + struct atomic_notifier_head *nh, + struct notifier_block *nb) +{ + struct atomic_notifier_chain_devres *dr; + int ret; + + dr =3D devres_alloc(devm_atomic_notifier_chain_unregister, + sizeof(*dr), GFP_KERNEL); + if (!dr) + return -ENOMEM; + + ret =3D atomic_notifier_chain_register(nh, nb); + if (ret) { + devres_free(dr); + return ret; + } + + dr->nh =3D nh; + dr->nb =3D nb; + devres_add(dev, dr); + + return 0; +} +EXPORT_SYMBOL_GPL(devm_atomic_notifier_chain_register); + /** * atomic_notifier_call_chain - Call functions in an atomic notifier chain * @nh: Pointer to head of the atomic notifier chain @@ -349,6 +400,58 @@ int blocking_notifier_call_chain_robust(struct blockin= g_notifier_head *nh, } EXPORT_SYMBOL_GPL(blocking_notifier_call_chain_robust); =20 +struct blocking_notifier_chain_devres { + struct blocking_notifier_head *nh; + struct notifier_block *nb; +}; + +static void devm_blocking_notifier_chain_unregister(struct device *dev, + void *res) +{ + struct blocking_notifier_chain_devres *dr =3D res; + + blocking_notifier_chain_unregister(dr->nh, dr->nb); +} + +/** + * devm_blocking_notifier_chain_register - Device-managed blocking notifie= r registration + * @dev: Device to tie the notifier lifetime to + * @nh: Pointer to head of the blocking notifier chain + * @nb: New entry in notifier chain + * + * Adds a notifier to a blocking notifier chain and registers a cleanup + * action to automatically unregister it when @dev is unbound. + * Must be called in process context. + * + * Return: + * 0 on success, negative errno on error. + */ +int devm_blocking_notifier_chain_register(struct device *dev, + struct blocking_notifier_head *nh, + struct notifier_block *nb) +{ + struct blocking_notifier_chain_devres *dr; + int ret; + + dr =3D devres_alloc(devm_blocking_notifier_chain_unregister, + sizeof(*dr), GFP_KERNEL); + if (!dr) + return -ENOMEM; + + ret =3D blocking_notifier_chain_register(nh, nb); + if (ret) { + devres_free(dr); + return ret; + } + + dr->nh =3D nh; + dr->nb =3D nb; + devres_add(dev, dr); + + return 0; +} +EXPORT_SYMBOL_GPL(devm_blocking_notifier_chain_register); + /** * blocking_notifier_call_chain - Call functions in a blocking notifier ch= ain * @nh: Pointer to head of the blocking notifier chain --=20 2.47.3 From nobody Mon Sep 28 22:30:49 2026 Received: from pdx-out-010.esa.us-west-2.outbound.mail-perimeter.amazon.com (pdx-out-010.esa.us-west-2.outbound.mail-perimeter.amazon.com [52.12.53.23]) (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 B4AFE2EC0A4; Sun, 16 Aug 2026 06:07:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=52.12.53.23 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786860433; cv=none; b=fHT2T0mEgKjSJKEE/Z/PWCrQgMJ3hAIlFQqC4crZtwocVba/K66zVa43QE6cxcJOYrdy4yk7wlo2YxnKT2Jd9QMg/YwR66FLOvrNvpnPdgFvnB2V5ZmMHTs7MWCP1z3uzD3Jr4lovKQWMxWabXG4CLX7TNm+A/Ofqdn93kP207s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786860433; c=relaxed/simple; bh=eT80AA69sFszNFV6/owB1x4sJqsuZ6srRNzVe/2fwYM=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=bOBResqCy4o5hTCKAexO2BoTFGUDL8bfDi7YC4R0uOjqF6yyAr0164P7djGdXiGY6N/7m1fcog7Wq/crnJI+94W/tfHFZCoG0npJhdDZxzFBGA+xFDvarEqLg/3U43nEYonRZTI9hdp9hp8YrQq2LWo1AIBxe8vGdcgCQB9ieRM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com; spf=pass smtp.mailfrom=amazon.com; dkim=pass (2048-bit key) header.d=amazon.com header.i=@amazon.com header.b=VMFWg+II; arc=none smtp.client-ip=52.12.53.23 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amazon.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=amazon.com header.i=@amazon.com header.b="VMFWg+II" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazoncorp2; t=1786860432; x=1818396432; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=KYdzPlEap2Vb1YY1dr9VK03d8Yysb4PGF8NRIqnsbIY=; b=VMFWg+IIS03dxsFUkW9K3WEqw+Ph/2tnDkojsdxR0NpgUHt0/2xRIUBS LOrcRoKwIRvqbzdbwOvvMSCQjASP19DRQd5+hYQciIg6LBCnuXdRzik8D TEcvbVTlr/FzCexY4kck28PZJuoKpBFjtHC8x6aGl+PnwGRgX+7eUmoaL U30KD9cSXv14/qfA66vDlWnGnSCHN94KuTR+6FO1qPb+24kh3GDJ3X3Fc audyaNNHupXEoEsSIdAJl8ARmeoRfNkQrFQRy/QoT68FWRTtMqKkF0Hsx bFvWW12zAvv1FAFd4ljI3zDy6wpxHNMRuHGk5pOdWd4ErWQTJuPongCMZ A==; X-CSE-ConnectionGUID: HkjcQDNbR9CnvnYPyWIqbw== X-CSE-MsgGUID: 41xUfDj0QfGZKBNJaI0gQQ== X-IronPort-AV: E=Sophos;i="6.25,226,1779148800"; d="scan'208";a="25957794" Received: from ip-10-5-0-115.us-west-2.compute.internal (HELO smtpout.naws.us-west-2.prod.farcaster.email.amazon.dev) ([10.5.0.115]) by internal-pdx-out-010.esa.us-west-2.outbound.mail-perimeter.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2026 06:07:10 +0000 Received: from EX19MTAUWB001.ant.amazon.com [205.251.233.104:10359] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.4.160:2525] with esmtp (Farcaster) id 93e3ab7f-ed5f-4b86-9c05-8ae387facc24; Sun, 16 Aug 2026 06:07:10 +0000 (UTC) X-Farcaster-Flow-ID: 93e3ab7f-ed5f-4b86-9c05-8ae387facc24 Received: from EX19D001UWA001.ant.amazon.com (10.13.138.214) by EX19MTAUWB001.ant.amazon.com (10.250.64.248) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.45; Sun, 16 Aug 2026 06:07:09 +0000 Received: from dev-dsk-farbere-1a-46ecabed.eu-west-1.amazon.com (172.19.116.181) by EX19D001UWA001.ant.amazon.com (10.13.138.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.45; Sun, 16 Aug 2026 06:07:04 +0000 From: Eliav Farber To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v5 02/13] pwm: iqs620a: use devm_blocking_notifier_chain_register() Date: Sun, 16 Aug 2026 06:06:01 +0000 Message-ID: <20260816060648.4030-3-farbere@amazon.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260816060648.4030-1-farbere@amazon.com> References: <20260816060648.4030-1-farbere@amazon.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: EX19D032UWA002.ant.amazon.com (10.13.139.81) To EX19D001UWA001.ant.amazon.com (10.13.138.214) Replace the blocking_notifier_chain_register() + devm_add_action_or_reset() pattern with a single call to devm_blocking_notifier_chain_register(), removing the iqs620_pwm_notifier_unregister() callback. Signed-off-by: Eliav Farber --- Changes in v5: - Remove extra blank line left after deleting the unregister callback (Uwe Kleine-K=C3=B6nig) drivers/pwm/pwm-iqs620a.c | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/drivers/pwm/pwm-iqs620a.c b/drivers/pwm/pwm-iqs620a.c index 13e5e138c8e9..6c6caee65b8f 100644 --- a/drivers/pwm/pwm-iqs620a.c +++ b/drivers/pwm/pwm-iqs620a.c @@ -173,18 +173,6 @@ static const struct pwm_ops iqs620_pwm_ops =3D { .get_state =3D iqs620_pwm_get_state, }; =20 -static void iqs620_pwm_notifier_unregister(void *context) -{ - struct iqs620_pwm_private *iqs620_pwm =3D context; - int ret; - - ret =3D blocking_notifier_chain_unregister(&iqs620_pwm->iqs62x->nh, - &iqs620_pwm->notifier); - if (ret) - dev_err(iqs620_pwm->dev, - "Failed to unregister notifier: %d\n", ret); -} - static int iqs620_pwm_probe(struct platform_device *pdev) { struct iqs62x_core *iqs62x =3D dev_get_drvdata(pdev->dev.parent); @@ -218,19 +206,14 @@ static int iqs620_pwm_probe(struct platform_device *p= dev) mutex_init(&iqs620_pwm->lock); =20 iqs620_pwm->notifier.notifier_call =3D iqs620_pwm_notifier; - ret =3D blocking_notifier_chain_register(&iqs620_pwm->iqs62x->nh, - &iqs620_pwm->notifier); + ret =3D devm_blocking_notifier_chain_register(&pdev->dev, + &iqs620_pwm->iqs62x->nh, + &iqs620_pwm->notifier); if (ret) { dev_err(&pdev->dev, "Failed to register notifier: %d\n", ret); return ret; } =20 - ret =3D devm_add_action_or_reset(&pdev->dev, - iqs620_pwm_notifier_unregister, - iqs620_pwm); - if (ret) - return ret; - ret =3D devm_pwmchip_add(&pdev->dev, chip); if (ret) dev_err(&pdev->dev, "Failed to add device: %d\n", ret); --=20 2.47.3 From nobody Mon Sep 28 22:30:49 2026 Received: from pdx-out-011.esa.us-west-2.outbound.mail-perimeter.amazon.com (pdx-out-011.esa.us-west-2.outbound.mail-perimeter.amazon.com [52.35.192.45]) (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 A9E213CF678; Sun, 16 Aug 2026 06:07:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=52.35.192.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786860450; cv=none; b=Xb71yxfgAaJwWWFCJdq3N4GcAqFIU0gKG1Fzmcl5SfPQbY2J4Uh1Y6FnqHGSRMpNvcSJbRZeUVxp8HsqdqH0zOAhdhgTaQSUDoCki9fMLg7WPYsgJm1v8uKqHYhbNPgOoeTyVeL44GpRqIKxKdB2PIFiZIMEX8Mrr2fzUuLc2NY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786860450; c=relaxed/simple; bh=+M9sI2R9j80yQvV/Q3lXYCnN2bX64b4KBLooYAZ8GDU=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=DgWpmdu/maDtJudYEnIv0V6Nxc1O5qdR0kVdjZr/q2piQdbpmeDJPzvJKt9RsDwJzaxyDm2a5SHs3ifXjt6uXeSZWu4NxuqsMDQLW5fRb5fLTeBIquT+lRFupFiFB2KZ0vph7pAwwH24UedI9aJjiLaopyoJOsfOTnpEsE/oY2w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com; spf=pass smtp.mailfrom=amazon.com; dkim=pass (2048-bit key) header.d=amazon.com header.i=@amazon.com header.b=KYumBiu/; arc=none smtp.client-ip=52.35.192.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amazon.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=amazon.com header.i=@amazon.com header.b="KYumBiu/" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazoncorp2; t=1786860448; x=1818396448; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=N4HMI+Ypt3dUaeVDcWgB1HqH6rx98OF+47H18f4iarc=; b=KYumBiu/zYmIoOmpntjxInzb3OBjxd+yl8r/Bib2RPGe/Az4dyOO8otL NA++xwpxc4R6jI2qDk5476RGEtwj7HqmPOdHQx5L6C56GOYzRHfUU6jRA Dab80kZ7BIQtHPHnjzdiB1zFprFqurU+PU9h17jUHSpVvagD6RJaY5/f+ i2+t92QLmhcOeCrmhq3RzRmhsCsM4Sl39lkM5JUYv2R91sUXS5XImWpQR sE13rin+HkYci0Zuc2M/aW0mANCaEqv17+wyG0Z2YfJpv9+E6ExpOsasH z4IdYtN3mtfdsgNTIHU3VDiegvRBaOTfT/YkFc4c7fcHuTjl1HqAXR4XT A==; X-CSE-ConnectionGUID: BmVXNLWRTbalcQahshfXnA== X-CSE-MsgGUID: kc+IRWDPSdex09l/OrDvKg== X-IronPort-AV: E=Sophos;i="6.25,226,1779148800"; d="scan'208";a="25841129" Received: from ip-10-5-12-219.us-west-2.compute.internal (HELO smtpout.naws.us-west-2.prod.farcaster.email.amazon.dev) ([10.5.12.219]) by internal-pdx-out-011.esa.us-west-2.outbound.mail-perimeter.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2026 06:07:15 +0000 Received: from EX19MTAUWC002.ant.amazon.com [205.251.233.111:4979] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.4.160:2525] with esmtp (Farcaster) id a7f05c62-8188-49ff-8569-c0187274809f; Sun, 16 Aug 2026 06:07:15 +0000 (UTC) X-Farcaster-Flow-ID: a7f05c62-8188-49ff-8569-c0187274809f Received: from EX19D001UWA001.ant.amazon.com (10.13.138.214) by EX19MTAUWC002.ant.amazon.com (10.250.64.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.45; Sun, 16 Aug 2026 06:07:15 +0000 Received: from dev-dsk-farbere-1a-46ecabed.eu-west-1.amazon.com (172.19.116.181) by EX19D001UWA001.ant.amazon.com (10.13.138.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.45; Sun, 16 Aug 2026 06:07:09 +0000 From: Eliav Farber To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: Jonathan Cameron Subject: [PATCH v5 03/13] iio: light: iqs621-als: use devm_blocking_notifier_chain_register() Date: Sun, 16 Aug 2026 06:06:02 +0000 Message-ID: <20260816060648.4030-4-farbere@amazon.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260816060648.4030-1-farbere@amazon.com> References: <20260816060648.4030-1-farbere@amazon.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 X-ClientProxiedBy: EX19D032UWA002.ant.amazon.com (10.13.139.81) To EX19D001UWA001.ant.amazon.com (10.13.138.214) Content-Type: text/plain; charset="utf-8" Replace the blocking_notifier_chain_register() + devm_add_action_or_reset() pattern with a single call to devm_blocking_notifier_chain_register(), removing the iqs621_als_notifier_unregister() callback. Signed-off-by: Eliav Farber Acked-by: Jonathan Cameron --- drivers/iio/light/iqs621-als.c | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/drivers/iio/light/iqs621-als.c b/drivers/iio/light/iqs621-als.c index cd5843e3e2c3..f9d215ef1970 100644 --- a/drivers/iio/light/iqs621-als.c +++ b/drivers/iio/light/iqs621-als.c @@ -179,19 +179,6 @@ static int iqs621_als_notifier(struct notifier_block *= notifier, return NOTIFY_OK; } =20 -static void iqs621_als_notifier_unregister(void *context) -{ - struct iqs621_als_private *iqs621_als =3D context; - struct iio_dev *indio_dev =3D iqs621_als->indio_dev; - int ret; - - ret =3D blocking_notifier_chain_unregister(&iqs621_als->iqs62x->nh, - &iqs621_als->notifier); - if (ret) - dev_err(indio_dev->dev.parent, - "Failed to unregister notifier: %d\n", ret); -} - static int iqs621_als_read_raw(struct iio_dev *indio_dev, struct iio_chan_spec const *chan, int *val, int *val2, long mask) @@ -563,19 +550,14 @@ static int iqs621_als_probe(struct platform_device *p= dev) mutex_init(&iqs621_als->lock); =20 iqs621_als->notifier.notifier_call =3D iqs621_als_notifier; - ret =3D blocking_notifier_chain_register(&iqs621_als->iqs62x->nh, - &iqs621_als->notifier); + ret =3D devm_blocking_notifier_chain_register(&pdev->dev, + &iqs621_als->iqs62x->nh, + &iqs621_als->notifier); if (ret) { dev_err(&pdev->dev, "Failed to register notifier: %d\n", ret); return ret; } =20 - ret =3D devm_add_action_or_reset(&pdev->dev, - iqs621_als_notifier_unregister, - iqs621_als); - if (ret) - return ret; - return devm_iio_device_register(&pdev->dev, indio_dev); } =20 --=20 2.47.3 From nobody Mon Sep 28 22:30:49 2026 Received: from pdx-out-006.esa.us-west-2.outbound.mail-perimeter.amazon.com (pdx-out-006.esa.us-west-2.outbound.mail-perimeter.amazon.com [52.26.1.71]) (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 DD2B43CD8CA; Sun, 16 Aug 2026 06:07:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=52.26.1.71 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786860445; cv=none; b=IBXJOQpBB2ievUTk5pFReNUU2QnkW8bN7H01gKIghiNJksCbdFMwWB2GNqRSZSHiNlBBpdTbJetqwg7sRFhmcULMW65X2Khtr5DBNpcZXZPAGUC1rY9Y/G7XLI7+NYcl4W7AGm0FV9TOMDFYSn+TiGGzEFXLhb5iv/yUlQW48l4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786860445; c=relaxed/simple; bh=9PfWvLqDXrcdC3kOv3ATnsg7CA0fnLaQpLW74RfM8dM=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=NouxSkHUc7ztXPzbTtUr1DyTYuH6fu7NNn4004H+XrdnPqZjN6Uzs+Oc3zuh0ZCOJEB5cz5o2qHWGwc+/RP/MVzPDzBvRrm8vu5GsznXmRcnCvlyHcQ1MJOp7q8x8QhuH9TJQmalsegBEqCuEhtVhFf77srfXKJIcB+dFEnpdaY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com; spf=pass smtp.mailfrom=amazon.com; dkim=pass (2048-bit key) header.d=amazon.com header.i=@amazon.com header.b=ow49hdbc; arc=none smtp.client-ip=52.26.1.71 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amazon.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=amazon.com header.i=@amazon.com header.b="ow49hdbc" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazoncorp2; t=1786860444; x=1818396444; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=eSf49JDCjdaWzi6oCVwehpdv6f6wYD7VNVODvHIligU=; b=ow49hdbc+koJdDKKz0/sahWSBF3Xa9af2jUJvFnySCwV/U4dH8LcjJBY jY/T+sgIhtgUOkJNTQWySwZ6B6JXcgaR2okVb8lbR6E784uAqBZ2KB96J qntwLGKE8FrIklQnRMvhgCRhq2gTZahulQCg0WaMRdxH9Ukt5pwpnxOdQ Hx1+CnlQc23HEUMDZKzPMW1j+HwpNUhxBQ8cqHo0MywUziqKPQow481Cq KBHygyNP7VWaQwa9VHMywB+GWZ1kj1mVI8Z5D75YMXuk0JzBYUV9wW5lg +e+oLwgYNWUfI1RsbsSBYZWqs8QEhAmneDE67NqkaqrXE230cMKpbc6m4 g==; X-CSE-ConnectionGUID: 2lNGy+HqS6y7RsPfvt0AYA== X-CSE-MsgGUID: uUcTDP1UToi73fwlPtmkCQ== X-IronPort-AV: E=Sophos;i="6.25,226,1779148800"; d="scan'208";a="26109130" Received: from ip-10-5-6-203.us-west-2.compute.internal (HELO smtpout.naws.us-west-2.prod.farcaster.email.amazon.dev) ([10.5.6.203]) by internal-pdx-out-006.esa.us-west-2.outbound.mail-perimeter.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2026 06:07:21 +0000 Received: from EX19MTAUWA001.ant.amazon.com [205.251.233.182:11127] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.12.154:2525] with esmtp (Farcaster) id 5e989c0f-bf7d-4b33-a569-88160ba3abc0; Sun, 16 Aug 2026 06:07:21 +0000 (UTC) X-Farcaster-Flow-ID: 5e989c0f-bf7d-4b33-a569-88160ba3abc0 Received: from EX19D001UWA001.ant.amazon.com (10.13.138.214) by EX19MTAUWA001.ant.amazon.com (10.250.64.218) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.45; Sun, 16 Aug 2026 06:07:20 +0000 Received: from dev-dsk-farbere-1a-46ecabed.eu-west-1.amazon.com (172.19.116.181) by EX19D001UWA001.ant.amazon.com (10.13.138.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.45; Sun, 16 Aug 2026 06:07:15 +0000 From: Eliav Farber To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: Jonathan Cameron Subject: [PATCH v5 04/13] iio: position: iqs624: use devm_blocking_notifier_chain_register() Date: Sun, 16 Aug 2026 06:06:03 +0000 Message-ID: <20260816060648.4030-5-farbere@amazon.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260816060648.4030-1-farbere@amazon.com> References: <20260816060648.4030-1-farbere@amazon.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 X-ClientProxiedBy: EX19D032UWA002.ant.amazon.com (10.13.139.81) To EX19D001UWA001.ant.amazon.com (10.13.138.214) Content-Type: text/plain; charset="utf-8" Replace the blocking_notifier_chain_register() + devm_add_action_or_reset() pattern with a single call to devm_blocking_notifier_chain_register(), removing the iqs624_pos_notifier_unregister() callback. Signed-off-by: Eliav Farber Acked-by: Jonathan Cameron --- drivers/iio/position/iqs624-pos.c | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/drivers/iio/position/iqs624-pos.c b/drivers/iio/position/iqs62= 4-pos.c index 8239239c6ee2..d2aa2df71457 100644 --- a/drivers/iio/position/iqs624-pos.c +++ b/drivers/iio/position/iqs624-pos.c @@ -96,19 +96,6 @@ static int iqs624_pos_notifier(struct notifier_block *no= tifier, return ret; } =20 -static void iqs624_pos_notifier_unregister(void *context) -{ - struct iqs624_pos_private *iqs624_pos =3D context; - struct iio_dev *indio_dev =3D iqs624_pos->indio_dev; - int ret; - - ret =3D blocking_notifier_chain_unregister(&iqs624_pos->iqs62x->nh, - &iqs624_pos->notifier); - if (ret) - dev_err(indio_dev->dev.parent, - "Failed to unregister notifier: %d\n", ret); -} - static int iqs624_pos_angle_get(struct iqs62x_core *iqs62x, unsigned int *= val) { int ret; @@ -255,19 +242,14 @@ static int iqs624_pos_probe(struct platform_device *p= dev) mutex_init(&iqs624_pos->lock); =20 iqs624_pos->notifier.notifier_call =3D iqs624_pos_notifier; - ret =3D blocking_notifier_chain_register(&iqs624_pos->iqs62x->nh, - &iqs624_pos->notifier); + ret =3D devm_blocking_notifier_chain_register(&pdev->dev, + &iqs624_pos->iqs62x->nh, + &iqs624_pos->notifier); if (ret) { dev_err(&pdev->dev, "Failed to register notifier: %d\n", ret); return ret; } =20 - ret =3D devm_add_action_or_reset(&pdev->dev, - iqs624_pos_notifier_unregister, - iqs624_pos); - if (ret) - return ret; - return devm_iio_device_register(&pdev->dev, indio_dev); } =20 --=20 2.47.3 From nobody Mon Sep 28 22:30:49 2026 Received: from pdx-out-003.esa.us-west-2.outbound.mail-perimeter.amazon.com (pdx-out-003.esa.us-west-2.outbound.mail-perimeter.amazon.com [44.246.68.102]) (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 28C893CB550; Sun, 16 Aug 2026 06:08:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=44.246.68.102 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786860485; cv=none; b=HWQju2dbaG91ccZ8PkSxl6MqIv6XQ0GgHpaHypwYw2w7klz2BbsdlnzUUJ9KIISXSckg50DfdFaGvdqCpmupTmTQzsIkrh2y2H2Wu62BZgh+BcqBuhfmRMem66smA6mVEKvwAFop1XTXPkmXGKjO7/oOAt5dlzr2EzqmUEDMrt0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786860485; c=relaxed/simple; bh=Mhbv/3L9S5GfOQUwCmKw84OjOJY1uPlxvUzN9T/VVYQ=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=a8Z6tTIQK4nQeEoUfNrM/PiLG7bV6no4oiadyZIU7Jrsf7kettMOCFc3bswwR1EOmpycq0C80CS2MCD780FVqK9O0tmvZ9o8onTNAv+j0EI7Bd4k/XNMzqJX0k/ohZp00NcAan/1xI+LfZnjsc6Nz6F8xVAU/O5ml7xMJIoZHU0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com; spf=pass smtp.mailfrom=amazon.com; dkim=pass (2048-bit key) header.d=amazon.com header.i=@amazon.com header.b=MdVfD/WD; arc=none smtp.client-ip=44.246.68.102 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amazon.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=amazon.com header.i=@amazon.com header.b="MdVfD/WD" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazoncorp2; t=1786860484; x=1818396484; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=eYv5yeumoyEsHf7hVGI7yQF/urKfJTXlSOVtPH4d8GU=; b=MdVfD/WDLhOXf5Hyho0uA6p06rCGVJQYcrGIU3tlNLDyIWGxv/kbvEf7 FzD/N1TvWzgOFUr1gM2E3WY8k7X308zoLWLT2iK97FNU7Hup5Gwd3iy2e Drmk8Tt+5vHIFcbsPxKDqJHchrBupucr37ziF+v3go9SwA8FLs2z2ryG4 bFFs/HsCXw4Ya2NwqkZIhY+JkAqwJST2VjE58J7pvCyFFFXkJgl5UzriC vaxApdhIui+1BaDFCK6BYs3qUYIHoU0iiIjRQPkGoYaP3gxXfAUqDamM9 xTWrZ9JcWGDNpLMEPigoe0k7hxbux9SE3g088Xm/x/W/MgexURjYgQp3R A==; X-CSE-ConnectionGUID: 2zZUNR/TRDOJBYL/Y1j92g== X-CSE-MsgGUID: FN6yeY/6So+856VdZrIg4w== X-IronPort-AV: E=Sophos;i="6.25,226,1779148800"; d="scan'208";a="26105700" Received: from ip-10-5-9-48.us-west-2.compute.internal (HELO smtpout.naws.us-west-2.prod.farcaster.email.amazon.dev) ([10.5.9.48]) by internal-pdx-out-003.esa.us-west-2.outbound.mail-perimeter.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2026 06:08:01 +0000 Received: from EX19MTAUWC001.ant.amazon.com [205.251.233.105:25595] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.43.40:2525] with esmtp (Farcaster) id 7d93f016-9414-4909-81ee-5bda9277a1a5; Sun, 16 Aug 2026 06:08:01 +0000 (UTC) X-Farcaster-Flow-ID: 7d93f016-9414-4909-81ee-5bda9277a1a5 Received: from EX19D001UWA001.ant.amazon.com (10.13.138.214) by EX19MTAUWC001.ant.amazon.com (10.250.64.174) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.45; Sun, 16 Aug 2026 06:08:01 +0000 Received: from dev-dsk-farbere-1a-46ecabed.eu-west-1.amazon.com (172.19.116.181) by EX19D001UWA001.ant.amazon.com (10.13.138.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.45; Sun, 16 Aug 2026 06:07:55 +0000 From: Eliav Farber To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: Bartosz Golaszewski Subject: [PATCH v5 05/13] gpio: adp5585: use devm_blocking_notifier_chain_register() Date: Sun, 16 Aug 2026 06:06:04 +0000 Message-ID: <20260816060648.4030-6-farbere@amazon.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260816060648.4030-1-farbere@amazon.com> References: <20260816060648.4030-1-farbere@amazon.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 X-ClientProxiedBy: EX19D040UWB003.ant.amazon.com (10.13.138.8) To EX19D001UWA001.ant.amazon.com (10.13.138.214) Content-Type: text/plain; charset="utf-8" Replace the blocking_notifier_chain_register() + devm_add_action_or_reset() pattern with a single call to devm_blocking_notifier_chain_register(), removing the adp5585_gpio_unreg_notifier() callback. Signed-off-by: Eliav Farber Acked-by: Bartosz Golaszewski Reviewed-by: Linus Walleij --- drivers/gpio/gpio-adp5585.c | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/drivers/gpio/gpio-adp5585.c b/drivers/gpio/gpio-adp5585.c index 6f10fc646008..7c04a7e86c8f 100644 --- a/drivers/gpio/gpio-adp5585.c +++ b/drivers/gpio/gpio-adp5585.c @@ -390,16 +390,6 @@ static const struct irq_chip adp5585_irq_chip =3D { GPIOCHIP_IRQ_RESOURCE_HELPERS, }; =20 -static void adp5585_gpio_unreg_notifier(void *data) -{ - struct adp5585_gpio_dev *adp5585_gpio =3D data; - struct device *dev =3D adp5585_gpio->gpio_chip.parent; - struct adp5585_dev *adp5585 =3D dev_get_drvdata(dev->parent); - - blocking_notifier_chain_unregister(&adp5585->event_notifier, - &adp5585_gpio->nb); -} - static int adp5585_gpio_probe(struct platform_device *pdev) { struct adp5585_dev *adp5585 =3D dev_get_drvdata(pdev->dev.parent); @@ -450,13 +440,9 @@ static int adp5585_gpio_probe(struct platform_device *= pdev) girq->threaded =3D true; =20 adp5585_gpio->nb.notifier_call =3D adp5585_gpio_key_event; - ret =3D blocking_notifier_chain_register(&adp5585->event_notifier, - &adp5585_gpio->nb); - if (ret) - return ret; - - ret =3D devm_add_action_or_reset(dev, adp5585_gpio_unreg_notifier, - adp5585_gpio); + ret =3D devm_blocking_notifier_chain_register(dev, + &adp5585->event_notifier, + &adp5585_gpio->nb); if (ret) return ret; } --=20 2.47.3 From nobody Mon Sep 28 22:30:49 2026 Received: from pdx-out-014.esa.us-west-2.outbound.mail-perimeter.amazon.com (pdx-out-014.esa.us-west-2.outbound.mail-perimeter.amazon.com [35.83.148.184]) (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 552653CEBBA; Sun, 16 Aug 2026 06:08:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=35.83.148.184 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786860490; cv=none; b=kz9+89DYdOWlYDoYiz5AKbxUJORKA9iX1iS69TBRjR5AKfz4v+1OlAyYs5Z2iYD7oE82k2hbek4+cw585tVn5Ojn7+MYohEYYaeN81lCBs12DYnfH+AE3UFst71jWaP8kDPQcT6d7in0EXX4t/Ix00QqltulZgxeg6i0nTtThzk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786860490; c=relaxed/simple; bh=ccWQ5f7CXtSGJ6qKQkHdoz4LI1e5kXAR6L75o+YE2YE=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=tobx8Xx1I0TYFbV1JMR/DOxCqnI/5dj6KTTXx+F1psTLoXQqe1TM0/uG/0DC3ZsvnWBeLSMi2FMbKntxGOojkUrVxDKZc4oY/IIWUEX4PGe6kifQkz3/a9KjH5c89tjAqXKmTzotucIqaW03ObDx5MdwzeyRUQHpB5IAdbRYak0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com; spf=pass smtp.mailfrom=amazon.com; dkim=pass (2048-bit key) header.d=amazon.com header.i=@amazon.com header.b=UWUnpLwJ; arc=none smtp.client-ip=35.83.148.184 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amazon.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=amazon.com header.i=@amazon.com header.b="UWUnpLwJ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazoncorp2; t=1786860489; x=1818396489; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=SMiveELrJ65lB2MwLXjygCgEyGxPmyjGo1Xt3qgKNns=; b=UWUnpLwJSgf06S4Ue2BJwOomA136yBRcRTtN7X0XWcUPwTMrYG7w/n10 xoJ57CzCcDNbUKq8Zfw3ISq56wzes+pFR3lt6GV/a87FC1Tsg74RcVzt4 af8z09wHPl5OxdvkRXLVGc8MHCXaXsQ6BoGG0f4rAN6T5wubjZfUtWOuR LMk2xB12d3P6ccKnnThuyA3k3rfiFYQQhcPyeXHjFXNCVIlryKOcLeBVD 2DJG6TQ3huBox7zdSzMMU8L53MNfe3lvsjzTfekgeOg1hyM0gS5fcN8DZ gJyBg7Es1LhfOu6bcNAwAan7xPwjCK5RrN90s8Qqr/XXlyrV9mCjf/PNf Q==; X-CSE-ConnectionGUID: dSzv4hweQySxe366LdfDdg== X-CSE-MsgGUID: PtRbkRkPSXO5z47ZKKvBxw== X-IronPort-AV: E=Sophos;i="6.25,226,1779148800"; d="scan'208";a="25877426" Received: from ip-10-5-9-48.us-west-2.compute.internal (HELO smtpout.naws.us-west-2.prod.farcaster.email.amazon.dev) ([10.5.9.48]) by internal-pdx-out-014.esa.us-west-2.outbound.mail-perimeter.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2026 06:08:07 +0000 Received: from EX19MTAUWB002.ant.amazon.com [205.251.233.111:31231] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.43.40:2525] with esmtp (Farcaster) id 280f68f6-79c5-43a7-8359-0b654c3f1a5d; Sun, 16 Aug 2026 06:08:06 +0000 (UTC) X-Farcaster-Flow-ID: 280f68f6-79c5-43a7-8359-0b654c3f1a5d Received: from EX19D001UWA001.ant.amazon.com (10.13.138.214) by EX19MTAUWB002.ant.amazon.com (10.250.64.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.45; Sun, 16 Aug 2026 06:08:06 +0000 Received: from dev-dsk-farbere-1a-46ecabed.eu-west-1.amazon.com (172.19.116.181) by EX19D001UWA001.ant.amazon.com (10.13.138.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.45; Sun, 16 Aug 2026 06:08:01 +0000 From: Eliav Farber To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v5 06/13] platform/x86: bitland-mifs-wmi: use devm_blocking_notifier_chain_register() Date: Sun, 16 Aug 2026 06:06:05 +0000 Message-ID: <20260816060648.4030-7-farbere@amazon.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260816060648.4030-1-farbere@amazon.com> References: <20260816060648.4030-1-farbere@amazon.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 X-ClientProxiedBy: EX19D040UWB003.ant.amazon.com (10.13.138.8) To EX19D001UWA001.ant.amazon.com (10.13.138.214) Content-Type: text/plain; charset="utf-8" Replace the blocking_notifier_chain_register() + devm_add_action_or_reset() pattern with a single call to devm_blocking_notifier_chain_register(), removing the bitland_notifier_unregister() callback. Signed-off-by: Eliav Farber --- drivers/platform/x86/bitland-mifs-wmi.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/drivers/platform/x86/bitland-mifs-wmi.c b/drivers/platform/x86= /bitland-mifs-wmi.c index 3a373184519d..2bcd4f692a74 100644 --- a/drivers/platform/x86/bitland-mifs-wmi.c +++ b/drivers/platform/x86/bitland-mifs-wmi.c @@ -623,13 +623,6 @@ static const struct key_entry bitland_mifs_wmi_keymap[= ] =3D { { KE_END, 0 } }; =20 -static void bitland_notifier_unregister(void *data) -{ - struct notifier_block *nb =3D data; - - blocking_notifier_chain_unregister(&bitland_notifier_list, nb); -} - static int bitland_notifier_callback(struct notifier_block *nb, unsigned long action, void *data) { @@ -729,13 +722,9 @@ static int bitland_mifs_wmi_probe(struct wmi_device *w= dev, const void *context) return ret; =20 drv_data->notifier.notifier_call =3D bitland_notifier_callback; - ret =3D blocking_notifier_chain_register(&bitland_notifier_list, &drv_dat= a->notifier); - if (ret) - return ret; - - return devm_add_action_or_reset(&wdev->dev, - bitland_notifier_unregister, - &drv_data->notifier); + return devm_blocking_notifier_chain_register(&wdev->dev, + &bitland_notifier_list, + &drv_data->notifier); } =20 static void bitland_mifs_wmi_notify(struct wmi_device *wdev, --=20 2.47.3 From nobody Mon Sep 28 22:30:49 2026 Received: from pdx-out-012.esa.us-west-2.outbound.mail-perimeter.amazon.com (pdx-out-012.esa.us-west-2.outbound.mail-perimeter.amazon.com [35.162.73.231]) (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 D215F3CF1F0; Sun, 16 Aug 2026 06:08:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=35.162.73.231 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786860496; cv=none; b=A0Q+kHUjGb0FM92HrBPTRr1LbC3XXiHW1EwE5dw6KleWG/nwr04u0c78x7ASh87xccCjzhv0K2C3w6H7cjxZ1nRs59fMxKNP2KEJ7BRUTmDHhQw+yTQMiicGrJ/8uBASikoVk88BMyU1lbIC6OXmSAbSSkS6td+UEsPqw0pbnUE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786860496; c=relaxed/simple; bh=p93Xi3+QWz5mgIAvFsvL+CuDQRRWZfvIYi36hn3w7nM=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=W3hP5v+NuftgD1gwxAxicX6GJzZaOGzW+V5KdwmZ7a4Fdqbu/yMsGPqCJBRfguU0JNxQHf2MuplVDMiX7XCxJBV5HEckhNeX2x3fHc3Hw2TGKJZBfmUhH9/A/AHTqALyErGbQDCrVJFUkJJPIEuAV46ckkz1tKD3/hWi2UlI5uY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com; spf=pass smtp.mailfrom=amazon.com; dkim=pass (2048-bit key) header.d=amazon.com header.i=@amazon.com header.b=agGiAILJ; arc=none smtp.client-ip=35.162.73.231 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amazon.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=amazon.com header.i=@amazon.com header.b="agGiAILJ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazoncorp2; t=1786860495; x=1818396495; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=laxFIxBck+pB02Yt8Wa+X7jWUZA4HD2OilknNa+X+9w=; b=agGiAILJn+tCXrWxQX4lc6OkXH98btBcSnWq2VEY6eCtT+Qqcc88Fd1r b7roKLGWBNL41S51YIsd2HdefM5p9GAE98itikbNGdEnj9Ihljzy1Sp+O VOqJB8EboJqZniPd6ZQMkosOBZ6qvXzAqlGPiXHDSOQGnzsnSu2savwg9 OGmgPIND4pMlg0HQXhaS3z/RJvQYkxaM6MDtY8tuizSCQfGG4K5RPAALd aRA4i7Ok0MjnRZTXM5/FQcg0LPiVHURNi+jl1h5Q42tdzqfWrxP/TFYv5 C8SUr1lLe40ge1cevbE0Zc5Up/jjJI++fAW45NOjgmDIIf6V9DZJQT1T+ g==; X-CSE-ConnectionGUID: TxkVuImuTIOleey4cYiXoQ== X-CSE-MsgGUID: xWzDYiqhQkmKkIGEcv9ZPg== X-IronPort-AV: E=Sophos;i="6.25,226,1779148800"; d="scan'208";a="25880990" Received: from ip-10-5-12-219.us-west-2.compute.internal (HELO smtpout.naws.us-west-2.prod.farcaster.email.amazon.dev) ([10.5.12.219]) by internal-pdx-out-012.esa.us-west-2.outbound.mail-perimeter.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2026 06:08:12 +0000 Received: from EX19MTAUWA002.ant.amazon.com [205.251.233.234:17912] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.12.154:2525] with esmtp (Farcaster) id 25df7501-f3eb-4c75-9c04-b91d6c78fe87; Sun, 16 Aug 2026 06:08:11 +0000 (UTC) X-Farcaster-Flow-ID: 25df7501-f3eb-4c75-9c04-b91d6c78fe87 Received: from EX19D001UWA001.ant.amazon.com (10.13.138.214) by EX19MTAUWA002.ant.amazon.com (10.250.64.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.45; Sun, 16 Aug 2026 06:08:11 +0000 Received: from dev-dsk-farbere-1a-46ecabed.eu-west-1.amazon.com (172.19.116.181) by EX19D001UWA001.ant.amazon.com (10.13.138.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.45; Sun, 16 Aug 2026 06:08:06 +0000 From: Eliav Farber To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v5 07/13] Input: adp5585: use devm_blocking_notifier_chain_register() Date: Sun, 16 Aug 2026 06:06:06 +0000 Message-ID: <20260816060648.4030-8-farbere@amazon.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260816060648.4030-1-farbere@amazon.com> References: <20260816060648.4030-1-farbere@amazon.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 X-ClientProxiedBy: EX19D040UWB003.ant.amazon.com (10.13.138.8) To EX19D001UWA001.ant.amazon.com (10.13.138.214) Content-Type: text/plain; charset="utf-8" Replace the blocking_notifier_chain_register() + devm_add_action_or_reset() pattern with a single call to devm_blocking_notifier_chain_register(), removing the adp5585_keys_unreg_notifier() callback. Signed-off-by: Eliav Farber Acked-by: Dmitry Torokhov --- drivers/input/keyboard/adp5585-keys.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/drivers/input/keyboard/adp5585-keys.c b/drivers/input/keyboard= /adp5585-keys.c index 017c95029180..0be4cc234c21 100644 --- a/drivers/input/keyboard/adp5585-keys.c +++ b/drivers/input/keyboard/adp5585-keys.c @@ -254,15 +254,6 @@ static int adp5585_keys_ev_handle(struct notifier_bloc= k *nb, unsigned long key, return NOTIFY_STOP; } =20 -static void adp5585_keys_unreg_notifier(void *data) -{ - struct adp5585_kpad *kpad =3D data; - struct adp5585_dev *adp5585 =3D dev_get_drvdata(kpad->dev->parent); - - blocking_notifier_chain_unregister(&adp5585->event_notifier, - &kpad->nb); -} - static int adp5585_keys_probe(struct platform_device *pdev) { const struct platform_device_id *id =3D platform_get_device_id(pdev); @@ -318,12 +309,9 @@ static int adp5585_keys_probe(struct platform_device *= pdev) return error; =20 kpad->nb.notifier_call =3D adp5585_keys_ev_handle; - error =3D blocking_notifier_chain_register(&adp5585->event_notifier, - &kpad->nb); - if (error) - return error; - - error =3D devm_add_action_or_reset(dev, adp5585_keys_unreg_notifier, kpad= ); + error =3D devm_blocking_notifier_chain_register(dev, + &adp5585->event_notifier, + &kpad->nb); if (error) return error; =20 --=20 2.47.3 From nobody Mon Sep 28 22:30:49 2026 Received: from pdx-out-012.esa.us-west-2.outbound.mail-perimeter.amazon.com (pdx-out-012.esa.us-west-2.outbound.mail-perimeter.amazon.com [35.162.73.231]) (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 E5FFF3D0914; Sun, 16 Aug 2026 06:08:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=35.162.73.231 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786860499; cv=none; b=ALKUAUy2+Ye+a9hqYaqM4ThcpJXwZdt69UTMK+q6NPFQuIenE8JPMo6fepCqv2tQdwyIS3+02I8f387EggghtPuyrh0/ItW+O91dlgPHeI0SdmwmGTfErTeMFxQafsRZ91ehpsuyZJQ4MsqNJ6823i/xhj33SXRBrL693Z+7OPg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786860499; c=relaxed/simple; bh=GR5sDpU92YulwatJevArPuB+YtgTuETpAiFrMEh5GSY=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=vFTOIv6fZ9I/gWmY0af3BoZmrkvga4V4Dagq0XtZ31qaoX2apqRP/HZfFqOMzvubpT+fG/SD7l1GWFbp7eD1LiPGLpSyKmxTsiOlG3VlGSIIzEgVU3XmmjV3Qo49bxpQOhKp9S9HKaqu3C9bsDKPY5jjVrjTxVOr4Ecuw4SWE9Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com; spf=pass smtp.mailfrom=amazon.com; dkim=pass (2048-bit key) header.d=amazon.com header.i=@amazon.com header.b=AqejXWcf; arc=none smtp.client-ip=35.162.73.231 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amazon.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=amazon.com header.i=@amazon.com header.b="AqejXWcf" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazoncorp2; t=1786860498; x=1818396498; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Ydve0iM3rqWmqxrIth0r33l2kNMEYwjTtjvISqPZNv8=; b=AqejXWcfyXXARktsEQysBkzyPusZP+vZzMW6kpTWQxIvt7FsNqbZs+pI 3+bpJ569gXlApxKnVUYsOCc2ijJgkgTLXD2WGVu26dW0eBKjJ3jNF6UFG fSibfeEpfOY6JB7Gps24H+2f7Wa3BVMPMPjERgXBCkvqSYnzm7Hee8C4g BZETqp7m1tAid3nYoUvCzVTe22O9Mikvmo2TZ7Svuiu2RkSChIblrAHff cJsWwSDymKP0mhhfcjbFrE7oF3WQbhrn+2KI/+3WxtvlgOba5u9ko1xr+ V/P0hTCB8uHPBdmsJu0uqyudeeW6fVF2kJTfOiayY2aXhnh4E2+4VP3Dk g==; X-CSE-ConnectionGUID: cJAmRmffTxG+qMLzcRxs5A== X-CSE-MsgGUID: I3BXHHWsScGojHiT1x4VOA== X-IronPort-AV: E=Sophos;i="6.25,226,1779148800"; d="scan'208";a="25880994" Received: from ip-10-5-12-219.us-west-2.compute.internal (HELO smtpout.naws.us-west-2.prod.farcaster.email.amazon.dev) ([10.5.12.219]) by internal-pdx-out-012.esa.us-west-2.outbound.mail-perimeter.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2026 06:08:17 +0000 Received: from EX19MTAUWB001.ant.amazon.com [205.251.233.104:19160] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.4.160:2525] with esmtp (Farcaster) id b2abe2e4-2796-4b81-b5e1-f3b2108c8db5; Sun, 16 Aug 2026 06:08:17 +0000 (UTC) X-Farcaster-Flow-ID: b2abe2e4-2796-4b81-b5e1-f3b2108c8db5 Received: from EX19D001UWA001.ant.amazon.com (10.13.138.214) by EX19MTAUWB001.ant.amazon.com (10.250.64.248) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.45; Sun, 16 Aug 2026 06:08:17 +0000 Received: from dev-dsk-farbere-1a-46ecabed.eu-west-1.amazon.com (172.19.116.181) by EX19D001UWA001.ant.amazon.com (10.13.138.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.45; Sun, 16 Aug 2026 06:08:11 +0000 From: Eliav Farber To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: Jonathan Cameron Subject: [PATCH v5 08/13] ACPI: APEI: GHES: remove unused ghes_{,un}register_vendor_record_notifier() Date: Sun, 16 Aug 2026 06:06:07 +0000 Message-ID: <20260816060648.4030-9-farbere@amazon.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260816060648.4030-1-farbere@amazon.com> References: <20260816060648.4030-1-farbere@amazon.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: EX19D040UWB003.ant.amazon.com (10.13.138.8) To EX19D001UWA001.ant.amazon.com (10.13.138.214) Remove ghes_register_vendor_record_notifier() and ghes_unregister_vendor_record_notifier() along with their EXPORT_SYMBOL_GPL()s and ghes.h declarations, since there are no remaining in-tree callers =E2=80=94 all users go through devm_ghes_register_vendor_record_notifier() instead. Inline the register/unregister calls directly into devm_ghes_register_vendor_record_notifier() and its destroy callback. Signed-off-by: Eliav Farber Reviewed-by: Jonathan Cameron --- Changes in v4: - Split from the devm conversion patch into its own commit (Andy Shevchenko) Changes in v2: - New patch: remove unused ghes_register_vendor_record_notifier() and ghes_unregister_vendor_record_notifier() along with their EXPORT_SYMBOL_GPL()s and ghes.h declarations, since there are no in-tree callers (Jonathan Cameron) drivers/acpi/apei/ghes.c | 16 +++------------- include/acpi/ghes.h | 16 ---------------- 2 files changed, 3 insertions(+), 29 deletions(-) diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index 3236a3ce79d6..4e092f71ca84 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -677,29 +677,19 @@ static void ghes_handle_aer(struct acpi_hest_generic_= data *gdata) =20 static BLOCKING_NOTIFIER_HEAD(vendor_record_notify_list); =20 -int ghes_register_vendor_record_notifier(struct notifier_block *nb) +static void ghes_vendor_record_notifier_destroy(void *data) { - return blocking_notifier_chain_register(&vendor_record_notify_list, nb); -} -EXPORT_SYMBOL_GPL(ghes_register_vendor_record_notifier); + struct notifier_block *nb =3D data; =20 -void ghes_unregister_vendor_record_notifier(struct notifier_block *nb) -{ blocking_notifier_chain_unregister(&vendor_record_notify_list, nb); } -EXPORT_SYMBOL_GPL(ghes_unregister_vendor_record_notifier); - -static void ghes_vendor_record_notifier_destroy(void *nb) -{ - ghes_unregister_vendor_record_notifier(nb); -} =20 int devm_ghes_register_vendor_record_notifier(struct device *dev, struct notifier_block *nb) { int ret; =20 - ret =3D ghes_register_vendor_record_notifier(nb); + ret =3D blocking_notifier_chain_register(&vendor_record_notify_list, nb); if (ret) return ret; =20 diff --git a/include/acpi/ghes.h b/include/acpi/ghes.h index 8d7e5caef3f1..3cd13171c14f 100644 --- a/include/acpi/ghes.h +++ b/include/acpi/ghes.h @@ -55,22 +55,6 @@ enum { }; =20 #ifdef CONFIG_ACPI_APEI_GHES -/** - * ghes_register_vendor_record_notifier - register a notifier for vendor - * records that the kernel would otherwise ignore. - * @nb: pointer to the notifier_block structure of the event handler. - * - * return 0 : SUCCESS, non-zero : FAIL - */ -int ghes_register_vendor_record_notifier(struct notifier_block *nb); - -/** - * ghes_unregister_vendor_record_notifier - unregister the previously - * registered vendor record notifier. - * @nb: pointer to the notifier_block structure of the vendor record handl= er. - */ -void ghes_unregister_vendor_record_notifier(struct notifier_block *nb); - /** * devm_ghes_register_vendor_record_notifier - device-managed vendor * record notifier registration. --=20 2.47.3 From nobody Mon Sep 28 22:30:49 2026 Received: from pdx-out-006.esa.us-west-2.outbound.mail-perimeter.amazon.com (pdx-out-006.esa.us-west-2.outbound.mail-perimeter.amazon.com [52.26.1.71]) (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 870213CF21E; Sun, 16 Aug 2026 06:08:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=52.26.1.71 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786860504; cv=none; b=R3cZmD0CgDnVSzVYQ8i9gSq996QORkMjOXN3xqFt3VFwuQuIU4aGkGix9qnulb47SPP/HIz66hsuK4yA3Er9tdh9K8pPL4Qt8Ci6nhJQM5kVLtDMgYu2bm1bRkArhBDqBGy9xlzHJHy6kNvzCvJcmdzsH8x3rOHB3b/aP50XveM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786860504; c=relaxed/simple; bh=4Ym9Mohy3QYKQZvhJ0IfqkGDiLp2LT92TjB7oRlEOkY=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=qbZqYJMV76ahTtdpVO1FsQN4ZCTdrk07i9B9jwLE+G7OwVcSvjhfafuSzDuoI4cZVhp1iwiqXqIca7OCAZJQPY6mkZSkNgCvpfFg2vcMeR/CSmrpzsjb4WvEHdphdxGausqqkZsh9QfNiKG/Rgdl6C33V1HYVobOcESd7177WXs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com; spf=pass smtp.mailfrom=amazon.com; dkim=pass (2048-bit key) header.d=amazon.com header.i=@amazon.com header.b=XS2QnERA; arc=none smtp.client-ip=52.26.1.71 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amazon.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=amazon.com header.i=@amazon.com header.b="XS2QnERA" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazoncorp2; t=1786860503; x=1818396503; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=qayjjBZP/+V4G1veIJz/I2y/nXssS2V4J9zDtPx1Dn4=; b=XS2QnERALIAxMZ43Aetxqchq0sd0TFzY+/4bMuOCBD8qyXuLd02mz4US AUaDVWYhGjDTte0cmhQnbpux2MA/DfaEybKVB1/quPvol3YUnUNlwWr5m ykWoUTcfX+P7F8tcikXBwAp8Jt2nEi9puhoOCI0qDCy2RKFea6xULbjCl lfHiwNHQKiZ7pD5AV8WymhWY5wHWK2Pn7MlhSZ+MSpQHppZLPW0ced6kr hqRk8J2XH916x8vA7XktRzS672MFYZpzHAzVt0UU28JWoSQEjkeMx/XrC 4vdt/K5/V1WSlxqrN3SeBcd4hVn/x8TUZeN/TYaRd9yexgyQQYIakj4rK g==; X-CSE-ConnectionGUID: Nb8KjsDkQY+FPy6n+4s1xg== X-CSE-MsgGUID: A/umW3Y1SKaYfL65DGTwow== X-IronPort-AV: E=Sophos;i="6.25,226,1779148800"; d="scan'208";a="26109167" Received: from ip-10-5-6-203.us-west-2.compute.internal (HELO smtpout.naws.us-west-2.prod.farcaster.email.amazon.dev) ([10.5.6.203]) by internal-pdx-out-006.esa.us-west-2.outbound.mail-perimeter.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2026 06:08:23 +0000 Received: from EX19MTAUWC002.ant.amazon.com [205.251.233.111:22643] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.41.125:2525] with esmtp (Farcaster) id 89796839-0fac-40fc-bede-0c7ec630d35e; Sun, 16 Aug 2026 06:08:22 +0000 (UTC) X-Farcaster-Flow-ID: 89796839-0fac-40fc-bede-0c7ec630d35e Received: from EX19D001UWA001.ant.amazon.com (10.13.138.214) by EX19MTAUWC002.ant.amazon.com (10.250.64.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.45; Sun, 16 Aug 2026 06:08:22 +0000 Received: from dev-dsk-farbere-1a-46ecabed.eu-west-1.amazon.com (172.19.116.181) by EX19D001UWA001.ant.amazon.com (10.13.138.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.45; Sun, 16 Aug 2026 06:08:17 +0000 From: Eliav Farber To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: Jonathan Cameron Subject: [PATCH v5 09/13] ACPI: APEI: GHES: use devm_blocking_notifier_chain_register() Date: Sun, 16 Aug 2026 06:06:08 +0000 Message-ID: <20260816060648.4030-10-farbere@amazon.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260816060648.4030-1-farbere@amazon.com> References: <20260816060648.4030-1-farbere@amazon.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 X-ClientProxiedBy: EX19D040UWB003.ant.amazon.com (10.13.138.8) To EX19D001UWA001.ant.amazon.com (10.13.138.214) Content-Type: text/plain; charset="utf-8" Replace the blocking_notifier_chain_register() + devm_add_action_or_reset() pattern with a single call to devm_blocking_notifier_chain_register(), removing the ghes_vendor_record_notifier_destroy() callback. Signed-off-by: Eliav Farber Reviewed-by: Jonathan Cameron --- Changes in v4: - Split removal of unused code into a separate preceding patch (Andy Shevchenko) drivers/acpi/apei/ghes.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index 4e092f71ca84..4419d430b7fd 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -677,23 +677,12 @@ static void ghes_handle_aer(struct acpi_hest_generic_= data *gdata) =20 static BLOCKING_NOTIFIER_HEAD(vendor_record_notify_list); =20 -static void ghes_vendor_record_notifier_destroy(void *data) -{ - struct notifier_block *nb =3D data; - - blocking_notifier_chain_unregister(&vendor_record_notify_list, nb); -} - int devm_ghes_register_vendor_record_notifier(struct device *dev, struct notifier_block *nb) { - int ret; - - ret =3D blocking_notifier_chain_register(&vendor_record_notify_list, nb); - if (ret) - return ret; - - return devm_add_action_or_reset(dev, ghes_vendor_record_notifier_destroy,= nb); + return devm_blocking_notifier_chain_register(dev, + &vendor_record_notify_list, + nb); } EXPORT_SYMBOL_GPL(devm_ghes_register_vendor_record_notifier); =20 --=20 2.47.3 From nobody Mon Sep 28 22:30:49 2026 Received: from pdx-out-010.esa.us-west-2.outbound.mail-perimeter.amazon.com (pdx-out-010.esa.us-west-2.outbound.mail-perimeter.amazon.com [52.12.53.23]) (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 D970B3CF1E7; Sun, 16 Aug 2026 06:09:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=52.12.53.23 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786860545; cv=none; b=sR0jmP9fA4RNcs+OOtYokjXU8SlNu0pma+/Wc5eAWPz3+XmBtvXvi5pNzDZlQH2B/jCJlqkFSQQpY3CpaNS8AmytdMlqSKi5lNgS7cYSraAGviFS0kRR9HfiXnQ8pNxsGJT0DxQWWYCUzG6l3nPMvY/blltu6CwrYaCMitSssg4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786860545; c=relaxed/simple; bh=j4UpJ76OIzsIDW6GWYb1SRnKtYPJEv6yT360/9ZdNUY=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ig/bXy7VxHLFg2R0xyyO/tZiNTfPyXsYqiF8AbHBpPwTtLZYIfJVTWc7LT1nRsoYXbUx8cFQ+7asEFylHLE1zflEqoapojAna2BaHPRX111HwYFbTSt2+vnyaXSbvcOSl/q2pxmEF+BQVByKtEFnuXEszqsNMb3HlHsPg728xyc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com; spf=pass smtp.mailfrom=amazon.com; dkim=pass (2048-bit key) header.d=amazon.com header.i=@amazon.com header.b=hHZ+berD; arc=none smtp.client-ip=52.12.53.23 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amazon.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=amazon.com header.i=@amazon.com header.b="hHZ+berD" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazoncorp2; t=1786860543; x=1818396543; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=di98LHVqqC68671Zg5i9c2evIHi7Mg5rip5VLHRMfVw=; b=hHZ+berDkgK8zRI7LgbvhFx2a3N22fKf+61VrA/wEqqepD0lFQB3LTw6 LrmJbLLhqA6aCsTaIqq5iJSOaKNiN5EJ8TMvJwQ/E4PSosJ7B9tbaZCpn CNumRHjTFkYyq7F0h3ZbG/N7CNOXpmCw/PG88rllrykNH1KQxaoMIrgxQ fl8ObOEpMZDXuYwL8hlGBjJFOmb67r0V90SSLQ1FXnyVqBmR3sP6tFbuI ZJbiYGGkvUFweXYdAaQghY8CGVS2cJ2EfiIqu3A1NvzKuEPq489XOdOrv guONUJIUSjPKCmtRX2s31g1JRFt9kQsYesptH3wwowbVqiIK3p4m+xCCA w==; X-CSE-ConnectionGUID: NN8jFoi6TcmPAi/yQkmPnQ== X-CSE-MsgGUID: sPA203uyRB2fjcrseZMazw== X-IronPort-AV: E=Sophos;i="6.25,226,1779148800"; d="scan'208";a="25957855" Received: from ip-10-5-12-219.us-west-2.compute.internal (HELO smtpout.naws.us-west-2.prod.farcaster.email.amazon.dev) ([10.5.12.219]) by internal-pdx-out-010.esa.us-west-2.outbound.mail-perimeter.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2026 06:09:03 +0000 Received: from EX19MTAUWA001.ant.amazon.com [205.251.233.182:30260] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.23.46:2525] with esmtp (Farcaster) id 00934dab-2024-4461-82d2-484111070a0b; Sun, 16 Aug 2026 06:09:03 +0000 (UTC) X-Farcaster-Flow-ID: 00934dab-2024-4461-82d2-484111070a0b Received: from EX19D001UWA001.ant.amazon.com (10.13.138.214) by EX19MTAUWA001.ant.amazon.com (10.250.64.218) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.45; Sun, 16 Aug 2026 06:09:02 +0000 Received: from dev-dsk-farbere-1a-46ecabed.eu-west-1.amazon.com (172.19.116.181) by EX19D001UWA001.ant.amazon.com (10.13.138.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.45; Sun, 16 Aug 2026 06:08:57 +0000 From: Eliav Farber To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v5 10/13] platform/x86: uniwill-wmi: use devm_blocking_notifier_chain_register() Date: Sun, 16 Aug 2026 06:06:09 +0000 Message-ID: <20260816060648.4030-11-farbere@amazon.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260816060648.4030-1-farbere@amazon.com> References: <20260816060648.4030-1-farbere@amazon.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 X-ClientProxiedBy: EX19D033UWC002.ant.amazon.com (10.13.139.196) To EX19D001UWA001.ant.amazon.com (10.13.138.214) Content-Type: text/plain; charset="utf-8" Replace the blocking_notifier_chain_register() + devm_add_action_or_reset() pattern with a single call to devm_blocking_notifier_chain_register(), removing the devm_uniwill_wmi_unregister_notifier() callback. Signed-off-by: Eliav Farber Reviewed-by: Armin Wolf --- drivers/platform/x86/uniwill/uniwill-wmi.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/drivers/platform/x86/uniwill/uniwill-wmi.c b/drivers/platform/= x86/uniwill/uniwill-wmi.c index afcbfa4f7552..2ffa29a829ee 100644 --- a/drivers/platform/x86/uniwill/uniwill-wmi.c +++ b/drivers/platform/x86/uniwill/uniwill-wmi.c @@ -26,22 +26,11 @@ =20 static BLOCKING_NOTIFIER_HEAD(uniwill_wmi_chain_head); =20 -static void devm_uniwill_wmi_unregister_notifier(void *data) -{ - struct notifier_block *nb =3D data; - - blocking_notifier_chain_unregister(&uniwill_wmi_chain_head, nb); -} - int devm_uniwill_wmi_register_notifier(struct device *dev, struct notifier= _block *nb) { - int ret; - - ret =3D blocking_notifier_chain_register(&uniwill_wmi_chain_head, nb); - if (ret < 0) - return ret; - - return devm_add_action_or_reset(dev, devm_uniwill_wmi_unregister_notifier= , nb); + return devm_blocking_notifier_chain_register(dev, + &uniwill_wmi_chain_head, + nb); } =20 static void uniwill_wmi_notify(struct wmi_device *wdev, union acpi_object = *obj) --=20 2.47.3 From nobody Mon Sep 28 22:30:49 2026 Received: from pdx-out-009.esa.us-west-2.outbound.mail-perimeter.amazon.com (pdx-out-009.esa.us-west-2.outbound.mail-perimeter.amazon.com [35.155.198.111]) (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 0BBDE3CF207; Sun, 16 Aug 2026 06:09:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=35.155.198.111 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786860552; cv=none; b=YLLJ+OQkUoIaPT8u6DzppAN5Mn/YHLgz20srBR3kzmMG1bl+CAoeG3XOI66WcTIr2+p+rzDCAtNXHx+iLY8f9eUk7gqTaflik5w75XwV+wHQ73SnY50FK8r45ykS5ewpgmFnKNZ0nlZj8aTAApz9gxTQSFSyhfgz5lPGuO/Jx8g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786860552; c=relaxed/simple; bh=ajlXmeblGTrAWyT6gjIYLkVOOIoMXEJo2ycZbfvOhF8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ZRSjY3DP+WtCbonqsw00oCU+jTY5HBSOTyVeaKMJWJ1ycq4mVC1AQGzInwXMBe9OV3mizOcJ5DL0EWuGWSEQfGx+B4B3qPaxgBnEh/ctkicq9tBOBn0TfP3Xa2PnQd+2whboAw+eb37s18oJvS13Vsntbk15k9RTRr9qoDNhZgk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com; spf=pass smtp.mailfrom=amazon.com; dkim=pass (2048-bit key) header.d=amazon.com header.i=@amazon.com header.b=cBMW7e0P; arc=none smtp.client-ip=35.155.198.111 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amazon.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=amazon.com header.i=@amazon.com header.b="cBMW7e0P" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazoncorp2; t=1786860551; x=1818396551; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dnIHJPa4rsw+GRpoRlk7SycvZjiMhD5FjBTQ4kuxmrY=; b=cBMW7e0P5rOEaco4HqvAOzQNIsgAydzseQ2MqUfYMGmnIf0gmufMKhjT JIdsOVAtekMJuJiNL12X++mJIo0+tCQ5Kb0d7ABDH6wogAJaXduME10Ib /kKHqAZ1b3krHTQWAj1s/+eIfM2QYR0viGz4AyctieUJcq3UJS+xPe/nU hbZAN71V8N0R0rOPymuNt8KHrJ1UVBTGOawmztuiyb/odC4d6axMT0w+5 rSKa9GTFarqLg0EnIrpQZixCtFRIZojdjTivcRcFrhR2UzKEwgvH2Evwp F4K0HIm8O4dOH/eVveOi6EfGYo0NGP1WxMGWya7Yp1FXbfc5fnD6bLGk1 g==; X-CSE-ConnectionGUID: mRa4OV4ZQvyKwTDEpZD3DQ== X-CSE-MsgGUID: 6kl3aWLXQC+E9G8yYIcVwQ== X-IronPort-AV: E=Sophos;i="6.25,226,1779148800"; d="scan'208";a="25976568" Received: from ip-10-5-0-115.us-west-2.compute.internal (HELO smtpout.naws.us-west-2.prod.farcaster.email.amazon.dev) ([10.5.0.115]) by internal-pdx-out-009.esa.us-west-2.outbound.mail-perimeter.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2026 06:09:08 +0000 Received: from EX19MTAUWC001.ant.amazon.com [205.251.233.105:20238] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.63.84:2525] with esmtp (Farcaster) id 93a11804-b57e-4283-b632-87c7c22122a3; Sun, 16 Aug 2026 06:09:08 +0000 (UTC) X-Farcaster-Flow-ID: 93a11804-b57e-4283-b632-87c7c22122a3 Received: from EX19D001UWA001.ant.amazon.com (10.13.138.214) by EX19MTAUWC001.ant.amazon.com (10.250.64.174) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.45; Sun, 16 Aug 2026 06:09:08 +0000 Received: from dev-dsk-farbere-1a-46ecabed.eu-west-1.amazon.com (172.19.116.181) by EX19D001UWA001.ant.amazon.com (10.13.138.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.45; Sun, 16 Aug 2026 06:09:02 +0000 From: Eliav Farber To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: Bartosz Golaszewski Subject: [PATCH v5 11/13] gpio: eic-sprd: use devm_atomic_notifier_chain_register() Date: Sun, 16 Aug 2026 06:06:10 +0000 Message-ID: <20260816060648.4030-12-farbere@amazon.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260816060648.4030-1-farbere@amazon.com> References: <20260816060648.4030-1-farbere@amazon.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 X-ClientProxiedBy: EX19D033UWC002.ant.amazon.com (10.13.139.196) To EX19D001UWA001.ant.amazon.com (10.13.138.214) Content-Type: text/plain; charset="utf-8" Replace the atomic_notifier_chain_register() + devm_add_action_or_reset() pattern with a single call to devm_atomic_notifier_chain_register(), removing the sprd_eic_unregister_notifier() callback. Signed-off-by: Eliav Farber Acked-by: Bartosz Golaszewski Reviewed-by: Baolin Wang Reviewed-by: Linus Walleij --- drivers/gpio/gpio-eic-sprd.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/drivers/gpio/gpio-eic-sprd.c b/drivers/gpio/gpio-eic-sprd.c index 3b7ebcf12fe7..86eb9624d38a 100644 --- a/drivers/gpio/gpio-eic-sprd.c +++ b/drivers/gpio/gpio-eic-sprd.c @@ -601,13 +601,6 @@ static const struct irq_chip sprd_eic_irq =3D { GPIOCHIP_IRQ_RESOURCE_HELPERS, }; =20 -static void sprd_eic_unregister_notifier(void *data) -{ - struct notifier_block *nb =3D data; - - atomic_notifier_chain_unregister(&sprd_eic_irq_notifier, nb); -} - static int sprd_eic_probe(struct platform_device *pdev) { const struct sprd_eic_variant_data *pdata; @@ -690,14 +683,8 @@ static int sprd_eic_probe(struct platform_device *pdev) } =20 sprd_eic->irq_nb.notifier_call =3D sprd_eic_irq_notify; - ret =3D atomic_notifier_chain_register(&sprd_eic_irq_notifier, - &sprd_eic->irq_nb); - if (ret) - return dev_err_probe(dev, ret, - "Failed to register with the interrupt notifier"); - - return devm_add_action_or_reset(dev, sprd_eic_unregister_notifier, - &sprd_eic->irq_nb); + return devm_atomic_notifier_chain_register(dev, &sprd_eic_irq_notifier, + &sprd_eic->irq_nb); } =20 static const struct of_device_id sprd_eic_of_match[] =3D { --=20 2.47.3 From nobody Mon Sep 28 22:30:49 2026 Received: from pdx-out-010.esa.us-west-2.outbound.mail-perimeter.amazon.com (pdx-out-010.esa.us-west-2.outbound.mail-perimeter.amazon.com [52.12.53.23]) (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 AA0473CF692; Sun, 16 Aug 2026 06:09:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=52.12.53.23 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786860556; cv=none; b=sssv16tv0gvj0gc12otY5115/hzzTz1vOkoAjuhWMXMkaUTAOJTFsVd0TGuDPm9uFP1PxJo5Ps7jdvF7pS2EGhIUkHdg+XWfb7rJMqs3yEkTmxZe1mxGNg4HDQTz3rkEhcw3Assabd3S5ntPSi4CmqPPHrDm8PAVdlR4j4i4x0Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786860556; c=relaxed/simple; bh=nET7mdkuxv67WiLFiVTjYxDb0PTAF1dVj6Wn3LdZfEU=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=TnIojfysH3g/g9VgEDSOtV8a7CJfU9EHW57m2vXJMHU64VNMryEM6M37Ir0g4/pU32sg8iFl/5J2diyah62e32jHFO/f14jv371gvwWbdjhT4od4Nrm++kohHrvBBoyBafxlsaFIfi7cy2i45CBn96/O26ULt2twyJg6kW7pDHs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com; spf=pass smtp.mailfrom=amazon.com; dkim=pass (2048-bit key) header.d=amazon.com header.i=@amazon.com header.b=pC6KDAI5; arc=none smtp.client-ip=52.12.53.23 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amazon.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=amazon.com header.i=@amazon.com header.b="pC6KDAI5" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazoncorp2; t=1786860554; x=1818396554; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Kbgy0STkJuqC3yffNjoxCaNm4x0iowu7ya0lQymx16w=; b=pC6KDAI5+KpNX2kTy2zi+eC/aK/2rdn1AlxJwO4fkZ+V/11vx5zeh9yq fTQi8xhxjcY7FGFqCJSYb5hywkgYG/AitCvWvz3A+0gZuk/ciAwkwWjlS 5A2krbvJ21WTjkYLFWz92j45tKhmXNxmsXXYaZNcZf+a1/wcHU2CV+7yQ NraI46Jrv/idifGdXJQNfBrRFufhFUI7/AhRmpQWrfrRFsPSJExv0nwWD 1+V1uwmD2DAMjsiNxeuavBKOdjms69RyTSj1Tc5PFB1//u+qjtxXhCwUT L48XUf3IucBhA+B9AFFlOA09MaK5FeRiZddwGhPGZqMymz97y6a7NIovH Q==; X-CSE-ConnectionGUID: AMC0h8hNSA+u+lDxXNezrA== X-CSE-MsgGUID: yHb4Q1mLR5S/9sExcyP2Ig== X-IronPort-AV: E=Sophos;i="6.25,226,1779148800"; d="scan'208";a="25957866" Received: from ip-10-5-12-219.us-west-2.compute.internal (HELO smtpout.naws.us-west-2.prod.farcaster.email.amazon.dev) ([10.5.12.219]) by internal-pdx-out-010.esa.us-west-2.outbound.mail-perimeter.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2026 06:09:14 +0000 Received: from EX19MTAUWB002.ant.amazon.com [205.251.233.111:7480] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.62.140:2525] with esmtp (Farcaster) id a54270dd-e0c6-44b2-a7f0-80c9b196d125; Sun, 16 Aug 2026 06:09:14 +0000 (UTC) X-Farcaster-Flow-ID: a54270dd-e0c6-44b2-a7f0-80c9b196d125 Received: from EX19D001UWA001.ant.amazon.com (10.13.138.214) by EX19MTAUWB002.ant.amazon.com (10.250.64.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.45; Sun, 16 Aug 2026 06:09:13 +0000 Received: from dev-dsk-farbere-1a-46ecabed.eu-west-1.amazon.com (172.19.116.181) by EX19D001UWA001.ant.amazon.com (10.13.138.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.45; Sun, 16 Aug 2026 06:09:08 +0000 From: Eliav Farber To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: Bartosz Golaszewski Subject: [PATCH v5 12/13] gpio: gpiolib-kunit: use devm_blocking_notifier_chain_register() Date: Sun, 16 Aug 2026 06:06:11 +0000 Message-ID: <20260816060648.4030-13-farbere@amazon.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260816060648.4030-1-farbere@amazon.com> References: <20260816060648.4030-1-farbere@amazon.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 X-ClientProxiedBy: EX19D033UWC002.ant.amazon.com (10.13.139.196) To EX19D001UWA001.ant.amazon.com (10.13.138.214) Content-Type: text/plain; charset="utf-8" Replace the blocking_notifier_chain_register() + devm_add_action_or_reset() pattern with a single call to devm_blocking_notifier_chain_register(), removing the gpio_unbind_unregister_notifier() callback. Signed-off-by: Eliav Farber Acked-by: Bartosz Golaszewski Reviewed-by: Linus Walleij --- drivers/gpio/gpiolib-kunit.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/gpio/gpiolib-kunit.c b/drivers/gpio/gpiolib-kunit.c index 380b68f879e5..8ce9acc89e29 100644 --- a/drivers/gpio/gpiolib-kunit.c +++ b/drivers/gpio/gpiolib-kunit.c @@ -237,13 +237,6 @@ static int gpio_unbind_notify(struct notifier_block *n= b, unsigned long action, return NOTIFY_OK; } =20 -static void gpio_unbind_unregister_notifier(void *data) -{ - struct notifier_block *nb =3D data; - - blocking_notifier_chain_unregister(&gpio_unbind_notifier, nb); -} - static int gpio_unbind_consumer_probe(struct platform_device *pdev) { struct gpio_unbind_consumer_drvdata *data; @@ -261,11 +254,8 @@ static int gpio_unbind_consumer_probe(struct platform_= device *pdev) return PTR_ERR(data->desc); =20 data->nb.notifier_call =3D gpio_unbind_notify; - ret =3D blocking_notifier_chain_register(&gpio_unbind_notifier, &data->nb= ); - if (ret) - return ret; - - ret =3D devm_add_action_or_reset(dev, gpio_unbind_unregister_notifier, &d= ata->nb); + ret =3D devm_blocking_notifier_chain_register(dev, &gpio_unbind_notifier, + &data->nb); if (ret) return ret; =20 --=20 2.47.3 From nobody Mon Sep 28 22:30:49 2026 Received: from pdx-out-014.esa.us-west-2.outbound.mail-perimeter.amazon.com (pdx-out-014.esa.us-west-2.outbound.mail-perimeter.amazon.com [35.83.148.184]) (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 2BC093CF678; Sun, 16 Aug 2026 06:09:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=35.83.148.184 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786860561; cv=none; b=MaraZ4xUdUh5uvgR5zYQXjNgaWx7HXPeB9EUwKDhMeR8MAzDSZPSMBwzKZUTmyALm8gP2cB1sC5Lj78l2nAnkxPYg0RJyH8fgQMvLRxabbAa12J2IEUuEV1X+7jW6lAtsSyOsFAYrk4ZO3kRHXJLUZxlYeh0D0lv3hgqbN9884Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786860561; c=relaxed/simple; bh=dJ68QbooWHZBKQDn5xlKP/a7N1o1WPC7m/Nz/t4kin4=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=J0w/nRXAo6D3/HkgnHzhL60NSxcm4T9aiLN4DDeH9awvVGKMgUn5cB8Uzxg0MNddFNBxoxFsRI8wdnS78BUEb+5hQegFRCjjdgUBpo4mt1UnzKQGJ/E18+V6G/R8u6LzTE08iBKF8YAIxgyjam8npPLNlyE9/gOY3G/QpoZVYe4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com; spf=pass smtp.mailfrom=amazon.com; dkim=pass (2048-bit key) header.d=amazon.com header.i=@amazon.com header.b=sWpe8zWS; arc=none smtp.client-ip=35.83.148.184 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amazon.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=amazon.com header.i=@amazon.com header.b="sWpe8zWS" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazoncorp2; t=1786860560; x=1818396560; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=1PjrX0TYQgXkSpJZuPaWlzS4502XZn4rTZl60p1SQXk=; b=sWpe8zWSbEq56ev69QcObSdu5UVjFexOuYfO9Py2fMbT9XRKrhnjKQle APtHWAywDKVU+u4vrAl9oPfFJFyuZy5UNsdGkztLeq/xMfAzos5qXKYUT eK0mQGbbEKmkCSb1PN7Y6mxV1T2h99ED0LHXPwMdyauA1+E+gzAVtzxR1 36r+Jt6ga3mChTDLVeH0JWx2MnTXzi8cHmGPHHVizSzJmpuQQVJA7kRCq RKuCcBx+rle01jjulSOy9i7vbFy6J/QxDG+GGBTe/Ne6hTjMy71ScDX5Q LO85+94Fcf9BV5sTRb4e30u0ljAFNZkMX156C20+hm7O/JziltoNOkj7l g==; X-CSE-ConnectionGUID: zBwooBneTzmajzsATjRFFA== X-CSE-MsgGUID: n9OZJxeVTTmMsYFsrooapQ== X-IronPort-AV: E=Sophos;i="6.25,226,1779148800"; d="scan'208";a="25877454" Received: from ip-10-5-9-48.us-west-2.compute.internal (HELO smtpout.naws.us-west-2.prod.farcaster.email.amazon.dev) ([10.5.9.48]) by internal-pdx-out-014.esa.us-west-2.outbound.mail-perimeter.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2026 06:09:19 +0000 Received: from EX19MTAUWA002.ant.amazon.com [205.251.233.234:21019] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.12.154:2525] with esmtp (Farcaster) id 2206ea0c-d638-4fc5-b838-c3e6de24189b; Sun, 16 Aug 2026 06:09:19 +0000 (UTC) X-Farcaster-Flow-ID: 2206ea0c-d638-4fc5-b838-c3e6de24189b Received: from EX19D001UWA001.ant.amazon.com (10.13.138.214) by EX19MTAUWA002.ant.amazon.com (10.250.64.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.45; Sun, 16 Aug 2026 06:09:19 +0000 Received: from dev-dsk-farbere-1a-46ecabed.eu-west-1.amazon.com (172.19.116.181) by EX19D001UWA001.ant.amazon.com (10.13.138.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.45; Sun, 16 Aug 2026 06:09:13 +0000 From: Eliav Farber To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v5 13/13] reboot: use devm_blocking_notifier_chain_register() Date: Sun, 16 Aug 2026 06:06:12 +0000 Message-ID: <20260816060648.4030-14-farbere@amazon.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260816060648.4030-1-farbere@amazon.com> References: <20260816060648.4030-1-farbere@amazon.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 X-ClientProxiedBy: EX19D033UWC002.ant.amazon.com (10.13.139.196) To EX19D001UWA001.ant.amazon.com (10.13.138.214) Content-Type: text/plain; charset="utf-8" Replace the manual devres_alloc() + register_reboot_notifier() pattern with a single call to devm_blocking_notifier_chain_register(), removing the devm_unregister_reboot_notifier() callback. Signed-off-by: Eliav Farber --- Changes in v3: - Fix commit message to accurately describe the old code as using devres_alloc() + register_reboot_notifier() (Sashiko) kernel/reboot.c | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/kernel/reboot.c b/kernel/reboot.c index 695c33e75efd..557609419989 100644 --- a/kernel/reboot.c +++ b/kernel/reboot.c @@ -136,30 +136,10 @@ int unregister_reboot_notifier(struct notifier_block = *nb) } EXPORT_SYMBOL(unregister_reboot_notifier); =20 -static void devm_unregister_reboot_notifier(struct device *dev, void *res) -{ - WARN_ON(unregister_reboot_notifier(*(struct notifier_block **)res)); -} - int devm_register_reboot_notifier(struct device *dev, struct notifier_bloc= k *nb) { - struct notifier_block **rcnb; - int ret; - - rcnb =3D devres_alloc(devm_unregister_reboot_notifier, - sizeof(*rcnb), GFP_KERNEL); - if (!rcnb) - return -ENOMEM; - - ret =3D register_reboot_notifier(nb); - if (!ret) { - *rcnb =3D nb; - devres_add(dev, rcnb); - } else { - devres_free(rcnb); - } - - return ret; + return devm_blocking_notifier_chain_register(dev, + &reboot_notifier_list, nb); } EXPORT_SYMBOL(devm_register_reboot_notifier); =20 --=20 2.47.3