From patchwork Wed Dec 28 12:24:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cixi Geng X-Patchwork-Id: 637714 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 98AC9C4167B for ; Wed, 28 Dec 2022 12:32:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230398AbiL1Mct (ORCPT ); Wed, 28 Dec 2022 07:32:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232542AbiL1MZC (ORCPT ); Wed, 28 Dec 2022 07:25:02 -0500 Received: from out2.migadu.com (out2.migadu.com [188.165.223.204]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3BB42BA; Wed, 28 Dec 2022 04:25:00 -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=1672230298; 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=TMV4Qv2vawvIPldNlgCxLwC6ooI0ZTG3WDHvdQQQ+So=; b=eWtODONXkCdzYOiH9EFWtX5QkId0udUHns9htOGytFKvpZjydl+FDR/QIr+WRKwGZqx1lt eFTU6cYt72pKUGbu/xwNraGUsP1ZjhZRe7TATXNu+bTQTMujzrL5MYrMBWzlNhbctAhvum wUFotRJlONem/dDVjh95TYV0XiIIOis= 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 V3 0/3] Make the irqchip immutable Date: Wed, 28 Dec 2022 20:24:39 +0800 Message-Id: <20221228122442.392504-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]. [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