Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2586651imw; Wed, 6 Jul 2022 08:24:59 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tD2GhufE2JQM0qI7m8+5rIUouziS8MG8Tv7xhbg4MqEv8/UHTMqCZVRVjCjg8PD1R62pZE X-Received: by 2002:a17:902:ce85:b0:16a:3db5:5966 with SMTP id f5-20020a170902ce8500b0016a3db55966mr47963073plg.79.1657121099652; Wed, 06 Jul 2022 08:24:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657121099; cv=none; d=google.com; s=arc-20160816; b=Cq2uc0rVWuxo64FDX83yboXesSafR0kjNv2yI+kV/TrBlDnVYIUhXb+G43JF9Zbv+H pehEYQQwMAgsgx8IYrO15IrOHn0I3bczbkPdRwQ9GUVOpqldqZ49ksnu22tq7qxRQT9Y kE7HmZT/U6L8jqpXPv84AVd0D+k580AaU+aDudzCzKsud0/kwZJHFsNW7GruDlYdFJjz 3POijuwzexb6lL6dWNKfn9O0WRd9MaTZRdLHyLwvNuMVOvpsOm/UDnYRuWoRsEbm8IWI 9yXJ44l/W+6n380flEcEaD7d8TEpVaiiO2mpbeooniYzyiXr/GKfw/sJ2MPtUkooHdZd IgUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=AlO8fxYi1tcYG3PxFb6I4+tm+M3TQCtA0dFAdu++K04=; b=pVhJIpSjomqTHQ/n50x5QN1yJjpb+5Xgpd6/6ipoayLhizvp65UDzO4s6ryktsrSAT tBk5DMgTBsZZMSzHJqHh4KV1TqxMwvaffCMBy7bHTIaCOub38W7x4qLSavu2t+rprVVo 9Wj3uXWVmZfpVtYfc1x4KFvHWZnmJHYmnBqRuLpofFiTuECcjZxHUE/QgAvUIxsxXKyo PXSKvH9KSw0J6hiGU7aYb4hWbmzkBwG/S6g0xqMxa2S9TQ9Pp0YQNUvQZ3r/BtrDB0nD JCjhMbRY3zPPSbt18OOYw/FGAGpTPVsCSasZd093LoYT499iYzAvjT8IM3c6PLcrHja1 5NoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b="LQ/Dx3Qx"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e68-20020a636947000000b0040d9ebed1c6si46587506pgc.806.2022.07.06.08.24.47; Wed, 06 Jul 2022 08:24:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b="LQ/Dx3Qx"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233393AbiGFPQO (ORCPT + 99 others); Wed, 6 Jul 2022 11:16:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231552AbiGFPQJ (ORCPT ); Wed, 6 Jul 2022 11:16:09 -0400 Received: from ssl.serverraum.org (ssl.serverraum.org [176.9.125.105]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A28723151; Wed, 6 Jul 2022 08:16:08 -0700 (PDT) Received: from mwalle01.kontron.local. (unknown [213.135.10.150]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 6BD662223A; Wed, 6 Jul 2022 17:16:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1657120565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=AlO8fxYi1tcYG3PxFb6I4+tm+M3TQCtA0dFAdu++K04=; b=LQ/Dx3Qx6igB9fnrGf0DI5PEx38/eHhrJOG/hlwE+hR8svh+D4u7n59GutX2kRQGvITCWx HXwnzOVzK46ug6zMsUOm4wABz9M/s/JOdS1WCOR9Z/XqU4H0doAURob5br/jJWL917dZc6 n+7up2XgIEB3e+LWFccaJfYdeaFcCCg= From: Michael Walle To: Linus Walleij , Marc Zyngier , Thomas Gleixner Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Walle Subject: [PATCH 1/2] genirq: allow irq_set_chip_handler_name_locked() to take a const irq_chip Date: Wed, 6 Jul 2022 17:15:52 +0200 Message-Id: <20220706151553.1580790-1-michael@walle.cc> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Similar to commit 393e1280f765 ("genirq: Allow irq_chip registration functions to take a const irq_chip"), allow the irq_set_chip_handler_name_locked() function to take a const irq_chip argument. Signed-off-by: Michael Walle --- Given this is the correct approach, can this go through the pinctrl tree? Of not, do we need an immutable tag? include/linux/irqdesc.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h index a77584593f7d..1cd4e36890fb 100644 --- a/include/linux/irqdesc.h +++ b/include/linux/irqdesc.h @@ -209,14 +209,15 @@ static inline void irq_set_handler_locked(struct irq_data *data, * Must be called with irq_desc locked and valid parameters. */ static inline void -irq_set_chip_handler_name_locked(struct irq_data *data, struct irq_chip *chip, +irq_set_chip_handler_name_locked(struct irq_data *data, + const struct irq_chip *chip, irq_flow_handler_t handler, const char *name) { struct irq_desc *desc = irq_data_to_desc(data); desc->handle_irq = handler; desc->name = name; - data->chip = chip; + data->chip = (struct irq_chip *)chip; } bool irq_check_status_bit(unsigned int irq, unsigned int bitmask); -- 2.30.2