From patchwork Thu Dec 29 14:55:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cixi Geng X-Patchwork-Id: 637706 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 174A0C4332F for ; Thu, 29 Dec 2022 14:56:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230423AbiL2O4i (ORCPT ); Thu, 29 Dec 2022 09:56:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233598AbiL2O4R (ORCPT ); Thu, 29 Dec 2022 09:56:17 -0500 Received: from out-136.mta0.migadu.com (out-136.mta0.migadu.com [IPv6:2001:41d0:1004:224b::88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9BECE5D for ; Thu, 29 Dec 2022 06:56:15 -0800 (PST) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1672325771; 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=bLYw8OpQUwlsZ3K6VZBKjvnvbyH21lb8PABr6jPPy3M=; b=A2hSB6FIyTOMx28XeYgGgla6Dba07pxyFDx2kue17026UbQ0iHegnJXkQG0f+3LEVBrsBN zUFYW55gUpIjFLCIjVZdHj6jKjXWbVfrBgfvEsAB6sdBkVvs++EasCvZcgBFtcnRgSsb84 r3Dq6xZ2TOUDnA9wVujkgLabLPfTjng= From: Cixi Geng To: linus.walleij@linaro.org, brgl@bgdev.pl, orsonzhai@gmail.com, baolin.wang@linux.alibaba.com, zhang.lyra@gmail.com Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, cixi.geng1@unisoc.com Subject: [PATCH V4 0/3] Make the irqchip immutable Date: Thu, 29 Dec 2022 22:55:42 +0800 Message-Id: <20221229145545.14055-1-cixi.geng@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org From: Cixi Geng Kernel warns about mutable irq_chips: "not an immutable chip, please consider fixing!" Make the struct irq_chip const, flag it as IRQCHIP_IMMUTABLE, add the new helper functions, and call the appropriate gpiolib functions. v2 changes: Split the patch by each driver. and other comment by baolin in[1] v3 changes: Fix cocci warnings test by lkp[2]. v4 changes: Change the irq name. Keep the same coding style by using offset for irqd_to_hwirq(data) Add Reviewed-by tag. [1]:https://lore.kernel.org/all/97e244d4-6b5c-31c9-7329-b8deef615645@linux.alibaba.com/ [2]:https://lore.kernel.org/all/202212240406.9Nm190P8-lkp@intel.com/ Cixi Geng (3): gpio: eic-sprd: Make the irqchip immutable gpio: gpio-pmic-eic-sprd: Make the irqchip immutable gpio: gpio-sprd: Make the irqchip immutable drivers/gpio/gpio-eic-sprd.c | 23 ++++++++++++++--------- drivers/gpio/gpio-pmic-eic-sprd.c | 29 ++++++++++++++++++----------- drivers/gpio/gpio-sprd.c | 9 ++++++--- 3 files changed, 38 insertions(+), 23 deletions(-) base-commit: 1b929c02afd37871d5afb9d498426f83432e71c2