From patchwork Wed Jul 6 07:46:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12907464 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 20F5AC43334 for ; Wed, 6 Jul 2022 07:45:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=u3zOp3n3VSspNUcV+Gvrlf1sE8lzTlukMghUipKULmE=; b=jIrf/LjoScgSMw kbii5/DQNDLaqtIoJhD3BGRIGjAg/8JvdCg9I+Uzf1MXpd5IsrJTY3Zaqi1GTf2niMvcdKwzGwnZC VJWXaAGWUQSrJfhNVEr9UQ7FVBXeGIWuQbHQOE5brJ4L8ZqQFY5ne7bXVFz/FBqUmDUqna70QInKs 8/fqfsXNICCxsV4eVQjIL+hLt0N84RyW4ePOVM3P5bZXmwcHko9vCHKo88W6ee4p6T7G0MWwAVn+j eUMnmeWDTr8oeFMefvx5nr+mfXA++znQDDmzy9lAU82iXmM0bGmKYJuPQ5B6Lzh+RakBeXm1Z1+QB NLyfwNHiutyFahYdAiPw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8zhs-007AON-Rw; Wed, 06 Jul 2022 07:44:20 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8zho-007ALp-TY for linux-arm-kernel@lists.infradead.org; Wed, 06 Jul 2022 07:44:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1657093456; x=1688629456; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=RFYssEOqQQ+BQQUBnZ5+qyOVdKd7T65+VE37vRgnlK4=; b=efp1RE+qllM0rFO5vlL6pC/qmB3vIKD2rXILHh+s52bbD3SGkhejPdGE 6A8mZ46weXp1BI4sSY0vFs3fVoHdhVSiAyRQjv6B1I7tk1V/Z3zcFqst5 8bg9vMy2Im4bxJC7gr2M0N3Gl2urQoAaaSz5u4EmlJ0EcCUfGAqNd4hqU 4HhacxmK5t0GJDY4c7kfIzy8xC5CXey8ZYLKKT6qE679Xaes6XGNBtfiS YcpwxPJaEPoap0FOEQ1JbvjBhrJIPqrHbNDoWtC+1q1cIzJFb04XOgEsb 4c2awVyZClby8VtJNTr+sH6ECKKumPdswd0Qm4I34UseotSIG6aG4zh3M A==; X-IronPort-AV: E=Sophos;i="5.92,249,1650956400"; d="scan'208";a="166576966" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 06 Jul 2022 00:44:10 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Wed, 6 Jul 2022 00:44:10 -0700 Received: from localhost.localdomain (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Wed, 6 Jul 2022 00:44:08 -0700 From: Claudiu Beznea To: , , , CC: , , Claudiu Beznea Subject: [PATCH 2/2] irqchip/atmel-aic5: remove #ifdef CONFIG_PM Date: Wed, 6 Jul 2022 10:46:30 +0300 Message-ID: <20220706074630.829607-2-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220706074630.829607-1-claudiu.beznea@microchip.com> References: <20220706074630.829607-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220706_004417_053595_F5CCAA00 X-CRM114-Status: GOOD ( 11.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Remove #ifdef CONFIG_PM around aic5_suspend() function and from aic5_hw_init() function. Coding style recommends (at chapter Conditional Compilation) to avoid using preprocessor conditional in .c files. gc->chip_types->chip.irq_suspend()/gc->chip_types->chip.irq_resume() is called in irq_gc_suspend()/irq_gc_resume() which is NULL in case CONFIG_PM is not defined. With this gc->chip_types->chip.irq_pm_shutdown is populated all the time as it should be as irq_gc_shutdown() is not conditioned by CONFIG_PM. Signed-off-by: Claudiu Beznea --- drivers/irqchip/irq-atmel-aic5.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/irqchip/irq-atmel-aic5.c b/drivers/irqchip/irq-atmel-aic5.c index 145535bd7560..890df0cf57d6 100644 --- a/drivers/irqchip/irq-atmel-aic5.c +++ b/drivers/irqchip/irq-atmel-aic5.c @@ -149,7 +149,6 @@ static int aic5_set_type(struct irq_data *d, unsigned type) return ret; } -#ifdef CONFIG_PM static u32 *smr_cache; static void aic5_suspend(struct irq_data *d) @@ -234,11 +233,6 @@ static void aic5_pm_shutdown(struct irq_data *d) } irq_gc_unlock(bgc); } -#else -#define aic5_suspend NULL -#define aic5_resume NULL -#define aic5_pm_shutdown NULL -#endif /* CONFIG_PM */ static void __init aic5_hw_init(struct irq_domain *domain) { @@ -369,12 +363,10 @@ static int __init aic5_of_init(struct device_node *node, static int __init sama5d2_aic5_of_init(struct device_node *node, struct device_node *parent) { -#ifdef CONFIG_PM smr_cache = kcalloc(DIV_ROUND_UP(NR_SAMA5D2_IRQS, 32) * 32, sizeof(*smr_cache), GFP_KERNEL); if (!smr_cache) return -ENOMEM; -#endif return aic5_of_init(node, parent, NR_SAMA5D2_IRQS); }