From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753499AbbFVAEW (ORCPT ); Sun, 21 Jun 2015 20:04:22 -0400 Received: from mailout3.w1.samsung.com ([210.118.77.13]:10028 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752277AbbFVAEN (ORCPT ); Sun, 21 Jun 2015 20:04:13 -0400 X-AuditID: cbfec7f4-f79c56d0000012ee-ab-558750fad81b Message-id: <558750F6.8020507@samsung.com> Date: Mon, 22 Jun 2015 09:04:06 +0900 From: Krzysztof Kozlowski User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-version: 1.0 To: Alexey Klimov , linux-samsung-soc@vger.kernel.org Cc: sboyd@codeaurora.org, t.dakhran@gmail.com, kgene@kernel.org, Daniel Lezcano , Thomas Gleixner , linux-kernel@vger.kernel.org Subject: Re: [PATCH] clocksource: exynos_mct: remove unneeded container_of() References: <1434322238.5390.16.camel@mtux> <1434919299.4096.1.camel@mtux> In-reply-to: <1434919299.4096.1.camel@mtux> Content-type: text/plain; charset=utf-8 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrDLMWRmVeSWpSXmKPExsVy+t/xK7q/AtpDDeavYrGY91nW4vULQ4v+ x6+ZLU6df8hicXnXHDaLGef3MVn8ONPNYvG75xOzxeZNU5kdOD0u9/UyeeycdZfdY9OqTjaP O9f2sHm8O3eO3aNvyypGj8+b5ALYo7hsUlJzMstSi/TtErgyFq41KZgiVrH312e2BsaNQl2M nBwSAiYS389vYYGwxSQu3FvP1sXIxSEksJRR4t5ZGOcpo0T/hdOsIFW8AloS9489ZAaxWQRU JSbeaAPrZhMwlti8fAkbiC0qECHx9vJJJoh6QYkfk++B1YgI+Erc2LaeHWQos8BmRone1dfB GoQFfCROrvvPCGILCXhJHJ5wG2wBp4C2xPtJZ4AGcQA1qEtMmZILEmYWkJfYvOYt8wRGgVlI VsxCqJqFpGoBI/MqRtHU0uSC4qT0XEO94sTc4tK8dL3k/NxNjJA4+LKDcfExq0OMAhyMSjy8 DrbtoUKsiWXFlbmHGCU4mJVEeFk4gEK8KYmVValF+fFFpTmpxYcYpTlYlMR55+56HyIkkJ5Y kpqdmlqQWgSTZeLglGpgzOKy7Kn+6+B5+DpDtcr1RonKuynB+RuFy3SPNZxNCNI+te7wncpN metP6vNMTjrKW/dreaZGcVHzjDqhgpzKNTcMTiS+E5ryo8BxYeEyI9HLM6p9a+/Ntdk3m9/N WzOs/tG0XY8dlmqK7Iw+u6r3SbjZnj7Z4m2ffJSdP7yZwTqto1drl1y+EktxRqKhFnNRcSIA 0DgO238CAAA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22.06.2015 05:41, Alexey Klimov wrote: > Patch removes unneeded container_of() macro > in exynos4_local_timer_setup(). Instead let's pass mevt pointer > to setup and stop functions from exynos4_mct_cpu_notify() > and let them get evt pointer. > > Tested on odroid-xu3. > > Signed-off-by: Alexey Klimov > Acked-by: Stephen Boyd Looks good, the internal interface now seems more consistent. Reviewed-by: Krzysztof Kozlowski However you forgot to mail this to maintainers of clocksource subsystem (Cc'ed: Daniel, Thomas, LKML). Best regards, Krzysztof > --- > drivers/clocksource/exynos_mct.c | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > > diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c > index 83564c9..752a37c 100644 > --- a/drivers/clocksource/exynos_mct.c > +++ b/drivers/clocksource/exynos_mct.c > @@ -446,13 +446,11 @@ static irqreturn_t exynos4_mct_tick_isr(int irq, void *dev_id) > return IRQ_HANDLED; > } > > -static int exynos4_local_timer_setup(struct clock_event_device *evt) > +static int exynos4_local_timer_setup(struct mct_clock_event_device *mevt) > { > - struct mct_clock_event_device *mevt; > + struct clock_event_device *evt = &mevt->evt; > unsigned int cpu = smp_processor_id(); > > - mevt = container_of(evt, struct mct_clock_event_device, evt); > - > mevt->base = EXYNOS4_MCT_L_BASE(cpu); > snprintf(mevt->name, sizeof(mevt->name), "mct_tick%d", cpu); > > @@ -484,8 +482,10 @@ static int exynos4_local_timer_setup(struct clock_event_device *evt) > return 0; > } > > -static void exynos4_local_timer_stop(struct clock_event_device *evt) > +static void exynos4_local_timer_stop(struct mct_clock_event_device *mevt) > { > + struct clock_event_device *evt = &mevt->evt; > + > evt->set_mode(CLOCK_EVT_MODE_UNUSED, evt); > if (mct_int_type == MCT_INT_SPI) > free_irq(evt->irq, this_cpu_ptr(&percpu_mct_tick)); > @@ -505,11 +505,11 @@ static int exynos4_mct_cpu_notify(struct notifier_block *self, > switch (action & ~CPU_TASKS_FROZEN) { > case CPU_STARTING: > mevt = this_cpu_ptr(&percpu_mct_tick); > - exynos4_local_timer_setup(&mevt->evt); > + exynos4_local_timer_setup(mevt); > break; > case CPU_DYING: > mevt = this_cpu_ptr(&percpu_mct_tick); > - exynos4_local_timer_stop(&mevt->evt); > + exynos4_local_timer_stop(mevt); > break; > } > > @@ -557,7 +557,7 @@ static void __init exynos4_timer_resources(struct device_node *np, void __iomem > goto out_irq; > > /* Immediately configure the timer on the boot CPU */ > - exynos4_local_timer_setup(&mevt->evt); > + exynos4_local_timer_setup(mevt); > return; > > out_irq: > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FAQ at http://www.tux.org/lkml/