From patchwork Mon Apr 14 16:23:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 28366 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f198.google.com (mail-yk0-f198.google.com [209.85.160.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 27A582036A for ; Mon, 14 Apr 2014 16:56:15 +0000 (UTC) Received: by mail-yk0-f198.google.com with SMTP id 9sf18952759ykp.1 for ; Mon, 14 Apr 2014 09:56:14 -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: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=I7YVVRiII3P2V/ZCD2OEumN+rzGrnxFerpQfdS+2Q30=; b=IFnPMJLvZmEGd0ruQvGdMmHGF7KhJRZ7T7W9ORSnrN5LtYIj4RzSgdf0fjiVuP6eKY 9Iey9fCPKoQzHHredaK/EZPugj3qEiptd4JTcwThCE/PjVoRb2DvPV0cfIggq3Bffbrl HYUOHnAhOlJx1O/RsxzS4hX9CyvfoARu7sd7mmUNHP79rp/VD1j0My0vE0AbeneGj2nE tAqi8giFvkr5VRFR+RGENWmlpdVHRf6x3DjbgrxWdAhatEQSFZ5kpID8Uh4cVmSHW4Th dELiHtlod0N7Cx/CnpNL8aER/6d9ijolfIk4SWGgdtPv5D5wIAibvMFyrQ8J407xGQUh 1sew== X-Gm-Message-State: ALoCoQlAdC9PvSFcAlxo/CGIj8I/mL/F0cOCJXsyP1koHvvWabs+hL3LivArg1PiH4aYycTKDkEE X-Received: by 10.224.6.198 with SMTP id a6mr8899456qaa.6.1397494574827; Mon, 14 Apr 2014 09:56:14 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.37.84 with SMTP id q78ls2782954qgq.69.gmail; Mon, 14 Apr 2014 09:56:14 -0700 (PDT) X-Received: by 10.52.171.115 with SMTP id at19mr305154vdc.48.1397494574732; Mon, 14 Apr 2014 09:56:14 -0700 (PDT) Received: from mail-ve0-f169.google.com (mail-ve0-f169.google.com [209.85.128.169]) by mx.google.com with ESMTPS id dh4si2847981veb.103.2014.04.14.09.56.14 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 14 Apr 2014 09:56:14 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.169; Received: by mail-ve0-f169.google.com with SMTP id pa12so7824954veb.14 for ; Mon, 14 Apr 2014 09:56:14 -0700 (PDT) X-Received: by 10.58.169.97 with SMTP id ad1mr190969vec.45.1397494574670; Mon, 14 Apr 2014 09:56:14 -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.220.221.72 with SMTP id ib8csp165011vcb; Mon, 14 Apr 2014 09:56:14 -0700 (PDT) X-Received: by 10.68.203.135 with SMTP id kq7mr45203183pbc.85.1397494573965; Mon, 14 Apr 2014 09:56:13 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b4si9182882pbl.388.2014.04.14.09.56.13; Mon, 14 Apr 2014 09:56:13 -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 S1756199AbaDNQ4E (ORCPT + 26 others); Mon, 14 Apr 2014 12:56:04 -0400 Received: from mail-pd0-f178.google.com ([209.85.192.178]:38300 "EHLO mail-pd0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755425AbaDNQZU (ORCPT ); Mon, 14 Apr 2014 12:25:20 -0400 Received: by mail-pd0-f178.google.com with SMTP id x10so8285921pdj.9 for ; Mon, 14 Apr 2014 09:25:19 -0700 (PDT) X-Received: by 10.67.5.233 with SMTP id cp9mr3307256pad.147.1397492719657; Mon, 14 Apr 2014 09:25:19 -0700 (PDT) Received: from localhost ([122.167.126.16]) by mx.google.com with ESMTPSA id di3sm7035885pbc.11.2014.04.14.09.25.16 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 14 Apr 2014 09:25:19 -0700 (PDT) From: Viresh Kumar To: tglx@linutronix.de Cc: linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, fweisbec@gmail.com, Arvind.Chauhan@arm.com, linaro-networking@linaro.org, Viresh Kumar Subject: [PATCH 11/38] tick-common: fix wrong check in tick_check_replacement() Date: Mon, 14 Apr 2014 21:53:33 +0530 Message-Id: <1f59048520216e11bcaa50720c005d471372e48f.1397492345.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e 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=neutral (google.com: 209.85.128.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) 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: , tick_check_replacement() returns if a replacement of clock_event_device is possible or not. It does this as the first check: if (tick_check_percpu(curdev, newdev, smp_processor_id())) return false; This looks wrong as we are returning false when tick_check_percpu() cpu returned true. Probably Thomas forgot '!' here in his commit: 03e13cf5e ? Fix it by placing a '!' before tick_check_percpu(). Signed-off-by: Viresh Kumar --- kernel/time/tick-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c index 395cbbd..8650026 100644 --- a/kernel/time/tick-common.c +++ b/kernel/time/tick-common.c @@ -257,7 +257,7 @@ static bool tick_check_preferred(struct clock_event_device *curdev, bool tick_check_replacement(struct clock_event_device *curdev, struct clock_event_device *newdev) { - if (tick_check_percpu(curdev, newdev, smp_processor_id())) + if (!tick_check_percpu(curdev, newdev, smp_processor_id())) return false; return tick_check_preferred(curdev, newdev);