Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp216798pxb; Thu, 12 Aug 2021 14:47:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrCKyP0fAjIVkWZ35tZ458JlMcr06P0UaMqKOQq++aYQ6c9o0HyKUM6lJc1h/3VE5PVge5 X-Received: by 2002:aa7:db93:: with SMTP id u19mr7926077edt.227.1628804843635; Thu, 12 Aug 2021 14:47:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628804843; cv=none; d=google.com; s=arc-20160816; b=c6FwAoC9HL4+z1gl2Xry4o+k+FIsve0wtKlq/5nI9Lgomh1dZuZx2bTkmK57Aq1jwk cx7sKSKl5NBVvFpf3RmD/APwG/rEglZxEHl8yEagdSoets/RbGwa8U2HOJ6PIAyCZTfq USZA7Viqo9I2C5V0iF3y293HNuOjhSs7xesUbI3AZwJu9QUVUo8MRWYQ8j/y4pCdePxW XCEozN5DBVeKQia9EIfTYK+pP264U1RJXU1BcQlTvlqhoN0NZu/7OhX7q2JX+SA582bk Ki+xQau8y36PL9IGW5zHBzdjDa+9X/7xM0aqR77W89YwiHjBQk3/p8sMtJEBCEC4svSb MUrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=SlnzGQW7axixt5X911OZxQZrbiEKPn6lPxUyeOznze4=; b=Nv07VbBFZ5gDeHW/o3CKC5DAREWvkwNYB+DPl+HUeLbch+QuHlDdiBbo3LJm4OghVD X/WN40VrTS0XTlNEL6rl6UoDV9FEEtNdznkTZzU75xQ71lCtGncExDrmuYviprUBT9cZ yh88t8Pf8KKui3TxQvG8BvYAVi/lS8ewSGtqNSLl6QcX7OKk+hmIF8l99ba3tZpWohKz Bw8fJGL70oIJ8K76hoTKjKtBhDEv3YEE8tHvdcKAGilaf9D+fqmJWs6KWIoG4MIR0hd9 hnUuYoqlcI1qGoUx5rpYzfZNXew53ULK7Lnewv2j0WUrs97RLNYZMpdEDAbaUn1iGNxY ohxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=G+m6IC7F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g19si4262635eds.165.2021.08.12.14.47.00; Thu, 12 Aug 2021 14:47:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=G+m6IC7F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236036AbhHLUlO (ORCPT + 99 others); Thu, 12 Aug 2021 16:41:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:39358 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232796AbhHLUlN (ORCPT ); Thu, 12 Aug 2021 16:41:13 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DC46C610A8; Thu, 12 Aug 2021 20:40:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1628800847; bh=lTyo3EMRGZxkzDJQPlmoJfNWRHnKmZw70dp59KMeCIU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G+m6IC7F8tJFTgYWxuPfYaf5qn7EcwvIVJsTrQDsZO+TdvvtLxLtjyPhkMd8aOO56 qkjI+oBu4sCnFDc/QXPo5n3eWOEOA0ckEuW1Lzh/+RESjTc3mvssTAocMQPrifEdgq SrCjYFw+D4FvamI/m39Sg2WYPQbkOrsifSzTtHRCwpuQWRqQgZal0ZZj2hfzteB2QS 6UvFEaEkpIaMBtO17OzceyOhVP3f5+I+3tAPeua0ncvkOmtaquaZtHcD8ZTVmeShwJ cy/JuKCrPCNq/jrUZaiJu16iOvu8jXGykRhcfJqr+a85QyYkQ+i6wVxH3A+YTeMJ3u +Pr40Uz42YMDg== From: Nathan Chancellor To: Greg Kroah-Hartman , Phillip Potter , Larry Finger Cc: Nick Desaulniers , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Nathan Chancellor Subject: [PATCH 2/3] staging: r8188eu: Remove uninitialized use of ether_type in portctrl() Date: Thu, 12 Aug 2021 13:40:26 -0700 Message-Id: <20210812204027.338872-3-nathan@kernel.org> X-Mailer: git-send-email 2.33.0.rc2 In-Reply-To: <20210812204027.338872-1-nathan@kernel.org> References: <20210812204027.338872-1-nathan@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org After commit 987219ad34a6 ("staging: r8188eu: remove lines from Makefile that silence build warnings"), clang warns: drivers/staging/r8188eu/core/rtw_recv.c:499:8: warning: variable 'ether_type' is uninitialized when used here [-Wuninitialized] if (ether_type == eapol_type) ^~~~~~~~~~ drivers/staging/r8188eu/core/rtw_recv.c:458:16: note: initialize the variable 'ether_type' to silence this warning u16 ether_type; ^ = 0 1 warning generated. This if statement sets the exact same assignment as above so just remove it. Signed-off-by: Nathan Chancellor --- drivers/staging/r8188eu/core/rtw_recv.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c index 9b3637e49052..8df38db9572c 100644 --- a/drivers/staging/r8188eu/core/rtw_recv.c +++ b/drivers/staging/r8188eu/core/rtw_recv.c @@ -495,10 +495,6 @@ static struct recv_frame *portctrl(struct adapter *adapter, struct recv_frame *p /* allowed */ /* check decryption status, and decrypt the frame if needed */ prtnframe = precv_frame; - /* check is the EAPOL frame or not (Rekey) */ - if (ether_type == eapol_type) - /* check Rekey */ - prtnframe = precv_frame; } } else { prtnframe = precv_frame; -- 2.33.0.rc2