From patchwork Mon Jun 19 15:09:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Straube X-Patchwork-Id: 110069 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3074410vqr; Mon, 19 Jun 2023 08:14:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4vatcwYfeBmvnmbIN2+oP6PwOz7rxwj2Y+zy55GVEhCG+E0V0ndf1na149EgOmLcxPnrAZ X-Received: by 2002:a17:902:ed8c:b0:1b3:a646:95dc with SMTP id e12-20020a170902ed8c00b001b3a64695dcmr910230plj.53.1687187697956; Mon, 19 Jun 2023 08:14:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687187697; cv=none; d=google.com; s=arc-20160816; b=ucclygBpqPAAz10DyTFJHdR4wimKRRI8oEaMK+5TjDu691ruqB9Jjh6kJaaQazgFO8 t4QsOmThl7YJ/QrpKNEM9pgJRrtZbW1ytUb6yjWCXuxoklMja1+5KAm6bX4qkQwfhPSp I+ITriHwAHd6L2SGfs++XvsHGrqfw4axcTRKEMeqZwVzL8LhBmEgmgd1YreW4apY6iBN dfPPFI+nfAudfcL6NGfXDBjbENgGJINcf99jatHKmArAD5Wb3emKxp8PHdjdSoXWFuf4 Rh5G7yIlv5AK/7cnH7yqRUEc3a4pwikdXWk/FGuTGgT2TPqeOijjgfzMiacV0HEJOK8N L88g== 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=lQqWKTsadGM4IA7NNaSI9I45VeGk8Yh+tmcH6FyzFNE=; b=W87K0pKEw2PAT/9WBFTh0LEz6HglVXgQJVrI6eckHXlrYa6SwZ6EKfpxhKSLYZ8wU1 OhwzOYXBRhRIbxwKT4AZa1HQbqGi+J2GU4VtlLp+8J2DRlboh5U8LtGoJv0A5osgc3lw vnQCGYfycokS1iPvn+8AF0RzO4fX1MJZBKNR0lQkbvLxbf4qK8LL1GSAFmKEElYUN8OZ veH5j2ynr/2GDcuO/OGMzX3/ABbzpz/msb+lIAmWLh6nTT15uonT+93c1g8Bo1bCM+cB 3xVGnXDJqinuQ4ysY8lTqzGep5SDnMEUg4qIBJNwUe9YX1yVvI6Y/M+Wk3et21X59xlp iZVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=JHlNw2Ry; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ji21-20020a170903325500b001b036adfdf7si11171plb.107.2023.06.19.08.14.43; Mon, 19 Jun 2023 08:14:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=JHlNw2Ry; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S230284AbjFSPKU (ORCPT + 99 others); Mon, 19 Jun 2023 11:10:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229657AbjFSPKH (ORCPT ); Mon, 19 Jun 2023 11:10:07 -0400 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31EDAC2 for ; Mon, 19 Jun 2023 08:10:06 -0700 (PDT) Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-519274f7b05so4863439a12.3 for ; Mon, 19 Jun 2023 08:10:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687187404; x=1689779404; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lQqWKTsadGM4IA7NNaSI9I45VeGk8Yh+tmcH6FyzFNE=; b=JHlNw2RyBWoUL/sErR78SZSPa75mtmwBlcmoNP2bL0W7lnYa0ONfKZp6x/l1BbuEer 9EcXj7B6c/m6LmZ8NwsnvAdPC2hhon2df7Jksh6mpQie0htEKef32nOpk19NN/5GeN7j hMp2pqCPGiYrKkYKcKSiiFUhh9z5XR4N9y/zIFmN/y3c3ua4dx4lVPF0f6+42B5yiIrv aqS2Gtadueh68UeeKmRcemzyE7fxSMx3ngQkeRl20kUmDq5JhIwwbnG7YxmI0hSbjY4l 7umb0YWJwMuNeC2CkJS8mofy6ScwCtVN1TIydbXeYuVyZhWiKulydwufiUF9fYFMPwkr IRzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687187404; x=1689779404; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lQqWKTsadGM4IA7NNaSI9I45VeGk8Yh+tmcH6FyzFNE=; b=MWf2RVIW8SKTj/giqd2G7lO1lPZdopqSbyWuhk8exbwLy4tv9GpGPn7NhsC6FxF2kL PU6ixNUZHLb5aPlrPFJ8k94MXNpJX88Dyf17rsG4bT/ApDHpUVvxFZgULPkFHVh7Q88T Zvv9HGqxcW6tUleo/viG7h6NK6n7ujeiGj4g/gLG2u0MILcvQneGk/Iy9oDJeO+BNv4r 6PQMACwYyg+PzPWeGxRByvl2nQFcVPZ7knCw0Y4OJl8ia2u1WDkajLvZIqzg7cJMUGWf Ub4/r+XtTN3pZvfzMURm9/8qE7DhOCh7GFglMYzNCk2EnWvw/EK1MIc3r31zAuU9GzFj P5jA== X-Gm-Message-State: AC+VfDzBRAdVwsM6DCy3V30aOvh+sjIpIqXv4OgZ5P5A5BPcj/JmSxCf WrBjCmetmd1rMguDfdMAZFConX6Bpj4= X-Received: by 2002:a05:6402:2cd:b0:518:72b8:1fe9 with SMTP id b13-20020a05640202cd00b0051872b81fe9mr6804650edx.25.1687187404670; Mon, 19 Jun 2023 08:10:04 -0700 (PDT) Received: from localhost.localdomain (ip5f5abbd5.dynamic.kabel-deutschland.de. [95.90.187.213]) by smtp.gmail.com with ESMTPSA id p6-20020a056402044600b0050488d1d376sm13297186edw.0.2023.06.19.08.10.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jun 2023 08:10:04 -0700 (PDT) From: Michael Straube To: gregkh@linuxfoundation.org Cc: philipp.g.hortmann@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Michael Straube Subject: [PATCH 1/4] staging: rtl8192e: clean up brace coding style issues Date: Mon, 19 Jun 2023 17:09:50 +0200 Message-ID: <20230619150953.22484-2-straube.linux@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230619150953.22484-1-straube.linux@gmail.com> References: <20230619150953.22484-1-straube.linux@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769144527330918355?= X-GMAIL-MSGID: =?utf-8?q?1769144527330918355?= Clean up brace coding style in if/else statements to improve readability and clear checkpatch issues. CHECK: braces {} should be used on all arms of this statement CHECK: Unbalanced braces around else statement Signed-off-by: Michael Straube --- .../staging/rtl8192e/rtl8192e/r8192E_dev.c | 3 ++- .../staging/rtl8192e/rtl8192e/r8192E_phy.c | 10 +++++--- drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 3 ++- drivers/staging/rtl8192e/rtl8192e/rtl_ps.c | 3 ++- drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 4 +-- drivers/staging/rtl8192e/rtllib_softmac.c | 25 +++++++++++-------- drivers/staging/rtl8192e/rtllib_softmac_wx.c | 4 +-- 7 files changed, 30 insertions(+), 22 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c index 7683853e7c46..e5925899402c 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c @@ -765,8 +765,9 @@ void rtl92e_link_change(struct net_device *dev) ; else priv->receive_config = reg |= RCR_CBSSID; - } else + } else { priv->receive_config = reg &= ~RCR_CBSSID; + } rtl92e_writel(dev, RCR, reg); } diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c index 7b0da55fa7aa..24180670ea0b 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c @@ -39,8 +39,9 @@ void rtl92e_set_bb_reg(struct net_device *dev, u32 dwRegAddr, u32 dwBitMask, BitShift = _rtl92e_calculate_bit_shift(dwBitMask); NewValue = (OriginalValue & ~dwBitMask) | (dwData << BitShift); rtl92e_writel(dev, dwRegAddr, NewValue); - } else + } else { rtl92e_writel(dev, dwRegAddr, dwData); + } } u32 rtl92e_get_bb_reg(struct net_device *dev, u32 dwRegAddr, u32 dwBitMask) @@ -163,10 +164,10 @@ void rtl92e_set_rf_reg(struct net_device *dev, enum rf90_radio_path eRFPath, _rtl92e_phy_rf_fw_write(dev, eRFPath, RegAddr, New_Value); - } else + } else { _rtl92e_phy_rf_fw_write(dev, eRFPath, RegAddr, Data); + } udelay(200); - } else { if (BitMask != bMask12Bits) { Original_Value = _rtl92e_phy_rf_read(dev, eRFPath, @@ -175,8 +176,9 @@ void rtl92e_set_rf_reg(struct net_device *dev, enum rf90_radio_path eRFPath, New_Value = (Original_Value & ~BitMask) | (Data << BitShift); _rtl92e_phy_rf_write(dev, eRFPath, RegAddr, New_Value); - } else + } else { _rtl92e_phy_rf_write(dev, eRFPath, RegAddr, Data); + } } } diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c index adb6f12c89d8..37c275cac40b 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c @@ -622,8 +622,9 @@ static void _rtl92e_dm_tx_power_tracking_callback_tssi(struct net_device *dev) } else if (priv->rtllib->current_network.channel != 14 && priv->bcck_in_ch14) { priv->bcck_in_ch14 = false; rtl92e_dm_cck_txpower_adjust(dev, priv->bcck_in_ch14); - } else + } else { rtl92e_dm_cck_txpower_adjust(dev, priv->bcck_in_ch14); + } } if (priv->cck_present_attn_diff <= -12 || diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c b/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c index 5ecade840d75..1c49d5da68eb 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c @@ -219,8 +219,9 @@ void rtl92e_leisure_ps_enter(struct net_device *dev) if (priv->rtllib->ps == RTLLIB_PS_DISABLED) _rtl92e_ps_set_mode(dev, RTLLIB_PS_MBCAST | RTLLIB_PS_UNICAST); - } else + } else { psc->LpsIdleCount++; + } } } diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c index 4436442b56dd..b680757cfcf6 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c @@ -568,9 +568,9 @@ static int _rtl92e_wx_set_frag(struct net_device *dev, if (priv->hw_radio_off) return 0; - if (wrqu->frag.disabled) + if (wrqu->frag.disabled) { priv->rtllib->fts = DEFAULT_FRAG_THRESHOLD; - else { + } else { if (wrqu->frag.value < MIN_FRAG_THRESHOLD || wrqu->frag.value > MAX_FRAG_THRESHOLD) return -EINVAL; diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index 7494c7e6fff6..a47614c837ce 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -809,8 +809,9 @@ static struct sk_buff *rtllib_probe_resp(struct rtllib_device *ieee, erpinfo_content = 0; if (ieee->current_network.buseprotection) erpinfo_content |= ERP_UseProtection; - } else + } else { erp_len = 0; + } crypt = ieee->crypt_info.crypt[ieee->crypt_info.tx_keyidx]; encrypt = ieee->host_encrypt && crypt && crypt->ops && @@ -1383,9 +1384,9 @@ static void rtllib_associate_step1(struct rtllib_device *ieee, u8 *daddr) skb = rtllib_authentication_req(beacon, ieee, 0, daddr); - if (!skb) + if (!skb) { rtllib_associate_abort(ieee); - else { + } else { ieee->link_state = RTLLIB_ASSOCIATING_AUTHENTICATING; netdev_dbg(ieee->dev, "Sending authentication request\n"); softmac_mgmt_xmit(skb, ieee); @@ -1408,9 +1409,9 @@ static void rtllib_auth_challenge(struct rtllib_device *ieee, u8 *challenge, skb = rtllib_authentication_req(beacon, ieee, chlen + 2, beacon->bssid); - if (!skb) + if (!skb) { rtllib_associate_abort(ieee); - else { + } else { c = skb_put(skb, chlen + 2); *(c++) = MFIE_TYPE_CHALLENGE; *(c++) = chlen; @@ -1439,9 +1440,9 @@ static void rtllib_associate_step2(struct rtllib_device *ieee) ieee->softmac_stats.tx_ass_rq++; skb = rtllib_association_req(beacon, ieee); - if (!skb) + if (!skb) { rtllib_associate_abort(ieee); - else { + } else { softmac_mgmt_xmit(skb, ieee); mod_timer(&ieee->associate_timer, jiffies + (HZ / 2)); } @@ -1583,11 +1584,12 @@ inline void rtllib_softmac_new_net(struct rtllib_device *ieee, net->ssid_len = net->hidden_ssid_len; ssidbroad = 1; } - } else + } else { ssidmatch = (ieee->current_network.ssid_len == net->ssid_len) && (!strncmp(ieee->current_network.ssid, net->ssid, net->ssid_len)); + } /* if the user set the AP check if match. * if the network does not broadcast essid we check the @@ -2536,8 +2538,9 @@ static void rtllib_start_ibss_wq(void *data) ieee->current_network.rates[3] = RTLLIB_BASIC_RATE_MASK | RTLLIB_CCK_RATE_11MB; - } else + } else { ieee->current_network.rates_len = 0; + } if (ieee->modulation & RTLLIB_OFDM_MODULATION) { ieee->current_network.rates_ex_len = 8; @@ -3119,10 +3122,10 @@ void notify_wx_assoc_event(struct rtllib_device *ieee) return; wrqu.ap_addr.sa_family = ARPHRD_ETHER; - if (ieee->link_state == MAC80211_LINKED) + if (ieee->link_state == MAC80211_LINKED) { memcpy(wrqu.ap_addr.sa_data, ieee->current_network.bssid, ETH_ALEN); - else { + } else { netdev_info(ieee->dev, "%s(): Tell user space disconnected\n", __func__); eth_zero_addr(wrqu.ap_addr.sa_data); diff --git a/drivers/staging/rtl8192e/rtllib_softmac_wx.c b/drivers/staging/rtl8192e/rtllib_softmac_wx.c index be82f0a655e8..783948fd67ca 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac_wx.c +++ b/drivers/staging/rtl8192e/rtllib_softmac_wx.c @@ -231,9 +231,9 @@ int rtllib_wx_set_rts(struct rtllib_device *ieee, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { - if (wrqu->rts.disabled || !wrqu->rts.fixed) + if (wrqu->rts.disabled || !wrqu->rts.fixed) { ieee->rts = DEFAULT_RTS_THRESHOLD; - else { + } else { if (wrqu->rts.value < MIN_RTS_THRESHOLD || wrqu->rts.value > MAX_RTS_THRESHOLD) return -EINVAL; From patchwork Mon Jun 19 15:09:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Straube X-Patchwork-Id: 110072 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3078656vqr; Mon, 19 Jun 2023 08:21:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7/pO9PHHGmM1rNJJLC/tRHZgYRVpW5gk3eGJhS/XtsrJf9L0KJeiwiDhaBeT68eaHQnQMg X-Received: by 2002:a17:902:a3c7:b0:1b4:fd48:d734 with SMTP id q7-20020a170902a3c700b001b4fd48d734mr6661716plb.47.1687188091693; Mon, 19 Jun 2023 08:21:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687188091; cv=none; d=google.com; s=arc-20160816; b=Pa+6dwCzeS7TrBr7QKfmnsKG/UGRsBQAVvLKZ3GyLPCEgKeVacpvufZs6m1aJ74IRa BG60J+aIK/dRqq5YrsycSd3qt6c8eK7AY4PYm+Eykkz8Hna4GnFKN56QLMU/H/9Gmy1H Oea0ZwiaiZ4Ac9O3I+XmMl6OdkoA52qxD3okKgQtmh/Oii4XzKvF54tYhuNujMzLl7LU xfPqiD9kuqmwctlXx+DLZivnnODzv9CHD+dFTd1PXcGF22khcUPffmuqTH1P/tVH+6sQ l0bkVztEn3cRh/pJHJkAlRgvtNtIWsNvJSHJk58+uO/fpj4ID7G8CL0olHyUx3iF/gIM wYCg== 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=KEaQN5x4Wxywu5DRGerlvVJNwGjReSSnSGgqsLpGfq8=; b=Xu/k03adVYZluNI1gEYP5BNMbxGMBjyaUqDy2UQZZerQoz0MNjBzucxcOxQr3tFKoO EwcTECWEElrVzNldX5eI+EKnOaReqlR0ijoKVp/mm0/vh1gKTLAriNOuTGP7Bxzfnens ftG898Es+g1QFaCFBgrvKQo4bukPo3eBlQYEssQM3+t1SvVkM4w/ixBAFS1BCIVXeRPK Q77MeTI9p5A8KZXz9BMdGXmk6zxWGeDtxpJxB5ilxVuA4XGHp0/1YD+eIWWVIKqfzQDR +xe4cKLA+XYGy82WNVoqwuDpbIBhwoymHWLJSICes15bQXalQds+UKVMhn9z642Gt+i/ nl/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=RPt8uIPW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u16-20020a170902e81000b001a94b91f402si3278plg.218.2023.06.19.08.21.18; Mon, 19 Jun 2023 08:21:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=RPt8uIPW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S230417AbjFSPKX (ORCPT + 99 others); Mon, 19 Jun 2023 11:10:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229806AbjFSPKI (ORCPT ); Mon, 19 Jun 2023 11:10:08 -0400 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F6D59B for ; Mon, 19 Jun 2023 08:10:07 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-4f866a3d8e4so2630480e87.0 for ; Mon, 19 Jun 2023 08:10:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687187406; x=1689779406; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KEaQN5x4Wxywu5DRGerlvVJNwGjReSSnSGgqsLpGfq8=; b=RPt8uIPW6Z1I8YsH+/4gGjf0coJJvCyrShdrTfreq02XGa44yMc4IRgwBtAIVfG7Sl qwMmN7FMMFw9wCZGht7sIWTqD9T+cFXqNqLVfiGkZcbsmFAC4eNxzTfJYrJoTADVa+cQ B9RdCqbWEDDEBrolg3fidkt+ooGT5anjwastHqnb6Eubr8Ff51O6/uuQ7FfSiiynmVHf +Azn0Bm82yG/+vPWJUtget0XUxX22Yt7lkfCUn5rCtd8CwBxfH4G4bEJZupfcXZZTFYM EUXWFnME/0fehi4NmXwkML8S63PbG3kKJxxvJ7hYnoSYHT8vCLzamjfXTfiuCXNm/opX JcwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687187406; x=1689779406; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KEaQN5x4Wxywu5DRGerlvVJNwGjReSSnSGgqsLpGfq8=; b=iHQiC/jv2S2O4lIL8WQobi9DTNRie7UBPwXpKxM4d5GCT15K1CWXAJbBGaCGSxm7ru MtyNmKhIp0wbEe985LkkcX8dV1s2b4xBETymzLYCKShsF9h4r0DPbsn07UOaUjaRuuWu gf+/KpS5XuBg2xyG797J5voHE7WrIf+P9VKafd9dgzm88e6t0cyUx4KYk7x+BJBzM0B8 T6hY99bmmdIObcXX8r5daajN9MEsSuIg2Mh5tpL5REd3AougqaojmafWPRWRauCrW1n5 cLfa3BWuQFYP5z6AHe/HR7dj8Qj0g/1f3G4mYmrJyW73rREMqZAaq04nD8OnkvC+LAxj MstQ== X-Gm-Message-State: AC+VfDxecQCPo/vZuXTUWeMLXl4li/WXBMQaOtAM440Bb3mhPiH31E2Y O1co+LtxB+XkKyaV7h4m6J5p9T6hPGg= X-Received: by 2002:a05:6512:47a:b0:4f8:7494:17d7 with SMTP id x26-20020a056512047a00b004f8749417d7mr1260966lfd.59.1687187405320; Mon, 19 Jun 2023 08:10:05 -0700 (PDT) Received: from localhost.localdomain (ip5f5abbd5.dynamic.kabel-deutschland.de. [95.90.187.213]) by smtp.gmail.com with ESMTPSA id p6-20020a056402044600b0050488d1d376sm13297186edw.0.2023.06.19.08.10.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jun 2023 08:10:05 -0700 (PDT) From: Michael Straube To: gregkh@linuxfoundation.org Cc: philipp.g.hortmann@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Michael Straube Subject: [PATCH 2/4] staging: rtl8192e: convert else if sequence to switch Date: Mon, 19 Jun 2023 17:09:51 +0200 Message-ID: <20230619150953.22484-3-straube.linux@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230619150953.22484-1-straube.linux@gmail.com> References: <20230619150953.22484-1-straube.linux@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769144940155558345?= X-GMAIL-MSGID: =?utf-8?q?1769144940155558345?= Convert a sequence of else if statements that all check the same variable to a single switch statement. With a switch statement it is easier to see what is going on. Additionally this clears a checkpatch warning. WARNING: braces {} are not necessary for any arm of this statement Signed-off-by: Michael Straube --- drivers/staging/rtl8192e/rtllib_softmac.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index a47614c837ce..7b3cbe28e562 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -2830,15 +2830,19 @@ void rtllib_start_protocol(struct rtllib_device *ieee) * attempts does not fail just because the user provide the essid * and the nic is still checking for the AP MAC ?? */ - if (ieee->iw_mode == IW_MODE_INFRA) { + switch (ieee->iw_mode) { + case IW_MODE_INFRA: rtllib_start_bss(ieee); - } else if (ieee->iw_mode == IW_MODE_ADHOC) { + break; + case IW_MODE_ADHOC: rtllib_start_ibss(ieee); - - } else if (ieee->iw_mode == IW_MODE_MASTER) { + break; + case IW_MODE_MASTER: rtllib_start_master_bss(ieee); - } else if (ieee->iw_mode == IW_MODE_MONITOR) { + break; + case IW_MODE_MONITOR: rtllib_start_monitor_mode(ieee); + break; } } From patchwork Mon Jun 19 15:09:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Straube X-Patchwork-Id: 110075 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3085067vqr; Mon, 19 Jun 2023 08:32:41 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7/IXwaH6B3uvBrHwqN0tvQ+B3a0NrWEIxRIRR1AvErVo6NrWBNPiBewC6byWmiD0yEGXip X-Received: by 2002:a17:903:22c4:b0:1b3:d25a:5ece with SMTP id y4-20020a17090322c400b001b3d25a5ecemr6955569plg.31.1687188761171; Mon, 19 Jun 2023 08:32:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687188761; cv=none; d=google.com; s=arc-20160816; b=Zy4EWeYhpfF/6AVjSLjmrrHJ1ZQJYWnfP68oOMh+oLNVUDSo7tzRmQwIaaUn/wPl2j L8Vjz5nXWNSOnVpQC5GTTLv6ZfXUVgdMvO5CgOzPTcxrqm+avAV44jd1PiMU22SczKcE cJnTFjmHCtJZQEQQC3OK25MbYgX2o/8ldEcQrUOPcfyPvy5cw1jbIb/4AUsATd1eIHHh 4xiXfhXffQhsSTKaS4H8ZVckTsUOJYkZoqZdCw9Q4hdWvwpXJDlzxtkjwzrWMOfhgmWT o+vU7LI7BHSKVMPRx3FMoC8L6F82MyNHpBdFMa1vj/RQjmLW1MZeMzYa6lH97RAbu1El z27g== 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=snu+S5y4+SEbvZxuNqaJKxNoj771q1fsuo3zQR1oJlc=; b=NQT7FBsnS0cRB6HgMc7Xch1MfbcATNAeyTuUVatqXYLzeO05/1/c+3a2YDT4lTu8UB Rf1qPUucrwzOHEUGzVRJ/yfmBOiyglDMl5NVrG0JT4/jbF8awLArK7OfKWijx3rl6Z0U eppWzDOlqlKODrWJNsRyqyi8OLHL9rIdMh/nT8Z9Zn+mrm73CWOeGAiYvBC0GCMU31fK ZNDDS1aTFLcH7yIbdg9PuioB4/4fGn5HoX8EStMtOlcTXJxQlxrPmS7szmhbZIS1D/Fm M7anpD3JYhBAVoz+q8fCNG4Hk/gXwCsrBilk119c1nzRhpPmrcBJTdb3Y6SyCLwmioNO QxXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="XW/t5IoD"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e10-20020a170902e0ca00b001adb857fc79si47103pla.105.2023.06.19.08.32.27; Mon, 19 Jun 2023 08:32:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="XW/t5IoD"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S230509AbjFSPK0 (ORCPT + 99 others); Mon, 19 Jun 2023 11:10:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229808AbjFSPKI (ORCPT ); Mon, 19 Jun 2023 11:10:08 -0400 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E5C3AD for ; Mon, 19 Jun 2023 08:10:07 -0700 (PDT) Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-5187aa18410so3682543a12.0 for ; Mon, 19 Jun 2023 08:10:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687187406; x=1689779406; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=snu+S5y4+SEbvZxuNqaJKxNoj771q1fsuo3zQR1oJlc=; b=XW/t5IoD5oqI+Vp+Gl3zbLsWvZdsIRxACNRjO6CSI8qrSw6uMY8OMl2ObU5ogfm8Jd kFPxcrhVvDpKqg8Oc4lHvP+UnbhL7iMvu7VNoj2QJcOF1J8OqILf24OKTsaKbt6HdcUA gBqWMDIusLDXq+qIhvHVgJPXrnxYmPHnZ4+p8JXaYIbZyxk4x9SgYUHiRU1RmujvhLRA Rcz9+E6LWceMrPFUru4iqnVJaokucWJzy6FgsiA0EdCcvklgV8J0k1BN2NTFYN+F6ydu zVLdWd4VL7wpKuSAuf7T3/xv+SXkLVSNEt2DFMtVIowRlb/JkhWhKGbG7+hTqX60zLOq QtAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687187406; x=1689779406; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=snu+S5y4+SEbvZxuNqaJKxNoj771q1fsuo3zQR1oJlc=; b=NVdavCN84Fd3p28SQvtX+MsTH6p7Ujbc0MgoCic/tQBHsGo8Yv5JSIGJH3M8svybxn 3A/B/lakrIuN5/BdF6r3y/sRc7mGRsMpyC84Elx55Ach2SXk10CHv9xHnuvPijjXEKoi xx7b9G7xHlFRlwWonmZUuK5xLD9RRjPYrMpYU5XfqPyD+0BIYSqwVb4L4yd0K297+Icl 2hgpiKitEpbz3k+heB6fgj9qkbHWCtxZMgnf/ZorubYGjgczgeUpUk+2afo3srYt4iV9 K2/qHFwwPTKuly1eQE5MOajh/52ENgkxChTKdwIqqpwLvT9u3wkbOlXGka9CLFAfK3kD zCLw== X-Gm-Message-State: AC+VfDzUHS6JuzGNlV0b4IuxYz/A5Z/1bttc26mXI0eCRzr0j7paljzQ 67cpOI4VM8uHL3xMis0Fji9ewe19IKo= X-Received: by 2002:aa7:db89:0:b0:51a:265a:8fca with SMTP id u9-20020aa7db89000000b0051a265a8fcamr5143511edt.27.1687187405909; Mon, 19 Jun 2023 08:10:05 -0700 (PDT) Received: from localhost.localdomain (ip5f5abbd5.dynamic.kabel-deutschland.de. [95.90.187.213]) by smtp.gmail.com with ESMTPSA id p6-20020a056402044600b0050488d1d376sm13297186edw.0.2023.06.19.08.10.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jun 2023 08:10:05 -0700 (PDT) From: Michael Straube To: gregkh@linuxfoundation.org Cc: philipp.g.hortmann@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Michael Straube Subject: [PATCH 3/4] staging: rtl8192e: remove return statement from void function Date: Mon, 19 Jun 2023 17:09:52 +0200 Message-ID: <20230619150953.22484-4-straube.linux@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230619150953.22484-1-straube.linux@gmail.com> References: <20230619150953.22484-1-straube.linux@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769145642479755729?= X-GMAIL-MSGID: =?utf-8?q?1769145642479755729?= Remove unnecessary return statement from the void function rtl92e_config_mac(). Issue found by checkpatch. WARNING: void function return statements are not generally useful Signed-off-by: Michael Straube --- drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c index 24180670ea0b..b0857c5709dd 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c @@ -268,7 +268,6 @@ void rtl92e_config_mac(struct net_device *dev) rtl92e_set_bb_reg(dev, pdwArray[i], pdwArray[i + 1], pdwArray[i + 2]); } - return; } static void _rtl92e_phy_config_bb(struct net_device *dev, u8 ConfigType) From patchwork Mon Jun 19 15:09:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Straube X-Patchwork-Id: 110077 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3088247vqr; Mon, 19 Jun 2023 08:38:14 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5L8qAzn8n2GjIIap4jm+BcnQBvMvrA8SjneacC45AOjJ3fYJG22NRggOKfsJYoTCAY20gu X-Received: by 2002:a05:6808:6243:b0:394:45ad:3ea7 with SMTP id dt3-20020a056808624300b0039445ad3ea7mr10602437oib.5.1687189093756; Mon, 19 Jun 2023 08:38:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687189093; cv=none; d=google.com; s=arc-20160816; b=p5ap6axIpneH5bpgk0pEC/onkn/aWNPbZSenIIlwH3rwQpbrRlz8izHuHWaj24mW9i BRpDPCMg/ClG1YUTin6Xd5axmIUMUAQAMo62oRB+abJlHt9jwjP7KALFxhs0F7KS5QfF 5j8Z+qem5BbBxERzkF/QODgQPpCDaGg6XhKGhHw0NMfftAmcqnfVqliJLT8hCtbn4ow+ BeJDl+QpnuPpBRojzN+BazEnUcKBcuIsLlbNJPesfX/di5VCcyFOMU0GCQ4XeZ/nPpd6 skfWXXEayN0XfhxEgaOZ4tccfmPP+7TomCz9h59SKja5hoN9xjStaoO0OjBeQzyrYXsH DrEA== 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=09Nls6tXLgOvm0ng8/7m8dRNZ/h0ThOPEUKr3YHTZzs=; b=xfuxvQjZWOsze3LYBoMqk8NFhe8gIaHDO1L61pTyx6Z7Xt2cvGUMqc27r+/kqPDfjj 8st9USY8qqe38DLO1InYGQUUbg0Zmv2L15vfz+Mw2TflE4QhuQ+ilP5t41XerzYxGQlB ZzUYh93aYjZ4Zd66ZUr+JEb1CX0sUjn2DiI97zt5e2THcGv1bLm/s8tTCfKEA3oj9T8A TU8k7kXiS00nn88+rjlWLR3khdQzWZgNgWKJLl+Qu9DYIPjTaOvsawuyFowqQToaMn0n VdzDpuIw8mtKRpQAC0ZdEmUupDr2fydjMIQuUePiVY9wdJHzoPV3PdjczocPbC+AeW2r Cmmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=pme+MsdX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v12-20020a63b94c000000b0051b554df1c2si21886627pgo.497.2023.06.19.08.37.59; Mon, 19 Jun 2023 08:38:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=pme+MsdX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231136AbjFSPK1 (ORCPT + 99 others); Mon, 19 Jun 2023 11:10:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229824AbjFSPKJ (ORCPT ); Mon, 19 Jun 2023 11:10:09 -0400 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FA6FCF for ; Mon, 19 Jun 2023 08:10:08 -0700 (PDT) Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-519608ddbf7so3694011a12.2 for ; Mon, 19 Jun 2023 08:10:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687187406; x=1689779406; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=09Nls6tXLgOvm0ng8/7m8dRNZ/h0ThOPEUKr3YHTZzs=; b=pme+MsdXK1u77Qcjve1hUQzq86C1M6dYAPy1m3hfdiAtb72eyv2TOoLP6TWC9DPPSg me1SSIX9+gs9DZl/C0tp0aap+CN0oV07PPnIZNPnqcbjhzEkZqekyXN/me6HPs70P0z8 hwDeeCACZLSSq0s1dErFwVZo6S5ESwUrlFxobMlVtoX8wPqdB4pQVHPCBHhWJ9KaPDSU fN1MxkXkZY6gMQvzxetHaBMvQY3SjmkQ0uulHc2Ht1J3f8sN67MuTaweNkXBM7GfB2AY pRFJKzNVAEzdL5akaO0o8yL49L/CV/+D6XJxH7+BFAy4Y4dYhXL+52aNZacdCfn9vR2o 2opA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687187406; x=1689779406; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=09Nls6tXLgOvm0ng8/7m8dRNZ/h0ThOPEUKr3YHTZzs=; b=ZMlODmeC7C8zbVdoMTK9zb1NIJ2tjW4za0pyYHnZJnHqjladFl5L2OJEVAPtqKHXMS GT6RbKgN8kh9Ra8wDHJldx74DrMvC9sifM4vZG76KIrr60MB1DgSYCUYQRZAkR1qhzyT Z+zXPhL6eL4IjX084PkVr3d1HgnJVLNhAKAtS+VFMrbRD8fWuOOeZh4eZ8DOuUUnLczl lKipi75Nwq4kaHlLkk8EKpiy/gFBb+AGY2qeSail6eu3bNRdiyCzCgIFRFC/zxe8UlA8 vq4v6ooJ8ZRLjeWfLtk+1JMi/DNQ/xougyiNNjjTL0v1I3YGItzfV6uX+P3c7u7N6GRg Dkpg== X-Gm-Message-State: AC+VfDz7Q4qysn7790DLdakc/FZqXZbveEllUR/h0B47LgK40bY6g94W XT3ql36Sn4UxX0LPTFNKUhM= X-Received: by 2002:aa7:d0c8:0:b0:51a:4a25:bfbd with SMTP id u8-20020aa7d0c8000000b0051a4a25bfbdmr3392543edo.36.1687187406486; Mon, 19 Jun 2023 08:10:06 -0700 (PDT) Received: from localhost.localdomain (ip5f5abbd5.dynamic.kabel-deutschland.de. [95.90.187.213]) by smtp.gmail.com with ESMTPSA id p6-20020a056402044600b0050488d1d376sm13297186edw.0.2023.06.19.08.10.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jun 2023 08:10:06 -0700 (PDT) From: Michael Straube To: gregkh@linuxfoundation.org Cc: philipp.g.hortmann@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Michael Straube Subject: [PATCH 4/4] staging: rtl8192e: remove comparison to true Date: Mon, 19 Jun 2023 17:09:53 +0200 Message-ID: <20230619150953.22484-5-straube.linux@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230619150953.22484-1-straube.linux@gmail.com> References: <20230619150953.22484-1-straube.linux@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769145991220238838?= X-GMAIL-MSGID: =?utf-8?q?1769145991220238838?= Remove a comparison to true reported by checkpatch. CHECK: Using comparison to true is error prone Signed-off-by: Michael Straube --- drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c index b680757cfcf6..88975dc804c6 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c @@ -391,7 +391,7 @@ static int _rtl92e_wx_set_scan(struct net_device *dev, rt_state = priv->rtllib->rf_power_state; if (!priv->up) return -ENETDOWN; - if (priv->rtllib->link_detect_info.bBusyTraffic == true) + if (priv->rtllib->link_detect_info.bBusyTraffic) return -EAGAIN; if (wrqu->data.flags & IW_SCAN_THIS_ESSID) {