From patchwork Sun Oct 29 21:20:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 117427 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp1854230qgn; Sun, 29 Oct 2017 14:25:36 -0700 (PDT) X-Google-Smtp-Source: ABhQp+SYF+wYFGutC5VQ5cHpJJzXG0s9VSOwymLLgXx8vZojgovZTBao7taojywf60wKEx6sF7Wc X-Received: by 10.101.78.207 with SMTP id w15mr6041506pgq.347.1509312336150; Sun, 29 Oct 2017 14:25:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509312336; cv=none; d=google.com; s=arc-20160816; b=z4HdxDWqkJCueYqB2oASm0rMU/aufQ4IKWVkVB7ekmBgWjz/anHPCfntQJm2RVbBlt pgAAEq9a5wcgPuMSDUFfGUOTy4Kxt759Qs5p2Kt9T6+BO/AfM9GGggc3YkgBb+IpZP8N mKVf1gJ2fGlozH2O13QfGEuu5DP+3VTjQbHimPI8eKeRoS5AZ6F9AsQ4Vjj0EvbDHkcE xIqEF55HmxECyjZknxQkISJgdkCsPbQX8aKhE5X/tzsdhvshwODpgLqlvzC7pkBtWmv6 LTAKXCLNyLCFmS14nXsAiYcUjpwYtSPTpQqfbFHFQ2b0JtUyZ8gBWqXW1v5BHtpb6l+k 4BlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=MGxxK9z7gZnvqPy6mQ7Yj0gd0XPRMc5sGdILtK3O0/M=; b=S1ukQ9aI+B6f3o1VbN51ntgTVkpe6Feqs6BL8/jTgxW7FJIMojV60agS0xAeRgRo9A 25YeIlZ3Dyc6G9sZcgyT6hN2ekEIbBsUphwgpCkhl61bdahVifV1FjFXmBWoWyzgsJUL Av2iQINlrFKl9yGgMauz09FlFo4DBy024ORIv8UsVD1yqwhObE95gtj2C8qQkGfr4Xhz XWjc3rwhYJl2DH9PF9nergYPv6ZjK9bYR8l7EARGKY3tV6jyJGcm6A3tNCaQtn2G+t4c LiNcdnHaC8tALSjjMg3q9La5Of0yEcaswSVMxB/+hngV/vovbDFEXhQq0IB2135nHoz9 gAbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FiFKoip5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m9si7784711pln.771.2017.10.29.14.25.35; Sun, 29 Oct 2017 14:25:36 -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; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FiFKoip5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932432AbdJ2VZd (ORCPT + 27 others); Sun, 29 Oct 2017 17:25:33 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:44342 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932365AbdJ2VY6 (ORCPT ); Sun, 29 Oct 2017 17:24:58 -0400 Received: by mail-wr0-f193.google.com with SMTP id z55so10727627wrz.1 for ; Sun, 29 Oct 2017 14:24:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MGxxK9z7gZnvqPy6mQ7Yj0gd0XPRMc5sGdILtK3O0/M=; b=FiFKoip54v2RWk6qJPs65XffOvrlwwI6UB7EkZAFOnpbonZFRyHqZjtggQu8M9NpMa LXuYL8StOOSIY12yg2fr/zcVeUR3puxA86+1rZkZZjSVM0McxJermCes/eSwG+XwemYg 9BPkra5cQFfvuPapIolLpZ3VB1HogvSlTQwZE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MGxxK9z7gZnvqPy6mQ7Yj0gd0XPRMc5sGdILtK3O0/M=; b=if2PrxaKWRNQCtP5CDElYAXwUDS/UahqrqsvVjgAFvsO7tFOUZ3aefcsyn0zcijreD 8bsV+6SthmBtw/0YUknETgXcqC/cQF4z3M8gFZCNW67eDcz7Vjshqougw+7ER4N35IHx NdziGd6kxedUdA/arW/ovC2vmMtFXU2+dHTtW03gPRKe6JH/jylHofTC6xRWoQsIzgN4 V/mGov6nLSKJl/itjzpDpGpVXtQCDQaqbhdxKdS6lBHeXNLI5wS0pi3wJujzzs7+9lfO Ci2POwe/Ny5cdWcClK0h0HpcHAzmSQlWzgYrMUVUlYOGPHdS0wyKbc3LLiN2zIEylpZb aQAQ== X-Gm-Message-State: AMCzsaXUbVznalg/vLRDBM8brhaKz5g6Z2y636x6N2OjgE6Q+mKlGRdN C28U1IEl8eNM6hMgUYz2gSkJVg== X-Received: by 10.223.161.79 with SMTP id r15mr5071814wrr.247.1509312297543; Sun, 29 Oct 2017 14:24:57 -0700 (PDT) Received: from localhost.localdomain ([2a01:e35:879a:6cd0:2c92:b7e6:9f71:ab86]) by smtp.gmail.com with ESMTPSA id z20sm10067264wrz.62.2017.10.29.14.24.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 29 Oct 2017 14:24:57 -0700 (PDT) From: Daniel Lezcano To: tglx@linutronix.de, daniel.lezcano@linaro.org Cc: linux-kernel@vger.kernel.org, Matt Redfearn Subject: [PATCH 15/17] clocksource/drivers/mips-gic-timer: Remove pointless irq_save, restore Date: Sun, 29 Oct 2017 22:20:32 +0100 Message-Id: <1509312035-17368-15-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509312035-17368-1-git-send-email-daniel.lezcano@linaro.org> References: <1509312035-17368-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 From: Matt Redfearn The function gic_next_event is always called with interrupts disabled, so the local_irq_save / local_irq_restore are pointless - remove them. [Daniel Lezcano: Fixed warning by removing unused variable 'flags'] Signed-off-by: Matt Redfearn Suggested-by: Daniel Lezcano Reported-by: Thomas Gleixner Signed-off-by: Daniel Lezcano --- drivers/clocksource/mips-gic-timer.c | 3 --- 1 file changed, 3 deletions(-) -- 2.7.4 diff --git a/drivers/clocksource/mips-gic-timer.c b/drivers/clocksource/mips-gic-timer.c index ae3167c..775dea0 100644 --- a/drivers/clocksource/mips-gic-timer.c +++ b/drivers/clocksource/mips-gic-timer.c @@ -39,16 +39,13 @@ static u64 notrace gic_read_count(void) static int gic_next_event(unsigned long delta, struct clock_event_device *evt) { - unsigned long flags; u64 cnt; int res; cnt = gic_read_count(); cnt += (u64)delta; - local_irq_save(flags); write_gic_vl_other(mips_cm_vp_id(cpumask_first(evt->cpumask))); write_gic_vo_compare(cnt); - local_irq_restore(flags); res = ((int)(gic_read_count() - cnt) >= 0) ? -ETIME : 0; return res; }