From mboxrd@z Thu Jan 1 00:00:00 1970 From: tglx@linutronix.de (Thomas Gleixner) Date: Fri, 28 Aug 2015 21:11:26 +0200 (CEST) Subject: [PATCH v2 1/1] irqchip: imx-gpcv2: Simplify the implementation In-Reply-To: <1440617755-2942-1-git-send-email-shenwei.wang@freescale.com> References: <1440617755-2942-1-git-send-email-shenwei.wang@freescale.com> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Wed, 26 Aug 2015, Shenwei Wang wrote: > u32 imx_gpcv2_get_wakeup_source(u32 **sources) > { > - if (!imx_gpcv2_instance) > + 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->wakeup_sources[i] = readl_relaxed(reg); > + } > + > if (sources) > - *sources = imx_gpcv2_instance->wakeup_sources; > + *sources = cd->wakeup_sources; > > return IMR_NUM; > } So once again. As you said before nothing is going to use the case where source == NULL, can we please get rid of it? Thanks, tglx