From nobody Sat May 10 22:43:59 2025 Delivered-To: importer2@patchew.org Received-SPF: pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; envelope-from=linux-kernel-owner@vger.kernel.org; helo=vger.kernel.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1610961693; cv=none; d=zohomail.com; s=zohoarc; b=KoFGBHMqSwBr0RDgHPI416lagURGt2NfjkzSSHmJWXlCFiuDvFDp9JVuQPgGPf0vZDAypOV5BUiGkiJOjDI+FhGSU4xhdRzyDfZUbj40xhrgz9zd7qj9UYkXtZp/0Jw7Qe+w/sWJ732u0zNw4ovbGY49yqXGnR0YrpFcCv2lBv0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610961693; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:MIME-Version:Message-ID:References:Subject:To; bh=eae+71nwdCl87dQPfVh8jK749vbX5rWsf1eR+dT00F0=; b=dR7dXjHsrpLSyDLVtZNwOMPE1Co/ggzAR/DlUfdUTy9CjUuLmvYKLFX5UMC1V/H3GFD/T2diEZYeQT3uJ1NTDeJ8/e6DkN7Q3PHqwCOlo0e+kKv6q1DPFjXy3vprRzBpkvVf1BOEBgZoWcCHpE8DK4T5xOBjBGar77WRODbGLiQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mx.zohomail.com with SMTP id 1610961693495515.3455594983916; Mon, 18 Jan 2021 01:21:33 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388499AbhARJQg (ORCPT ); Mon, 18 Jan 2021 04:16:36 -0500 Received: from forward103p.mail.yandex.net ([77.88.28.106]:40335 "EHLO forward103p.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388277AbhARJH1 (ORCPT ); Mon, 18 Jan 2021 04:07:27 -0500 Received: from myt6-5578c6b2b9c3.qloud-c.yandex.net (myt6-5578c6b2b9c3.qloud-c.yandex.net [IPv6:2a02:6b8:c12:37a8:0:640:5578:c6b2]) by forward103p.mail.yandex.net (Yandex) with ESMTP id 8A37F18C17B1; Mon, 18 Jan 2021 12:05:22 +0300 (MSK) Received: from myt6-9bdf92ffd111.qloud-c.yandex.net (myt6-9bdf92ffd111.qloud-c.yandex.net [2a02:6b8:c12:468a:0:640:9bdf:92ff]) by myt6-5578c6b2b9c3.qloud-c.yandex.net (mxback/Yandex) with ESMTP id dLSFXTknEI-5MDO4bZ5; Mon, 18 Jan 2021 12:05:22 +0300 Received: by myt6-9bdf92ffd111.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id mPweMU6MOS-5LIeMc8N; Mon, 18 Jan 2021 12:05:21 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maquefel.me; s=mail; t=1610960722; bh=eae+71nwdCl87dQPfVh8jK749vbX5rWsf1eR+dT00F0=; h=In-Reply-To:References:Date:Subject:To:From:Message-Id:Cc; b=p2LDhD9WmMAGk9IAIwWMUC73UpO78OT1UkOm6yWt+eFHRUNBmyIj/wHhmqtRxKoW1 Zd9ll/JSQEsieEzp+/FgZq69gZ41+AA9fB5PrPKQZxEjkBy/C8kwAXwgCbTPVXWMeP 4HK9TLwpufKDgQLlB0+cMBJSSzo6eNM5Yv/So8UI= Authentication-Results: myt6-5578c6b2b9c3.qloud-c.yandex.net; dkim=pass header.i=@maquefel.me From: Nikita Shubin Cc: Nikita Shubin , Linus Walleij , Bartosz Golaszewski , Grygorii Strashko , Thierry Reding , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] gpiolib: warning on gpiochip->to_irq defined Date: Mon, 18 Jan 2021 12:05:08 +0300 Message-Id: <20210118090508.21686-1-nikita.shubin@maquefel.me> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228150052.2633-1-nikita.shubin@maquefel.me> References: <20201228150052.2633-1-nikita.shubin@maquefel.me> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" gpiochip->to_irq method is redefined in gpiochip_add_irqchip. A lot of gpiod driver's still define ->to_irq method, let's give a gentle warning that they can no longer rely on it, so they can remove it on ocassion. Fixes: e0d8972898139 ("gpio: Implement tighter IRQ chip integration") Signed-off-by: Nikita Shubin --- v1->v2: - Change chip_err to chip_warn --- drivers/gpio/gpiolib.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 5ce0c14c637b..5a9410c2537d 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -1489,6 +1489,9 @@ static int gpiochip_add_irqchip(struct gpio_chip *gc, type =3D IRQ_TYPE_NONE; } =20 + if (gc->to_irq) + chip_warn(gc, "to_irq is redefined in %s and you shouldn't rely on it\n"= , __func__); + gc->to_irq =3D gpiochip_to_irq; gc->irq.default_type =3D type; gc->irq.lock_key =3D lock_key; --=20 2.29.2