From patchwork Tue Sep 16 20:51:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 4920401 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D46DCBEEA5 for ; Tue, 16 Sep 2014 20:55:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 75B3120142 for ; Tue, 16 Sep 2014 20:55:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5987B200DF for ; Tue, 16 Sep 2014 20:55:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755397AbaIPUwP (ORCPT ); Tue, 16 Sep 2014 16:52:15 -0400 Received: from mail-lb0-f173.google.com ([209.85.217.173]:44139 "EHLO mail-lb0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755326AbaIPUwM (ORCPT ); Tue, 16 Sep 2014 16:52:12 -0400 Received: by mail-lb0-f173.google.com with SMTP id w7so602610lbi.18 for ; Tue, 16 Sep 2014 13:52:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=W090idwINmqqtK2tQbdtbSI9EcdpKephAvMckSEJ/wg=; b=J62NWHhWI6009EnJObSAel7YnFtOJiUlKEGoa3ZRy+AdijuDLDyI05IEFDGqnZuqXp RSppdXH/YVYSh5BbuhvocPzSzdc5M+RT6vNE/yRv4USog2N/lu60TWbcZk4CJ6XpA0Nv LAVJVbJNCm3dZNGN8LcVZjX4zaydGP+Gf2FbM= 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=W090idwINmqqtK2tQbdtbSI9EcdpKephAvMckSEJ/wg=; b=MwPYq7TkRorLGcxeA8sFOVWfxHFm+zwbHrA295zDF4cflUQhlSaogIBk1ImU0l0WTI tB65LNwlpYvzJj1Bs50PjLvaMfVWr1XHdkNozzQaCXlIM2SK/19kfr+Fb6bYAmtiCIB5 Mqqec7PdAl1xLZj6w0fztMOhg8IqwTW9RgR/X67EdJevLwoj04Tlg3VAloiQbgV2vaLc 9+RcKUuB4tuWfRR30v5YSJhMbajYvi73unFu0r3LW2hXylG/SUiE+aOXuPN2Sk+jCkiR m+yWBtWbrrhXr7zyRLvKGGz7KUwHKNxGrPaBXwBxRp5s/TNEQo7Y1g2j6OhQwpfdoh67 vRUA== X-Gm-Message-State: ALoCoQnpXIlr0A8BA1y05zxXH8BON/1lOB1djbUSWyex0nbdyMUHf4K7VbVaiPJAFyTAVN+TGhdN X-Received: by 10.112.130.168 with SMTP id of8mr38097947lbb.5.1410900731050; Tue, 16 Sep 2014 13:52:11 -0700 (PDT) Received: from spencer.imf.au.dk ([130.225.20.51]) by mx.google.com with ESMTPSA id nb7sm5514091lbb.43.2014.09.16.13.52.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Sep 2014 13:52:10 -0700 (PDT) From: Rasmus Villemoes To: Andrew Morton Cc: linux-kernel@vger.kernel.org, Rasmus Villemoes , "Rafael J. Wysocki" , Daniel Lezcano , linux-pm@vger.kernel.org Subject: [PATCH 12/22] cpuidle: Replace strnicmp with strncasecmp Date: Tue, 16 Sep 2014 22:51:26 +0200 Message-Id: <1410900696-6481-13-git-send-email-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.0.4 In-Reply-To: <1410900696-6481-1-git-send-email-linux@rasmusvillemoes.dk> References: <1410900696-6481-1-git-send-email-linux@rasmusvillemoes.dk> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The kernel used to contain two functions for length-delimited, case-insensitive string comparison, strnicmp with correct semantics and a slightly buggy strncasecmp. The latter is the POSIX name, so strnicmp was renamed to strncasecmp, and strnicmp made into a wrapper for the new strncasecmp to avoid breaking existing users. To allow the compat wrapper strnicmp to be removed at some point in the future, and to avoid the extra indirection cost, do s/strnicmp/strncasecmp/g. Cc: "Rafael J. Wysocki" Cc: Daniel Lezcano Cc: linux-pm@vger.kernel.org Signed-off-by: Rasmus Villemoes --- drivers/cpuidle/governor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpuidle/governor.c b/drivers/cpuidle/governor.c index ca89412..fb9f511 100644 --- a/drivers/cpuidle/governor.c +++ b/drivers/cpuidle/governor.c @@ -28,7 +28,7 @@ static struct cpuidle_governor * __cpuidle_find_governor(const char *str) struct cpuidle_governor *gov; list_for_each_entry(gov, &cpuidle_governors, governor_list) - if (!strnicmp(str, gov->name, CPUIDLE_NAME_LEN)) + if (!strncasecmp(str, gov->name, CPUIDLE_NAME_LEN)) return gov; return NULL;