From patchwork Tue Aug 4 05:48:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xunlei Pang X-Patchwork-Id: 51893 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by patches.linaro.org (Postfix) with ESMTPS id C8266229FD for ; Tue, 4 Aug 2015 05:51:41 +0000 (UTC) Received: by wibdx1 with SMTP id dx1sf2416237wib.2 for ; Mon, 03 Aug 2015 22:51:41 -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=DbWYxdec2BKLHe44YczIO3Bfch2T1jG9VvY5LNDedz4=; b=UhTuiNvc7GbS7UsRnCBoUUmH3gg8aj+XWPr+AZpnNoBMSoyVyOshxg3oKdyY+xwSNI zlUbovHDyqzHrRijwPhWPP8pNeT37K4rsWFavfPrsTm7QDeo8Q4cVN9SxTkR3ipgJStI 7MqRBJp5ZwX9X71PTnTiLGgbcBTeSLyK2x9pruFbVKNmm+cYp20QS1iSfr6x1BxuFS4I RLpr+rDAKr+G2RgJv4V2wSBuDWr1fdeIolWi+x1Ce2ueHk+NAqMl7kt+oYB8FHzjQSmF g0zW30+1veiDAB3yK3MJ2KhMm/yiZQm7TZEM7pyvtYGWCQol/RBrpLQ9+2dYbTU+i6ck k5iA== X-Gm-Message-State: ALoCoQkQrR+GtTI0zUQYlLBjJXflVVl7loL3uEoSvShHWgt1jxIkHGSXuye31pKi7KnEyNlXz37m X-Received: by 10.112.87.69 with SMTP id v5mr577536lbz.16.1438667501149; Mon, 03 Aug 2015 22:51:41 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.10.74 with SMTP id g10ls671759lab.92.gmail; Mon, 03 Aug 2015 22:51:40 -0700 (PDT) X-Received: by 10.152.120.135 with SMTP id lc7mr1440697lab.41.1438667500957; Mon, 03 Aug 2015 22:51:40 -0700 (PDT) Received: from mail-la0-x236.google.com (mail-la0-x236.google.com. [2a00:1450:4010:c03::236]) by mx.google.com with ESMTPS id r11si13880808lby.31.2015.08.03.22.51.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Aug 2015 22:51:40 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::236 as permitted sender) client-ip=2a00:1450:4010:c03::236; Received: by labsr2 with SMTP id sr2so25996987lab.2 for ; Mon, 03 Aug 2015 22:51:40 -0700 (PDT) X-Received: by 10.152.6.69 with SMTP id y5mr1495788lay.72.1438667500815; Mon, 03 Aug 2015 22:51:40 -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 l6csp2226907lba; Mon, 3 Aug 2015 22:51:39 -0700 (PDT) X-Received: by 10.69.11.196 with SMTP id ek4mr4173802pbd.148.1438667499663; Mon, 03 Aug 2015 22:51:39 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w3si30748397pdf.213.2015.08.03.22.51.38; Mon, 03 Aug 2015 22:51:39 -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 S1753001AbbHDFvh (ORCPT + 28 others); Tue, 4 Aug 2015 01:51:37 -0400 Received: from m50-112.126.com ([123.125.50.112]:40293 "EHLO m50-112.126.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752627AbbHDFve (ORCPT ); Tue, 4 Aug 2015 01:51:34 -0400 Received: from localhost.localdomain (unknown [210.21.223.3]) by smtp6 (Coremail) with SMTP id j9KowAAXLUKAUsBVumIjAQ--.6195S4; Tue, 04 Aug 2015 13:50:01 +0800 (CST) From: Xunlei Pang To: linux-kernel@vger.kernel.org, Daniel Lezcano Cc: "Rafael J. Wysocki" , linux-pm@vger.kernel.org, Xunlei Pang Subject: [PATCH v2 2/3] cpuidle/coupled: Remove redundant 'dev' argument of cpuidle_state_is_coupled() Date: Tue, 4 Aug 2015 13:48:56 +0800 Message-Id: <1438667337-16903-2-git-send-email-xlpang@126.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1438667337-16903-1-git-send-email-xlpang@126.com> References: <1438667337-16903-1-git-send-email-xlpang@126.com> X-CM-TRANSID: j9KowAAXLUKAUsBVumIjAQ--.6195S4 X-Coremail-Antispam: 1Uf129KBjvJXoWxWr1rurWUAw4xuryUKw1xZrb_yoW5ZF1fpF WDA3y3Kr4DJry8W3yIqw1jkas8C34vvrWrWrWrK39xWFn7tF1rtan5tFy5Zr4kJrWkGFy2 q34qyryrJFy8GF7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jT9a9UUUUU= X-Originating-IP: [210.21.223.3] X-CM-SenderInfo: p0ost0bj6rjloofrz/1tbiJwpMv1WfhwQFrQAAs- Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Original-Sender: xlpang@126.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::236 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=neutral (body hash did not verify) header.i=@126.com; dmarc=fail (p=NONE dis=NONE) header.from=126.com 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: Xunlei Pang For cpuidle_state_is_coupled(), 'dev' is not used, so remove it. Signed-off-by: Xunlei Pang --- drivers/cpuidle/coupled.c | 4 +--- drivers/cpuidle/cpuidle.c | 4 ++-- drivers/cpuidle/cpuidle.h | 7 +++---- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/cpuidle/coupled.c b/drivers/cpuidle/coupled.c index 6493e40..1523e2d 100644 --- a/drivers/cpuidle/coupled.c +++ b/drivers/cpuidle/coupled.c @@ -176,14 +176,12 @@ void cpuidle_coupled_parallel_barrier(struct cpuidle_device *dev, atomic_t *a) /** * cpuidle_state_is_coupled - check if a state is part of a coupled set - * @dev: struct cpuidle_device for the current cpu * @drv: struct cpuidle_driver for the platform * @state: index of the target state in drv->states * * Returns true if the target state is coupled with cpus besides this one */ -bool cpuidle_state_is_coupled(struct cpuidle_device *dev, - struct cpuidle_driver *drv, int state) +bool cpuidle_state_is_coupled(struct cpuidle_driver *drv, int state) { return drv->states[state].flags & CPUIDLE_FLAG_COUPLED; } diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index 3325393..17a6dc0 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c @@ -214,7 +214,7 @@ int cpuidle_enter_state(struct cpuidle_device *dev, struct cpuidle_driver *drv, tick_broadcast_exit(); } - if (!cpuidle_state_is_coupled(dev, drv, entered_state)) + if (!cpuidle_state_is_coupled(drv, entered_state)) local_irq_enable(); diff = ktime_to_us(ktime_sub(time_end, time_start)); @@ -263,7 +263,7 @@ int cpuidle_select(struct cpuidle_driver *drv, struct cpuidle_device *dev) int cpuidle_enter(struct cpuidle_driver *drv, struct cpuidle_device *dev, int index) { - if (cpuidle_state_is_coupled(dev, drv, index)) + if (cpuidle_state_is_coupled(drv, index)) return cpuidle_enter_state_coupled(dev, drv, index); return cpuidle_enter_state(dev, drv, index); } diff --git a/drivers/cpuidle/cpuidle.h b/drivers/cpuidle/cpuidle.h index ee97e96..178c5ad 100644 --- a/drivers/cpuidle/cpuidle.h +++ b/drivers/cpuidle/cpuidle.h @@ -34,15 +34,14 @@ extern int cpuidle_add_sysfs(struct cpuidle_device *dev); extern void cpuidle_remove_sysfs(struct cpuidle_device *dev); #ifdef CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED -bool cpuidle_state_is_coupled(struct cpuidle_device *dev, - struct cpuidle_driver *drv, int state); +bool cpuidle_state_is_coupled(struct cpuidle_driver *drv, int state); int cpuidle_enter_state_coupled(struct cpuidle_device *dev, struct cpuidle_driver *drv, int next_state); int cpuidle_coupled_register_device(struct cpuidle_device *dev); void cpuidle_coupled_unregister_device(struct cpuidle_device *dev); #else -static inline bool cpuidle_state_is_coupled(struct cpuidle_device *dev, - struct cpuidle_driver *drv, int state) +static inline +bool cpuidle_state_is_coupled(struct cpuidle_driver *drv, int state) { return false; }