Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp420274rdb; Mon, 29 Jan 2024 06:29:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IFvrWbVhFkZg5W/+VpTlLcxcmwGy6edAnkuFDHEjpyH6TbHqH/3gmP/FWvEqHC02UMY8irk X-Received: by 2002:a17:903:2287:b0:1d8:e929:a74f with SMTP id b7-20020a170903228700b001d8e929a74fmr1242895plh.24.1706538552787; Mon, 29 Jan 2024 06:29:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706538552; cv=pass; d=google.com; s=arc-20160816; b=J5T7UzAOXKYR+TZiKbZI7VXvD+PqWospRV0CSc1zxU4E0eb4mxe9ORCvl1sVLd98g/ Te2NhJbazxPqQ1KwW0T0X5aSOQyTGCxU0G0V1b8is01LFUxOxoGKZARbYw5y6hLJOL+q WBTyvtFok+2fYNsvLqAtBi/D0dRUoZA5rOPuXUcRrvRQLs4hFH2Ju2956K3h1DUaXqRD kAgXFvYqKMVeMF0vVE06TPmqiv/caD1ZcFm0rdF5WK/ugzFkX8KJW53586Ua2P+Y5uL/ HGcZRHfvU3gr1Mey9UiBcnSbg+ytwiF1SAPUfTxe8KrwirOmJHrwVE/RwGggGSJu6IOh oPSw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=y9moHDVvU6z3kwiFZUQJD1fH1NG2dZetKlW8LuOaa3I=; fh=rgx1yws0sbW+yEKrgEMeSQK210edXnzqTXfPdqj6m2I=; b=Pv419IV5/WsZt8+ykPDc7ZT8qlVEj5qdPaMNqY2lKEDTG7+qLpNHscKdw2hmGRiPAe VOeWNWwIFBpvQ+fFR+LZKeRJn9L8Sysb6H/uvsp3yj+sQxHuv6/sKld3cByQ8lLzDV3s JsBO8s4ELn9uWSnYj92akdT3B+wFGMu73Hz/LgUKNyn8VTQAHwNWtKQYRRvxYkgOFmtK IQN4+c4O6VwtQ9Weob1zEeDsslAN828VTe96W/fKxDmVlbCcStmlML2TN+KNu2oUcs0U K2gi37Va8VlbAPH14zZcBkBrVXl1RLz7QHzYqqH92sVFSutVB3su0wU4f2IKkb4vo0KL Dxxw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=HhCTEMQZ; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-42885-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42885-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id n4-20020a170902968400b001d4891f73f0si5608024plp.549.2024.01.29.06.29.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 06:29:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-42885-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=HhCTEMQZ; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-42885-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42885-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 20FA428FD92 for ; Mon, 29 Jan 2024 14:20:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D5DDF679EB; Mon, 29 Jan 2024 14:19:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HhCTEMQZ" Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 816ED67757 for ; Mon, 29 Jan 2024 14:19:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706537959; cv=none; b=IWXlNE7YvRmCbHBnLxrnf1IMbNk+m+c+EM9MoEu03YUCtd/wHgwIDP7ErRdVvDCRTMbTtXk1fj3xCDSHWa1s0ASpdIXr4QvqCtDUzV7lKrlNPrS0yn0GO9KnVjQYzflSELRCqgchW6l16DHpX7Esjh9KQX0ScJbssPvkzlTficw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706537959; c=relaxed/simple; bh=7O6rXoPUceZ5vSfUZs1f50iG4DBaw4PqXEIh8pA+98A=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=UK3CimCyPSKnqlQjAnBQstP2lbLdZAVowEnlbaAb5LYwpuV+oDo+OBk0TMEjfHsa2W7/WJDXkqJ07oDx54G1TfkZQlLXnvZNU7m8qGQDKZ5Fy+7LVgFKptNo/7ziBvSK5pCd9NSpJI2Gmpp7c1rm3xef+jF5380huPLkm63dVhI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=HhCTEMQZ; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-40e80046246so15095595e9.1 for ; Mon, 29 Jan 2024 06:19:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706537956; x=1707142756; darn=vger.kernel.org; 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=y9moHDVvU6z3kwiFZUQJD1fH1NG2dZetKlW8LuOaa3I=; b=HhCTEMQZudA/fsp2SxlAFu6ZyNf5oLuM5KVJrNvggTP1Q+5rasL2sMQyQ7Zg0diYIN xqwXPelp/+Ijj//sP9B1tbMrK4aYRqt8SaDVmxPDyIaoApbMmsP7XgsKlUo8zTxGyKXA Rh1JUyCr8H9zPbBP/fwQ/EpigC3X+jG2dbPAqIDHLYRT81+q15kbMR3xv1x2zeNAzwYk P8rmKqgGiZXixnkqqdOay2tSSRyEX9ZsjgFRjTpEVk3D0Xbr86aw2VRO+MIyJddGN83O QtLOQJLYqThL5IrqIbEK4Urj/Fq+2X6LcomZkWz1JyW/omaYbuxu/juEKzSWcGk9IRIf Ufig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706537956; x=1707142756; 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=y9moHDVvU6z3kwiFZUQJD1fH1NG2dZetKlW8LuOaa3I=; b=VjLJIRaULEHQyfAoEMXA+DklSGRH39gz+mM/rcXPTjCNvpBsH0CFdNC2acrTAcB+9+ vP8xnPGRCaU3BbU5fLy1zY2ZKPxLuRI+XAX829PlIP6aXD1DYjMStAE46Y2V+FFbualr 8Qp5S7eE7akMnwHqBtZCMbXsqIBNVuoDLrE7iAL/ffvYMpUjL73rpBxhIPhe1PkCRYxd pXjsAu0kohJWsAbND5KpBexNv4FdHHUuODCI4FZz7/meu9By/pMIX+FY6w5RuQYGT6W/ eDgMwq2Rzp2aTg4PNnxQEs8+nVnsT+PQ7G0RS5lcIu/vRA3EvpSrLzK71ijeFMsAx2Ke jpfQ== X-Gm-Message-State: AOJu0YyYbsPe0rvFar1NAEfeg3wdfTzrtwUjirmLZN1+V/1sIWj2Iz9f 4lmk6IHa9hv693RbU5w70cCK9sk3H+AS01KQ7Anifb1SHWJsYs/Z X-Received: by 2002:a05:600c:3b9d:b0:40d:858c:53f6 with SMTP id n29-20020a05600c3b9d00b0040d858c53f6mr5412782wms.2.1706537955755; Mon, 29 Jan 2024 06:19:15 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCXdm4wUtSp6rYEMPJ0lKaNsh61o/2lREf5Zq7rC+VWl+F4650XLgIVf07vKJ21/vvbM1453su4X/Q0Qqu3K9HBqHvEh+9g7fXt9yMQHTJFuy9I94ig3FgC47isLk+sRLWAmgRD0i7Yyg+sMzWvtuG1W0v5IbcvaIEnlNz+wqes2FLaQrF+qYdJ1i3SKq5GLjwSMsOE2VcS9PzR4yTGFhJhpv/rH7IkD Received: from Ubuntu22.myguest.virtualbox.org ([46.121.140.152]) by smtp.gmail.com with ESMTPSA id e21-20020a05600c4e5500b0040efb8118e9sm1200186wmq.38.2024.01.29.06.19.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 06:19:15 -0800 (PST) From: Meir Elisha X-Google-Original-From: Meir Elisha Received: by Ubuntu22.myguest.virtualbox.org (sSMTP sendmail emulation); Mon, 29 Jan 2024 16:19:12 +0200 To: Greg Kroah-Hartman , Hans de Goede , Ruan Jinjie , Yang Yingliang Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Meir Elisha Subject: [PATCH 4/4] Staging: rtl8723bs: fix else after break warning Date: Mon, 29 Jan 2024 16:18:56 +0200 Message-Id: <20240129141856.416532-5-meir6264@Gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240129141856.416532-1-meir6264@Gmail.com> References: <20240129141856.416532-1-meir6264@Gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Fix checkpatch warning: else is not generally useful after a break or return Signed-off-by: Meir Elisha --- drivers/staging/rtl8723bs/core/rtw_mlme.c | 38 +++++++++-------------- 1 file changed, 14 insertions(+), 24 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c index 044483f3d678..efaac84f22b4 100644 --- a/drivers/staging/rtl8723bs/core/rtw_mlme.c +++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c @@ -1540,30 +1540,23 @@ void _rtw_join_timeout_handler(struct timer_list *t) spin_lock_bh(&pmlmepriv->lock); - if (rtw_to_roam(adapter) > 0) { /* join timeout caused by roaming */ + if (rtw_to_roam(adapter) == 0) { /* join timeout caused by roaming */ + rtw_indicate_disconnect(adapter); + free_scanqueue(pmlmepriv); + /* indicate disconnect for the case that join_timeout and check_fwstate != FW_LINKED */ + rtw_cfg80211_indicate_disconnect(adapter); + } else { while (1) { rtw_dec_to_roam(adapter); - if (rtw_to_roam(adapter) != 0) { /* try another */ - int do_join_r; - - do_join_r = rtw_do_join(adapter); - if (do_join_r != _SUCCESS) - continue; - - break; - } else { + if (rtw_to_roam(adapter) == 0) { rtw_indicate_disconnect(adapter); break; + } else if (rtw_do_join(adapter) != _SUCCESS) { /* try another */ + continue; } - } - - } else { - rtw_indicate_disconnect(adapter); - free_scanqueue(pmlmepriv);/* */ - - /* indicate disconnect for the case that join_timeout and check_fwstate != FW_LINKED */ - rtw_cfg80211_indicate_disconnect(adapter); + break; + } } spin_unlock_bh(&pmlmepriv->lock); @@ -2102,12 +2095,9 @@ signed int rtw_restruct_sec_ie(struct adapter *adapter, u8 *in_ie, u8 *out_ie, u } iEntry = SecIsInPMKIDList(adapter, pmlmepriv->assoc_bssid); - if (iEntry < 0) { - return ielength; - } else { - if (authmode == WLAN_EID_RSN) - ielength = rtw_append_pmkid(adapter, iEntry, out_ie, ielength); - } + if (iEntry > 0 && authmode == WLAN_EID_RSN) + ielength = rtw_append_pmkid(adapter, iEntry, out_ie, ielength); + return ielength; } -- 2.34.1