From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754277AbeEWHXH (ORCPT ); Wed, 23 May 2018 03:23:07 -0400 Received: from foss.arm.com ([217.140.101.70]:49416 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753985AbeEWHXB (ORCPT ); Wed, 23 May 2018 03:23:01 -0400 Date: Wed, 23 May 2018 08:22:54 +0100 Message-ID: <86fu2ibzu9.wl-marc.zyngier@arm.com> From: Marc Zyngier To: Anson Huang Cc: , , , Subject: Re: [PATCH] irqchip: gpcv2: remove unnecessary functions In-Reply-To: <1527056580-8791-1-git-send-email-Anson.Huang@nxp.com> References: <1527056580-8791-1-git-send-email-Anson.Huang@nxp.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/25.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Organization: ARM Ltd MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 23 May 2018 07:23:00 +0100, Anson Huang wrote: > > GPC is in always-on domain, it never lost its > content during suspend/resume, so no need to > do save/restore for it during suspend/resume. > > Signed-off-by: Anson Huang > --- > drivers/irqchip/irq-imx-gpcv2.c | 41 ----------------------------------------- > 1 file changed, 41 deletions(-) > > diff --git a/drivers/irqchip/irq-imx-gpcv2.c b/drivers/irqchip/irq-imx-gpcv2.c > index 4760307..e6025d9 100644 > --- a/drivers/irqchip/irq-imx-gpcv2.c > +++ b/drivers/irqchip/irq-imx-gpcv2.c > @@ -28,46 +28,6 @@ struct gpcv2_irqchip_data { > > static struct gpcv2_irqchip_data *imx_gpcv2_instance; > > -static int gpcv2_wakeup_source_save(void) > -{ > - struct gpcv2_irqchip_data *cd; > - void __iomem *reg; > - int i; > - > - cd = imx_gpcv2_instance; > - if (!cd) > - return 0; > - > - for (i = 0; i < IMR_NUM; i++) { > - reg = cd->gpc_base + cd->cpu2wakeup + i * 4; > - cd->saved_irq_mask[i] = readl_relaxed(reg); > - writel_relaxed(cd->wakeup_sources[i], reg); > - } If you're removing that code, what's the purpose of keeping saved_irq_mask? Also, who is now programming the wake-up_source? For good or bad reasons, this drivers uses the save/restore hooks to program the wake-up state. Removing this code seem to simply kill the feature. What am I missing? Thanks, M. -- Jazz is not dead, it just smell funny.