From patchwork Wed Jul 6 07:46:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12907465 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 4A4C6C433EF 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: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:In-Reply-To:References: List-Owner; bh=mtqyvFdosIplr9YhGMrok7MrxDlYRQHTAUCdnS4SxoI=; b=N/4dR88tAoWJTV XMtan5jBxfh/ETBFm61m4i45mgVLqAZMzWmuIoMLT5+P76ASppR07MzLTdU7YC0Umg9qpaRP6NYdR qdw2lCJjq/RNHKbmFgW57kfVIAddlsM4RnyXU34mvcpKzoL9LRPDM2KxTpf0vQQre53zKjx+T57cK rGI1drElj6VS4fS8mXee9K2RqiZGUHYkCaCRNzMW66AiMjHcOeHw7kfW2ONPqQZvOY5IOOH+YbVHn rsyt1pNfN512CW15ByfqPEpn2nQiJ+hclPchw94+kJD9nFPrL90pHn25PsMSepOxU05jpc/6vttYz qfIkj/1RFcODMcNE7qFQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8zhj-007ALR-Is; Wed, 06 Jul 2022 07:44:11 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8zhh-007AKR-01 for linux-arm-kernel@lists.infradead.org; Wed, 06 Jul 2022 07:44:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1657093448; x=1688629448; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=qKkHo7U93i0xJGO/erKhvmEQKF0npn2IZsa8m4BvJe4=; b=nParLiFyuWaSr2TKP9Z9+49/+tEEZe5iepOJKvqLZFdCkxM+2NKTBWYQ GfGvbghU3ox13GiS2oWVBC5MYRzjPnXB6LPa1H45oocqE6Ce2UqxgM3NM vF+7f3rxxbYBcPstqTUt8NbZQZy9VyQBr4lQ5prxoCKXxu8LkQdRJMvjp pJysfeajchovaueKwc1amZl0lJiLvpPf7gUHd6CvfA3oZ72aaIqrfHS+T iE4NDX2sQbVTaM3YEoDX+mpbKKTTLMS8IUdGIFwAR6mD8c0LgXAI5StfB R8SfiY3qiQo0/Ywuq8tlCu8ACDnNqsB7BITlwzlDiyEpRLzOr85beyF8g g==; X-IronPort-AV: E=Sophos;i="5.92,249,1650956400"; d="scan'208";a="171229271" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 06 Jul 2022 00:44:08 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex01.mchp-main.com (10.10.85.143) 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:07 -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:05 -0700 From: Claudiu Beznea To: , , , CC: , , Claudiu Beznea Subject: [PATCH 1/2] irqchip/atmel-aic: remove #ifdef CONFIG_PM Date: Wed, 6 Jul 2022 10:46:29 +0300 Message-ID: <20220706074630.829607-1-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220706_004409_079633_3EBB5EA8 X-CRM114-Status: GOOD ( 10.24 ) 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 aic_suspend() 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-aic.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/irqchip/irq-atmel-aic.c b/drivers/irqchip/irq-atmel-aic.c index 4631f6847953..02a9f45a7d2e 100644 --- a/drivers/irqchip/irq-atmel-aic.c +++ b/drivers/irqchip/irq-atmel-aic.c @@ -102,7 +102,6 @@ static int aic_set_type(struct irq_data *d, unsigned type) return 0; } -#ifdef CONFIG_PM static void aic_suspend(struct irq_data *d) { struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d); @@ -132,11 +131,6 @@ static void aic_pm_shutdown(struct irq_data *d) irq_reg_writel(gc, 0xffffffff, AT91_AIC_ICCR); irq_gc_unlock(gc); } -#else -#define aic_suspend NULL -#define aic_resume NULL -#define aic_pm_shutdown NULL -#endif /* CONFIG_PM */ static void __init aic_hw_init(struct irq_domain *domain) {