From patchwork Wed Apr 17 13:32:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 16167 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f69.google.com (mail-vb0-f69.google.com [209.85.212.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E546023911 for ; Wed, 17 Apr 2013 13:33:41 +0000 (UTC) Received: by mail-vb0-f69.google.com with SMTP id p12sf2578364vbe.4 for ; Wed, 17 Apr 2013 06:33:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=3yIF7pzIAssnOoK7avO8knGWUr6e0Q2uPCAraD2XJNA=; b=lQdg2dsKj9NMBqymREnPrvF/gsdhW390iPMx71hKAIHMvaFo0Dl1mNLEhIgnhNs9z9 qffWQBJertCGSbUy3wLkqVi57EVjpXQmosCpXtUF3WtcmJKpo9ghiyqJ1ybLEKJjii/w 6LWVCepXUMbTHCB76Dd3FErqI+W0gL7EfXQjSjBQuUQyyE39VlmxnQgXwia5r9vB3qtN EThtF2+6TzbhJ4Ly2l+YFMFI/ihhkkLLNGfmxRICvPcJ9Tg4rHOAHZSwhezxWk8WD17y oilvFqiHfhkAk1OhQviZ9oYX2H3jRJFOv6iJ5fCwZEYuUeBKHl6xyNuf/OPAHDSUVRL2 LKvg== X-Received: by 10.236.91.109 with SMTP id g73mr3218522yhf.23.1366205586796; Wed, 17 Apr 2013 06:33:06 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.4.71 with SMTP id i7ls916152qei.86.gmail; Wed, 17 Apr 2013 06:33:06 -0700 (PDT) X-Received: by 10.52.18.129 with SMTP id w1mr4179556vdd.31.1366205586606; Wed, 17 Apr 2013 06:33:06 -0700 (PDT) Received: from mail-ve0-f180.google.com (mail-ve0-f180.google.com [209.85.128.180]) by mx.google.com with ESMTPS id b3si3889095vea.33.2013.04.17.06.33.06 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 17 Apr 2013 06:33:06 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.180 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.180; Received: by mail-ve0-f180.google.com with SMTP id pb11so1398546veb.25 for ; Wed, 17 Apr 2013 06:33:06 -0700 (PDT) X-Received: by 10.52.71.4 with SMTP id q4mr4141229vdu.8.1366205586416; Wed, 17 Apr 2013 06:33:06 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.127.98 with SMTP id nf2csp73790veb; Wed, 17 Apr 2013 06:33:05 -0700 (PDT) X-Received: by 10.180.108.106 with SMTP id hj10mr26572840wib.0.1366205585426; Wed, 17 Apr 2013 06:33:05 -0700 (PDT) Received: from mail-wg0-f53.google.com (mail-wg0-f53.google.com [74.125.82.53]) by mx.google.com with ESMTPS id ub10si2141453wjc.66.2013.04.17.06.33.05 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 17 Apr 2013 06:33:05 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.53 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=74.125.82.53; Received: by mail-wg0-f53.google.com with SMTP id z11so1610409wgg.20 for ; Wed, 17 Apr 2013 06:33:05 -0700 (PDT) X-Received: by 10.194.222.100 with SMTP id ql4mr11309867wjc.59.1366205584838; Wed, 17 Apr 2013 06:33:04 -0700 (PDT) Received: from mai.home (AToulouse-654-1-349-85.w90-55.abo.wanadoo.fr. [90.55.188.85]) by mx.google.com with ESMTPS id ej8sm25556799wib.9.2013.04.17.06.33.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 17 Apr 2013 06:33:02 -0700 (PDT) From: Daniel Lezcano To: lethal@linux-sh.org, rjw@sisk.pl Cc: linux-sh@vger.kernel.org, linux-pm@vger.kernel.org, patches@linaro.org Subject: [PATCH 2/4] SH: cpuidle: remove CPUIDLE_DRIVER_STATE_START usage Date: Wed, 17 Apr 2013 15:32:55 +0200 Message-Id: <1366205577-11632-2-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1366205577-11632-1-git-send-email-daniel.lezcano@linaro.org> References: <1366205577-11632-1-git-send-email-daniel.lezcano@linaro.org> X-Gm-Message-State: ALoCoQlEmN+hlrS/vTSmdRf49HDpXVDVOPXPbCamo5ozEUZ6i2ISdIh0qROqJve5GdHY/ZmMio2T X-Original-Sender: daniel.lezcano@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.180 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 Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Daniel Lezcano The CPUIDLE_DRIVER_STATE_START constant is only set when the kernel compilation option CONFIG_ARCH_HAS_CPU_RELAX is set, but this is only relatated to x86, so it is always zero. Remove the reference to this constant in the code. Signed-off-by: Daniel Lezcano --- arch/sh/kernel/cpu/shmobile/cpuidle.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/sh/kernel/cpu/shmobile/cpuidle.c b/arch/sh/kernel/cpu/shmobile/cpuidle.c index 5b44af9..36374cc 100644 --- a/arch/sh/kernel/cpu/shmobile/cpuidle.c +++ b/arch/sh/kernel/cpu/shmobile/cpuidle.c @@ -62,9 +62,7 @@ void sh_mobile_setup_cpuidle(void) struct cpuidle_device *dev = &cpuidle_dev; struct cpuidle_driver *drv = &cpuidle_driver; struct cpuidle_state *state; - int i; - - i = CPUIDLE_DRIVER_STATE_START; + int i = 0; state = &drv->states[i++]; snprintf(state->name, CPUIDLE_NAME_LEN, "C1"); @@ -76,7 +74,7 @@ void sh_mobile_setup_cpuidle(void) state->flags |= CPUIDLE_FLAG_TIME_VALID; state->enter = cpuidle_sleep_enter; - drv->safe_state_index = i-1; + drv->safe_state_index = 0; if (sh_mobile_sleep_supported & SUSP_SH_SF) { state = &drv->states[i++];