Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp478592pxf; Wed, 24 Mar 2021 08:52:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxoaliczq/NQap2XCGwVMXPCARa4qyozpTlziCjA8sqw11rYoCU72xSii/CuUr7qP8Peshe X-Received: by 2002:a17:907:2054:: with SMTP id pg20mr4447591ejb.213.1616601165468; Wed, 24 Mar 2021 08:52:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616601165; cv=none; d=google.com; s=arc-20160816; b=ga5ynQWhhAUyl6+/0QC7/iTv2Fw2Hlbk7gXrH/8hLwvalDx487+HwHoqgDHD/+A/yY xekGEuf0LpviE+h1jR5R1QKc4qMeqqBq5mwaX/4Jri6jRMmn+PO9XMBTMf1+jieL7mz1 qnI6gNNW/mSDP5yfQ6uiZrpcSJt1sTs5efUktI/UPzBi+PFqOFkmXE3qX/4acK0bG+ES biPG8rUNQte7aJ21lHLm9xd9L9oNfk3l4VsVa6NuEBZGGeLSefyt6Bm1+JhDwaOnM3fM dLjHqKm7e4x9C4a34ZbbT8Jzf91ttQlBPRdTRfcMxdoxuZjHZFD28VWJn5Z4Ks4aTZvr 7T1A== 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=G1l/7GKgxC7z3LCn+ZLNkyBsm6JDNMcpMQeWILgYaPA=; b=BETAyM6wt9HLyYXd6Pu0WpVs4FlJXDMKnZA9BhbMr5FIIKF/2d5SiXXgrujGphI7Vp juAumR6kbe/nyn12QIf+3KNx7EiIluYchme59n8s5jXdSEedg9lMBGoXXomSkL1xXmG/ od9HcYMGO9CUtKt87cLHVodv0m4+yLZ88tcAzAVfXPe96VhGPCGe3d9c1bx/aHDFpYyL Rcw1dujA+felN/40BEglQJIAfWzKFgLwRTx/1uQSsE/Hvhhpg2CsKRHyY4BrwVn6NLY1 G+RwChZ2yA+puPc7aNLGJTsBFXueDgT/swIumiTAsVhtowzE7n6ZQMv9prbbYV0IpVU4 vo7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=NeIspziN; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cd22si1958677ejb.384.2021.03.24.08.52.21; Wed, 24 Mar 2021 08:52:45 -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=@gmail.com header.s=20161025 header.b=NeIspziN; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236803AbhCXPu4 (ORCPT + 99 others); Wed, 24 Mar 2021 11:50:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236565AbhCXPuw (ORCPT ); Wed, 24 Mar 2021 11:50:52 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37CA9C061763 for ; Wed, 24 Mar 2021 08:50:52 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id z2so24976451wrl.5 for ; Wed, 24 Mar 2021 08:50:52 -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 :mime-version:content-transfer-encoding; bh=G1l/7GKgxC7z3LCn+ZLNkyBsm6JDNMcpMQeWILgYaPA=; b=NeIspziNKd3CbXe6b+FgHM9e6pQTnnSJJidiFBjXj3//O/y2gJhLgjArQGeu4DMLL6 mYOQJVfBAERgZdz7mjY3HbjVJm2+r0FOWrrDGb/b816eeayn900ULP8p8AjgGjw10oFO jJnjqktQm240XySnr0RnLGYqDDcvvmQsAO0JY0jHTy2Y7yPYLZKPOEKH6geI132ddzXK Ydvd72fy//89OwouThjOubdkKEQciJiJTiCy+xYNkDTzj4IKes5mAPBKr32JxA6UbkCB cv0azkG0pTm7KDzH57QRVz93fEEI/INTg3IsxTa0JCIEph9tQOWDch3q6wiqeIPPhGxZ pdsg== 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:mime-version:content-transfer-encoding; bh=G1l/7GKgxC7z3LCn+ZLNkyBsm6JDNMcpMQeWILgYaPA=; b=o/1+c+8VG9La7y8grdZzw/a4tZdlk3Owg6Bo40xWa8QVSr2Z56AsCZs+kDIaLrBiR7 iiur6tnd8WQb4WmhOF281AzaiPdj8FVTIRvPnX3Itvo0p9BHNBCPm/EeCDE6nz9XMw/r pZW1+xtSIloFpxvojHSXpBeCmNYPmfUd6GjhGPSwixj0yHG8kG3f5gTdWUhRJVO15xps v62T6AcuyKoRxKSs9A15QuP0Y9XSPah/FeTwsST4/oll5OCopf9q1U/MuoO15is2BCnP yQHAF2WenRqaVAj7I2wj8ZblDXpPf4qX7S5ODw6mTFHUAy5EWV7giNGI1qNRuPrKOGN0 uF/g== X-Gm-Message-State: AOAM533XjVdTMn2Gq3MOq5BO+EeMaoda4g/VXRWFvowHIihE2EbKpoFj Q9MERa3XJx5ShCdHwPxu45M= X-Received: by 2002:a5d:5051:: with SMTP id h17mr4186559wrt.80.1616601050936; Wed, 24 Mar 2021 08:50:50 -0700 (PDT) Received: from agape ([5.171.72.168]) by smtp.gmail.com with ESMTPSA id j30sm4105046wrj.62.2021.03.24.08.50.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 08:50:50 -0700 (PDT) From: Fabio Aiuto To: gregkh@linuxfoundation.org Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Fabio Aiuto Subject: [PATCH 1/3] staging: rtl8723bs: remove assignment in condition in core/rtw_ieee80211.c Date: Wed, 24 Mar 2021 16:50:34 +0100 Message-Id: <8e784a7e1407924724c97398af8e5aeb23460612.1616600897.git.fabioaiuto83@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org fix the following checkpatch warning: ERROR: do not use assignment in if condition 1118: FILE: drivers/staging/rtl8723bs/core/rtw_ieee80211.c:1118: + if ((addr = of_get_property(np, "local-mac-address", &len)) && Signed-off-by: Fabio Aiuto --- drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c index cccbea555a32..e931afc3ba22 100644 --- a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c +++ b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c @@ -1115,8 +1115,9 @@ void rtw_macaddr_cfg(struct device *dev, u8 *mac_addr) } if (is_broadcast_ether_addr(mac) || is_zero_ether_addr(mac)) { - if ((addr = of_get_property(np, "local-mac-address", &len)) && - len == ETH_ALEN) { + addr = of_get_property(np, "local-mac-address", &len); + + if (addr && len == ETH_ALEN) { ether_addr_copy(mac_addr, addr); } else { eth_random_addr(mac_addr); -- 2.20.1