From patchwork Fri Feb 27 11:51:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 45222 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 ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B98C220674 for ; Fri, 27 Feb 2015 11:53:39 +0000 (UTC) Received: by lbdu10 with SMTP id u10sf14047740lbd.3 for ; Fri, 27 Feb 2015 03:53:38 -0800 (PST) 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: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=z1hEKtYXB6e3y6lPi2SyK0YhOettCBnR40il3trrs6w=; b=bV9SlFtoRkkpsVN01MAwRRufpl3jUL+5WuxQKphp2ek289VKbjOY1iKsa/LggFcFx2 iiVYSX1N/Z0w5JfvdZroG/uN+fF56i9X6LAmZLyW0I6JeneHoi7621nzbUOw2oBvX1du yjW3siN39wByDAkD/Qr3Pg4FLkIOOfGiNQGxXhcvL0BxmqRdeeSUWSUwyKGihUYUVAii k21e7M60/ipSUDHD43ySwGSHBdiuaokaYq3L4IJJDdrH9nhZQjprwP0lTN1oTr53h6en P89+lnOhCCHggqld5HhPPy+1X4PMzL+XDOANUzZ4YVNKqtLkQPDo1tlkqx24XmKm39dW FMEA== X-Gm-Message-State: ALoCoQmy4fLGBaapBs9PWeqLcSkhMbEiE8Bw0HXEM2UJUGhGr6lTLjjP0Bx34J2I7Xk8QTEtbkzb X-Received: by 10.112.40.81 with SMTP id v17mr2005421lbk.5.1425038018366; Fri, 27 Feb 2015 03:53:38 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.21.199 with SMTP id x7ls158088lae.0.gmail; Fri, 27 Feb 2015 03:53:38 -0800 (PST) X-Received: by 10.112.24.235 with SMTP id x11mr12035111lbf.18.1425038018119; Fri, 27 Feb 2015 03:53:38 -0800 (PST) Received: from mail-lb0-f171.google.com (mail-lb0-f171.google.com. [209.85.217.171]) by mx.google.com with ESMTPS id uq7si2762805lbc.60.2015.02.27.03.53.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Feb 2015 03:53:37 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.171 as permitted sender) client-ip=209.85.217.171; Received: by lbvn10 with SMTP id n10so16763438lbv.6 for ; Fri, 27 Feb 2015 03:53:37 -0800 (PST) X-Received: by 10.152.115.136 with SMTP id jo8mr12467504lab.32.1425038017370; Fri, 27 Feb 2015 03:53:37 -0800 (PST) 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.35.133 with SMTP id h5csp3884109lbj; Fri, 27 Feb 2015 03:53:36 -0800 (PST) X-Received: by 10.70.50.10 with SMTP id y10mr23055384pdn.142.1425038015637; Fri, 27 Feb 2015 03:53:35 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id jx12si5114887pad.147.2015.02.27.03.53.33; Fri, 27 Feb 2015 03:53:35 -0800 (PST) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754506AbbB0LxR (ORCPT + 28 others); Fri, 27 Feb 2015 06:53:17 -0500 Received: from mail-pa0-f50.google.com ([209.85.220.50]:34342 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754005AbbB0LxN (ORCPT ); Fri, 27 Feb 2015 06:53:13 -0500 Received: by pabrd3 with SMTP id rd3so22229687pab.1 for ; Fri, 27 Feb 2015 03:53:13 -0800 (PST) X-Received: by 10.70.133.168 with SMTP id pd8mr23214327pdb.122.1425037993087; Fri, 27 Feb 2015 03:53:13 -0800 (PST) Received: from localhost ([122.178.228.114]) by mx.google.com with ESMTPSA id ia9sm3828308pbc.26.2015.02.27.03.53.11 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 27 Feb 2015 03:53:12 -0800 (PST) From: Viresh Kumar To: Thomas Gleixner , Peter Zijlstra , Ingo Molnar Cc: linaro-kernel@lists.linaro.org, Kevin Hilman , Preeti U Murthy , Daniel Lezcano , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Frederic Weisbecker , linaro-networking@linaro.org, Viresh Kumar Subject: [PATCH 3/3] clockevents: Don't validate dev->mode against CLOCK_EVT_MODE_UNUSED for new interface Date: Fri, 27 Feb 2015 17:21:34 +0530 Message-Id: X-Mailer: git-send-email 2.3.0.rc0.44.ga94655d In-Reply-To: References: In-Reply-To: References: 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: viresh.kumar@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.217.171 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: , It was a requirement in the legacy interface that drivers must initialize ->mode field to 'CLOCK_EVT_MODE_UNUSED'. This field isn't used anymore by the new interface and so should be only checked for the legacy interface. Probably it can be dropped as well as core doesn't rely on it anymore, but lets keep it to support legacy interface. Signed-off-by: Viresh Kumar --- kernel/time/clockevents.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c index 6e53e9a0c2e8..73689df1e4b8 100644 --- a/kernel/time/clockevents.c +++ b/kernel/time/clockevents.c @@ -450,6 +450,8 @@ static int clockevents_sanity_check(struct clock_event_device *dev) /* We shouldn't be supporting new modes now */ WARN_ON(dev->set_state_periodic || dev->set_state_oneshot || dev->set_state_shutdown || dev->tick_resume); + + BUG_ON(dev->mode != CLOCK_EVT_MODE_UNUSED); return 0; } @@ -479,7 +481,6 @@ void clockevents_register_device(struct clock_event_device *dev) { unsigned long flags; - BUG_ON(dev->mode != CLOCK_EVT_MODE_UNUSED); BUG_ON(clockevents_sanity_check(dev)); /* Initialize state to DETACHED */