From patchwork Tue Sep 16 20:51:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 4920371 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D09519F349 for ; Tue, 16 Sep 2014 20:53:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C21BF201CE for ; Tue, 16 Sep 2014 20:54:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BA21220172 for ; Tue, 16 Sep 2014 20:54:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755408AbaIPUwR (ORCPT ); Tue, 16 Sep 2014 16:52:17 -0400 Received: from mail-lb0-f176.google.com ([209.85.217.176]:62588 "EHLO mail-lb0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755375AbaIPUwP (ORCPT ); Tue, 16 Sep 2014 16:52:15 -0400 Received: by mail-lb0-f176.google.com with SMTP id z11so604325lbi.35 for ; Tue, 16 Sep 2014 13:52:13 -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=dS38reRDewT4V8Pdhd5/3SjUqnWRPkANcB+0ocr6KCE=; b=iCaj+NR4b+WYT8mW1u5m3gIF7l3JEdiktjPexa7jxc2qL9mhXS5DC2Nb+1si9zpXg5 g/P8JxUu2R1WfnkOP6a7Y8BL2rMqk3CpEo8WyMHEGa9yGOVvzG66/OKc7EwU6sqtXqT+ 4QrQtAelcRuEBAFY8P7+dD5zMediajbzvfPuk= 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=dS38reRDewT4V8Pdhd5/3SjUqnWRPkANcB+0ocr6KCE=; b=d8H7mh7yd4Ov9qK4X0Quow+uZ46oh1GibyvGbgU0/i5fb1b9j3sSkzwJ3+PUYdytLz /nHUZgpNnNq0hVZ4UgiGhNMNyxmVtgzXbOE8Vtd02lD4MOl8hQQ0m+to+3PjsndQLS+Q wDaiFuQc3zinA/O8wN+G17tRYPl1eqzmmykMTQWY5LDcVbDtvPN7OKSrqgrvJQNBmQTw zyJyLbNNx4s3y3KowdBDLt8AmItDBRbN0oy+Ow5hTfBV4IN+x+vdmzcMTJ3pkvYA/FBo diJHLJqa7rodlL8Z9MYlwG992ji+AEiavMoiwsYRZLN0LwYG74zFe1g4L6nVccamxV4V l6bQ== X-Gm-Message-State: ALoCoQmliJKGgP6vFYWSavYR7wfFy1rEUyKqjs24ewoH+h+rSRnhTb81087H092943YjtvSALL3Q X-Received: by 10.112.54.135 with SMTP id j7mr36653550lbp.51.1410900733471; Tue, 16 Sep 2014 13:52:13 -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.12 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Sep 2014 13:52:12 -0700 (PDT) From: Rasmus Villemoes To: Andrew Morton Cc: linux-kernel@vger.kernel.org, Rasmus Villemoes , Roland Dreier , Nicholas Bellinger , linux-rdma@vger.kernel.org Subject: [PATCH 14/22] ib_srpt: Replace strnicmp with strncasecmp Date: Tue, 16 Sep 2014 22:51:28 +0200 Message-Id: <1410900696-6481-15-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-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@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=ham 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: Roland Dreier Cc: Nicholas Bellinger Cc: linux-rdma@vger.kernel.org Signed-off-by: Rasmus Villemoes --- drivers/infiniband/ulp/srpt/ib_srpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c index d28a8c2..7206547 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.c +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c @@ -3574,7 +3574,7 @@ static int srpt_parse_i_port_id(u8 i_port_id[16], const char *name) int ret, rc; p = name; - if (strnicmp(p, "0x", 2) == 0) + if (strncasecmp(p, "0x", 2) == 0) p += 2; ret = -EINVAL; len = strlen(p);