From patchwork Sun May 6 07:33:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 10382621 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5AC5360353 for ; Sun, 6 May 2018 07:33:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3FA5028BB0 for ; Sun, 6 May 2018 07:33:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 34BAE28E87; Sun, 6 May 2018 07:33:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C5A9E28BB0 for ; Sun, 6 May 2018 07:33:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751739AbeEFHdh (ORCPT ); Sun, 6 May 2018 03:33:37 -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-Google-Smtp-Source: AB8JxZos5+uMnKxwzZT8kgdg+GcTnKvuciwOXXUxOktB4Iir8Q64cqthVijVH8F4bJ3uVdlL0VAGJw== 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-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Ajay Singh --- 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;