Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp65165pxt; Thu, 5 Aug 2021 18:07:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxAK8Rg9EK4ahOBQJFc7Yvy5VIM/Wfaq0EP1Ry+VupCGp06ghJXlaD33HxmLBMWvnCJdfR6 X-Received: by 2002:a05:6e02:528:: with SMTP id h8mr484075ils.223.1628212050331; Thu, 05 Aug 2021 18:07:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628212050; cv=none; d=google.com; s=arc-20160816; b=cb+rdbQD2Gz4ktbHTFH2H+frALfYrO+dd9esPVF5sZ5G1/1qEDALMO3D9D9dHtfl9C 3vmc6u98A0gjwS5bcwjBT72G2+SKGZqfKJACvHUEu3896gcEELT3OBGIPPXhqQvRTx6l V8sFZ236Ww7Uz+CNDIIY8QMCe7TGarqedXRQVFbrr9m3Bo74uX1kyLdSn8rDUutDretK ZPIT4Q5GXeFdWVdDwEEmick17byrE70Cx1/JtAqzr3EAjz1RmN/NhCAIkh+HjQK480k0 3X9tZJNnOzKGR6HQsPe8xyUWWcwQkbx3s5TCW83mT5WmFqZ76gSJ+QORa4nkrmEEuQVD MSGA== 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=35jWZ7dDHzm8jD3oTFwS3u//6BtMsv+qqFrBb1S4mCs=; b=JfC+7ZE0qZVmZ2CnqB0MQeB4nEw0LZppFvRzHL4NoDzFSOt07RMbkIXAnnG3NeEvNo 6M8jLF3fOWvg8UnVTSsjWyhCdLxj47ksFYDJS58mXk7xXzMfkret0PvoJwN5QbtjK8HR vjayMn7PPgqhwIO2sQQ82Yf1dlT67/ZoCB6IBEqV1Fsx6e7mNa+IyAMQ9C5Qd+HwKu8o 6uBjDckbku+XZR+UG8i91rptdPEqie1qNr5iUg+9N4s3W9nxmJ1o+bJU4JktAhcEo3Q4 eGZh5kgkT0jMkuDEtcvJ3jpcm9pJk8pqnJTf/RIYkZe9Zv31jS/e8hNH5RWc5ZU/7ngH wT8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gWLNpI6b; 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 u3si7845485ilk.94.2021.08.05.18.07.17; Thu, 05 Aug 2021 18:07:30 -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=gWLNpI6b; 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 S242093AbhHES7E (ORCPT + 99 others); Thu, 5 Aug 2021 14:59:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:45014 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242107AbhHES7A (ORCPT ); Thu, 5 Aug 2021 14:59:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 31F1460F01; Thu, 5 Aug 2021 18:58:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1628189925; bh=IqXLzr/OLEXLF6zqTtqsk+B9+EiwaEbC1W4SSsIHGbI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gWLNpI6bhAYguYTIQlQYzBZMdJBcsm4IqY+fuRonMlyBqdFvEEQ0gBr5TrgbEDhnp j7L6VeeNWuOOoIzJ7qSB0fkKEruZktIoytGmvw/I3CriKPvjqXPDHbJLt+ycGe2X7B qh2XdyltJCTvJvwDYJgzOOptlXHH7LxAaPSEehpTOHf8uvVmBK0h2X9pGwvBxh97sq KfyE0NsSn8NUwFOqztp6sf215ukakymtn8dZtllUVpJ+Fuz2apCzDorNrEvwAzW0SH b/T1Q4CpO8CiLakpMFTOK818jjUoVauUGlpbScwOfGBLL0IhJOqXApd1Nr5o30eDUn hh8mjjS5lXOEg== 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 v2 3/3] staging: r8188eu: Remove pointless NULL check in rtw_check_join_candidate() Date: Thu, 5 Aug 2021 11:58:07 -0700 Message-Id: <20210805185807.3296077-4-nathan@kernel.org> X-Mailer: git-send-email 2.33.0.rc0 In-Reply-To: <20210805185807.3296077-1-nathan@kernel.org> References: <20210803223609.1627280-1-nathan@kernel.org> <20210805185807.3296077-1-nathan@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Clang warns: drivers/staging/r8188eu/core/rtw_mlme.c:1629:28: warning: address of array 'pmlmepriv->assoc_ssid.Ssid' will always evaluate to 'true' [-Wpointer-bool-conversion] if (pmlmepriv->assoc_ssid.Ssid && pmlmepriv->assoc_ssid.SsidLength) { ~~~~~~~~~~~~~~~~~~~~~~^~~~ ~~ 1 warning generated. Ssid is an array not at the beginning of a struct so its address cannot be NULL so remove the check. Signed-off-by: Nathan Chancellor --- drivers/staging/r8188eu/core/rtw_mlme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme.c b/drivers/staging/r8188eu/core/rtw_mlme.c index e3d5a721d25c..95b952871e67 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme.c +++ b/drivers/staging/r8188eu/core/rtw_mlme.c @@ -1622,7 +1622,7 @@ static int rtw_check_join_candidate(struct mlme_priv *pmlmepriv } /* check ssid, if needed */ - if (pmlmepriv->assoc_ssid.Ssid && pmlmepriv->assoc_ssid.SsidLength) { + if (pmlmepriv->assoc_ssid.SsidLength) { if (competitor->network.Ssid.SsidLength != pmlmepriv->assoc_ssid.SsidLength || memcmp(competitor->network.Ssid.Ssid, pmlmepriv->assoc_ssid.Ssid, pmlmepriv->assoc_ssid.SsidLength)) goto exit; -- 2.33.0.rc0