From patchwork Mon Aug 10 09:51:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 52145 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by patches.linaro.org (Postfix) with ESMTPS id 5B2A62152A for ; Mon, 10 Aug 2015 09:53:55 +0000 (UTC) Received: by lbck9 with SMTP id k9sf8341448lbc.0 for ; Mon, 10 Aug 2015 02:53:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=LdH5tNsWTQzSAtN5yMp0ZnmcWAPx1Rrjaid0Fxo7X6w=; b=etarwPYV7nHUYtm5JYLtO1Nrc10pbNZJo16UDgKavBnSTdplCxXUwkbc7cDDz6cdxU k82TjcInkavZxXmrUEFo4GWv+tnIkU5Q88484/ED4pp8j1AI00Tys8uUQQlVTyhc6qaN Gpb2OJSIVu94DI5vyjI/doL82+XiZzv4WJ4t1zjK42kQEjmmMhuy+aAAKNoGp5WwpPFJ kRDAgCxu0oJZGdh5ezra+6H5F2ayv5sf4LuSFd0NGck4K8NLJPT+qNjJrwn8XesoWqXU muH00nRKDpb8zIAKgaKmaY6beKJ4JIRifcp6qyMFTPi7RZiN43c7e3/DC0joX9Px5Ddt Iw8w== X-Gm-Message-State: ALoCoQlwOxuQNpGTTo5MyyugLJphSS/3IWeXphPW0PEA7B71gfdaaIA87+SN4S9Wz31AAGI/OtNY X-Received: by 10.194.188.104 with SMTP id fz8mr6080519wjc.1.1439200434384; Mon, 10 Aug 2015 02:53:54 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.185.67 with SMTP id fa3ls664223lac.76.gmail; Mon, 10 Aug 2015 02:53:54 -0700 (PDT) X-Received: by 10.152.27.10 with SMTP id p10mr3875107lag.89.1439200434178; Mon, 10 Aug 2015 02:53:54 -0700 (PDT) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com. [209.85.215.46]) by mx.google.com with ESMTPS id u9si13741913lbw.89.2015.08.10.02.53.54 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Aug 2015 02:53:54 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) client-ip=209.85.215.46; Received: by labd1 with SMTP id d1so37059119lab.1 for ; Mon, 10 Aug 2015 02:53:54 -0700 (PDT) X-Received: by 10.112.140.68 with SMTP id re4mr19348316lbb.72.1439200434027; Mon, 10 Aug 2015 02:53:54 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.7.198 with SMTP id l6csp1827390lba; Mon, 10 Aug 2015 02:53:53 -0700 (PDT) X-Received: by 10.66.102.71 with SMTP id fm7mr42313198pab.5.1439200428547; Mon, 10 Aug 2015 02:53:48 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id tk2si32341517pac.116.2015.08.10.02.53.47; Mon, 10 Aug 2015 02:53:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932858AbbHJJxl (ORCPT + 28 others); Mon, 10 Aug 2015 05:53:41 -0400 Received: from mail-wi0-f173.google.com ([209.85.212.173]:38897 "EHLO mail-wi0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932787AbbHJJxh (ORCPT ); Mon, 10 Aug 2015 05:53:37 -0400 Received: by wicja10 with SMTP id ja10so17895377wic.1 for ; Mon, 10 Aug 2015 02:53:36 -0700 (PDT) X-Received: by 10.194.118.197 with SMTP id ko5mr42110646wjb.58.1439200416138; Mon, 10 Aug 2015 02:53:36 -0700 (PDT) Received: from localhost.localdomain (sju31-1-78-210-255-2.fbx.proxad.net. [78.210.255.2]) by smtp.gmail.com with ESMTPSA id jr5sm28598154wjc.14.2015.08.10.02.53.34 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 10 Aug 2015 02:53:35 -0700 (PDT) From: Daniel Lezcano To: mingo@kernel.org Cc: tglx@linutronix.de, linux-kernel@vger.kernel.org, Alexey Klimov , Stephen Boyd , Kukjin Kim , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org (moderated list:ARM/SAMSUNG EXYNO...), linux-samsung-soc@vger.kernel.org (moderated list:ARM/SAMSUNG EXYNO...) Subject: [PATCH 08/74] clockevents/drivers/exynos_mct: Remove unneeded container_of() Date: Mon, 10 Aug 2015 11:51:25 +0200 Message-Id: <1439200352-26767-8-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1439200352-26767-1-git-send-email-daniel.lezcano@linaro.org> References: <55C87382.4070309@linaro.org> <1439200352-26767-1-git-send-email-daniel.lezcano@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: daniel.lezcano@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Alexey Klimov 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 Signed-off-by: Daniel Lezcano Reviewed-by: Krzysztof Kozlowski --- 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 9064ff7..4d2330a 100644 --- a/drivers/clocksource/exynos_mct.c +++ b/drivers/clocksource/exynos_mct.c @@ -442,13 +442,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); @@ -477,8 +475,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) { if (evt->irq != -1) @@ -500,11 +500,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; } @@ -570,7 +570,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: