From patchwork Mon Nov 9 10:06:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 56203 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp91171lbb; Mon, 9 Nov 2015 02:08:42 -0800 (PST) X-Received: by 10.68.219.40 with SMTP id pl8mr38332219pbc.136.1447063722574; Mon, 09 Nov 2015 02:08:42 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id nx14si21484289pab.69.2015.11.09.02.08.42; Mon, 09 Nov 2015 02:08:42 -0800 (PST) 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; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dkim=neutral (body hash did not verify) header.i=@linaro_org.20150623.gappssmtp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753190AbbKIKIh (ORCPT + 28 others); Mon, 9 Nov 2015 05:08:37 -0500 Received: from mail-wi0-f171.google.com ([209.85.212.171]:35791 "EHLO mail-wi0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751211AbbKIKHc (ORCPT ); Mon, 9 Nov 2015 05:07:32 -0500 Received: by wiby19 with SMTP id y19so12718953wib.0 for ; Mon, 09 Nov 2015 02:07:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro_org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Mc+rv6bHn10r7tP+azXmQwao2ghERyaLp3pgI8r2u1U=; b=vEWcuq/XZM0T+z1bScKPDHqsa5i6Ux/tRMz3u3dapivTUklJb3xD8imo80i3lHAozn VwQKlaU79l3+oHfku/1QCM95VZ+il7Uf5BtZLcCh16ceyFDDapGbraESYTv0wmBjRJw1 3s1cSMv27KPhsLewr5GdocFDaiGJFJBggroSwGINybTJVZtC41rB59eWr4qJ5vgna/S/ /RNC8LPm3cT4lxc4OEW37TuMLOxjoKpGI0hpcVi+S+xBywnVW8duZkCuD599XzuR+qjJ 58oXd+fpPdWFWnIlL28I4um4oF2wjsWZ6wwDIHuQO04oV8P4U+C9C782OgoNEdq+zAtY pduQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Mc+rv6bHn10r7tP+azXmQwao2ghERyaLp3pgI8r2u1U=; b=bz8MooAfa88PVrNOMUouM4yekAcUWdoiDxqe9DzgRBRoaD766h6t/SDhaZQEEVs38s q4Olp8livr4a66Bsx+sDwzuvQDObOGba8MM9pDPVNwglRkBf975tCmybjHh1/xZuY9ez P5nTHNxYumujslcRfCxvrmPiDW4O1U2JEZGt/dtbMPpa8vNZ+J8YB+pWHQUkoqqYe/QM GCIgu3UR5f5aTjHMZROOzN6DCY71yMqEH/G2uWN3hLbYo1NdJg87oMZwXVcyvm0ssB8I 4d8JxSP6W+3s9TCd3fMqtqpYtuI2vZciXOWgp2XPZGWUN/VXGB9CBw3vdPwQMLxxher2 EwLA== X-Gm-Message-State: ALoCoQkZTDWGgpQ9IBC2TudjLPcFCUJYFkuoFmvkeszpfZip332fFt9d+EpSwUm+dTMi8AeaEN97 X-Received: by 10.195.13.135 with SMTP id ey7mr9758553wjd.25.1447063651111; Mon, 09 Nov 2015 02:07:31 -0800 (PST) Received: from localhost.localdomain (sju31-1-78-210-255-2.fbx.proxad.net. [78.210.255.2]) by smtp.gmail.com with ESMTPSA id t126sm13384201wmd.23.2015.11.09.02.07.29 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 09 Nov 2015 02:07:30 -0800 (PST) From: Daniel Lezcano To: daniel.lezcano@linaro.org Cc: ysato@users.sourceforge.jp, tglx@linutronix.de, linux-kernel@vger.kernel.org, uclinux-h8-devel@lists.sourceforge.jp (moderated list:H8/300 ARCHITECTURE) Subject: [PATCH 15/15] clocksource/drivers/h8300_timer16: Remove pointless lock Date: Mon, 9 Nov 2015 11:06:53 +0100 Message-Id: <1447063614-4662-15-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1447063614-4662-1-git-send-email-daniel.lezcano@linaro.org> References: <1447063614-4662-1-git-send-email-daniel.lezcano@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The lock in the timer16_clocksource_read is not needed, remove it. Signed-off-by: Daniel Lezcano --- drivers/clocksource/h8300_timer16.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ diff --git a/drivers/clocksource/h8300_timer16.c b/drivers/clocksource/h8300_timer16.c index 129dca0..f396605 100644 --- a/drivers/clocksource/h8300_timer16.c +++ b/drivers/clocksource/h8300_timer16.c @@ -30,7 +30,6 @@ struct timer16_priv { unsigned char imfa; unsigned char imiea; unsigned char ovf; - raw_spinlock_t lock; struct clk *clk; }; @@ -75,13 +74,10 @@ static inline struct timer16_priv *cs_to_priv(struct clocksource *cs) static cycle_t timer16_clocksource_read(struct clocksource *cs) { struct timer16_priv *p = cs_to_priv(cs); - unsigned long flags, raw; - unsigned long value; + unsigned long raw, value; - raw_spin_lock_irqsave(&p->lock, flags); value = p->total_cycles; raw = timer16_get_counter(p); - raw_spin_unlock_irqrestore(&p->lock, flags); return value + raw; }