Received: by 10.192.165.148 with SMTP id m20csp1846319imm; Sun, 6 May 2018 00:34:15 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpKnFlvv+YEBxEySmg0E6RTQ1iyJ/YbPvfTywJc2DmLO0W0nyC4deCRcBxKWyJ2IolGP7kE X-Received: by 2002:a65:4844:: with SMTP id i4-v6mr26758217pgs.191.1525592054959; Sun, 06 May 2018 00:34:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525592054; cv=none; d=google.com; s=arc-20160816; b=AbbA+UpOahOiIulFzIbcqv++zDTpmvkFGf/UJbJgm/fJLC+D31Ucv5LK51++cD11Pt 1jdK6e9hlz7Z186+IKncby7UZzDiUASSpAcxq2OBHGOdhQV7JWQpvG/H8zaYUz4vvp4O WmfUHtT66xDgupRWQR/z+BzFLwlkaX+2QoCaS86cFSjGQ0aVnO5kMYiPY9Y2iWzf5Xvq wfPMeCQ1FUVc4B3hNXdvF0UKlF/85pLFMWYF+V54+z3oIQJ7PjRMlwVd3KyZTzhjVni0 n0lG+CdZ68Z6mzibZJQML3w2NDvGkUP7iXqkbNE5P+kBYU8ArCS5r2TcCUE9+H4XQIDC QFmQ== 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=Lcn30rtZzMTmChtbrFXnbkn6YNoMk2oCnOcDEj9MF94=; b=j6bffsAEo4d5jhql50SVu5pEgbtCDfG9583jloJbGOjEPvvHhGWx7HXmuSVwqAyi3o RxxefBXmN/HtcepHsUsAYSZkpH+XSs1V2NXn6FUtjJF8Ldcyb//AjnHphYiW1DidXiOl d92GvCQPm7hq9u9tn5h0cMwo43gKTkSc4AlkgeFIDUb5wfIGv3+NzJeeb6alODEBeRiu pp+6Hmo6FyNFEkUT/ilbJXQfWADuQSEZ2CFEUp2mYBE33P4BwufbxQ4i4S++P6RFS0sA ikNfY3lMejKEX2fIp0FaMT1nznplZGyXUGbqs8u+qbfFCaFRVD2FJKdkXsw5pCubdUxY x1VQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=NsWGfB8C; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a34-v6si11744629pld.281.2018.05.06.00.34.00; Sun, 06 May 2018 00:34:14 -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=@gmail.com header.s=20161025 header.b=NsWGfB8C; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751782AbeEFHdj (ORCPT + 99 others); Sun, 6 May 2018 03:33:39 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:36671 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751273AbeEFHde (ORCPT ); Sun, 6 May 2018 03:33:34 -0400 Received: by mail-wr0-f194.google.com with SMTP id f2-v6so13030610wrm.3; Sun, 06 May 2018 00:33:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Lcn30rtZzMTmChtbrFXnbkn6YNoMk2oCnOcDEj9MF94=; b=NsWGfB8Ccv1U1HrvcEtFaDC2v57FLOFiNzMWauBbAHnCdJK8g8psUKwo9+oZqWC18X 5jQfA7de7uSN5t34zjvUnSp8Z9QTrwtyfKwLnzyU2CDU9ZuPRqw6OJmUnPnpWq6E4LsN gyK3ytn5/f5jet3fH32XsQyjwecVjOiItPJhrQRrr6Hr0ZWjos8ySKt/TN0B5sOldhBg MHrDBAY8SbGfizbvtc/MuduH7kVSzSz7YUOYvENPnl7Bji3M7GnDhrQ0qs+ci9IzTQQq z7aJShpO0ct9DVfXlGPz8ExVnJaCJSdeuO2bzkDQJ7pES25vbdWscmm+M6D3lUKpWTmB hlmQ== 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=Lcn30rtZzMTmChtbrFXnbkn6YNoMk2oCnOcDEj9MF94=; b=i+7LohvLkrGSurj0BJ8u7qON0fxQw8iO5V4BsEZpL9PYEnvh91VXbmyd4WysUSygWV IUi0uYD975/UfdHHmeqm9VfpLqIB7fP4aBN05U5yN/VyMWzDxHqBnBFHyzWdKMCdK99N dVBLv4AEo/tfBgpDQ24Vu07WL7RgDilJAvO5nE+H3B0pMnLUNIApEjyxowYZJphk+69X pqHW4y751UjQdYuZyo8nuWqYXHtdl9zM/MBdzd3P3yB5TcodTn2XxppmcQE8Nmvi4kSw NvAbWkKU2TkpTHaaYohIzZqRsyzWSCMhCqHaJaBkjSAbHexLcmotynG4AijyTvax9h5l W+IA== X-Gm-Message-State: ALQs6tCpB0DsK42qA57bgNPW8KMVA+cLw40vcN8sjvWrhXe0lqbfWfpv 9pJG8Sa5u/Bf+NvfQJ8Rti4= X-Received: by 2002:adf:e181:: with SMTP id k1-v6mr26981961wri.111.1525592012649; Sun, 06 May 2018 00:33:32 -0700 (PDT) Received: from flashbox.your-server.de ([2a01:4f8:10b:24a5::2]) by smtp.gmail.com with ESMTPSA id u196-v6sm5180536wmf.30.2018.05.06.00.33.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 May 2018 00:33:31 -0700 (PDT) From: Nathan Chancellor To: devel@driverdev.osuosl.org Cc: Greg Kroah-Hartman , Aditya Shankar , Ganesh Krishna , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, Nathan Chancellor Subject: [PATCH 3/3] staging: wilc1000: Remove unnecessary array index check Date: Sun, 6 May 2018 00:33:33 -0700 Message-Id: <20180506073333.3770-3-natechancellor@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180506073333.3770-1-natechancellor@gmail.com> References: <20180506073333.3770-1-natechancellor@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This statment triggers GCC's -Wtype-limit since key_index is an unsigned integer so it cannot be less than zero. Signed-off-by: Nathan Chancellor --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index b499fb987395..e0015ca6c21a 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -1054,7 +1054,7 @@ static int del_key(struct wiphy *wiphy, struct net_device *netdev, } } - if (key_index >= 0 && key_index <= 3 && priv->wep_key_len[key_index]) { + if (key_index <= 3 && priv->wep_key_len[key_index]) { memset(priv->wep_key[key_index], 0, priv->wep_key_len[key_index]); priv->wep_key_len[key_index] = 0; -- 2.17.0