Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1840145lqb; Sun, 26 May 2024 21:39:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVClqsj+IxMFJk+bjHy5iuZRnlDeBVDWW6FvZsYESQTx1Ol99BZWZvefsDva7AmRNv6HcV0AP8HHcUSsDXx7jQgg9x7NbFLenCepZF3UA== X-Google-Smtp-Source: AGHT+IGBLKCmWt3Jk/lbgzh1EE6FLJIuXx7dEjuXawv+2lyjv3ywXXgitWQy9M1S/jY5/yykIqBF X-Received: by 2002:a05:6a20:96d5:b0:1af:e09d:d98 with SMTP id adf61e73a8af0-1b212e5d021mr7520748637.60.1716784740694; Sun, 26 May 2024 21:39:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716784740; cv=pass; d=google.com; s=arc-20160816; b=I+gxnr9Nwc/Kz/+NrHScDEufY/HZMQAw/z8vxIY64PcjgWiCy/6gcesshbILiLYVtp 1Jyb4v7v1CqdhomKcTdqCOC+WqRCKVd2ShJ4D9iuPtiXuaw1OOX8Uv3Hj2bs1GgqvgxT oFeSn6A24IVCejHmmg6RzVC7L4uPa3+/Od1gP8j3GUyFIzfoEv1vs8Ejlc8di8PHqIEb BECndiaVuE8Un6oiKIfNw6gcBzawC20FsUnR4Zu2oUgcanxP8RO7MwgFc3UwjU9dlxD5 2/OVSe26e9vhGnHL+PbhDEDa3A/P3te+3x5mh2PXGLGqn0294Fp3y8e9AZKgOzX9INoJ 2P3g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=f/OfPFNzm2s0MgFj+RxiHO7NnoypMwcCoRKdYIhchcI=; fh=JBSpDQcrStd0//VeaOUEmMApyvPRbbttnzCXuehfRCc=; b=f4QWfBqHSSL5t3CVqFkrJFFIfkf3L4i0oujn/TyC4fMG4XCjZsHmWnpIahW72DUoda 6K7okv6w3kQhbSy0J7F7yn6xiqDK3xCEw19VTLtD3mdQ1m3Pj83MwlOgrJS4UVvcmHVz 0UQOhbcD7Bjb5Ij/0qN58xGX3pI/f8Ven/zjjY3CYmgNJoc3qvrDBa0WxZzOcszSNTqj o8g2oMp/Vt5XI7Zze4YzEHphAyqP2a/Dz9dnvNP3405n7aHDDUyEurfmIopJgqOL0P9g +i+G1za4jncR9qArzzoNSSF7vU6ft6kSZFW5tYv+hirPrh8LbwEuCux0H42MQ5/XIrpk eTzg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=jmW1tzN2; 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-190019-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190019-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2be9544d5d6si5800868a91.103.2024.05.26.21.39.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 May 2024 21:39:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-190019-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=jmW1tzN2; 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-190019-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190019-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 70844B20A05 for ; Mon, 27 May 2024 04:36:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E214BC2C8; Mon, 27 May 2024 04:36:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jmW1tzN2" Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (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 748FEC152 for ; Mon, 27 May 2024 04:36:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716784598; cv=none; b=tMq0oWKdCTbAmgdINukXZjMlhc5fxTubV5YIattOEoJXzGl7+PUI/VvvGZbbsX0s19mR2Z4HcOiNt03QmYVBYV8SGL9qSuxUEe4VlgfozlcFe8emeEc93UfAamhZ8/e2fPTwftxNLzXdGCzpAAD5ed2904OVVTkkcpBqfcnmitE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716784598; c=relaxed/simple; bh=JFCKn4eHAN81Du/zcCpOBwqgtwNTwkK5vphe6gnA6k8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=WTG0j0obe9z79kkfB42wD6mioCjq9IbMlUSD5spo9ftzj+JYeLT899Q1obUNR2yh2/ymIEy6uuWT9SRArlc2wKc1SjSrrAMWEDHaenFvJR26BoVZMjMpHCzLfza7oAzJMFCN5FwyBXvhmThqnb/JcaKDkc5lrdQQ+gam3/N/PKg= 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=jmW1tzN2; arc=none smtp.client-ip=209.85.167.45 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-lf1-f45.google.com with SMTP id 2adb3069b0e04-529b22aabc1so230412e87.2 for ; Sun, 26 May 2024 21:36:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716784594; x=1717389394; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=f/OfPFNzm2s0MgFj+RxiHO7NnoypMwcCoRKdYIhchcI=; b=jmW1tzN2qqfFQRtY637BmHiAQbTQ8VPjeRlOswJ6P8B40xK9i/JAz1msavbqYlme5o rH6lfUN/eoNYAO18E0Wb6V8PiXL2v/NAQ28AFCA1fVWq3DlhR9fpdv4t1goQyvSiUH5r DxWyXLeP3m9i67bp1TRngQx/ycAhD8cfqqoyCAZlTQHYFgOPlG2OLn1kp83Ub3erED8X Yhpv0CF+HuO9d4p0pTubj3kq5HcSPAl0kosIViAaXkVQPOnMVfPO2GLlpQnLQZxs2gpz FIpAaDhzITtbgczLTUM101Xq3DmvIl4MACOp5zywasKsTbA+b1UHBzjXRP/aUdALLHMN g1kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716784594; x=1717389394; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=f/OfPFNzm2s0MgFj+RxiHO7NnoypMwcCoRKdYIhchcI=; b=D6QaVCnN95rGxUuc9w1YJ6ZLum6UYPg2+KlCNFIguRfBuO+z+Y3jCL7H2NM+i1en02 zhRtptWJ68G/qF/hGaEhF4baSgHQ8ZH8WFBtujpa0KnWge2ya9/hX+g/GiLbBR3qs+rr 8rEouo6/P1r/hYiF3+vbgBUsieFproa2AnFpQRmxTCKNUMffslf4GiYMPud1evxluxnQ yl4XVVT83E9CL9mU15PUg3vEcPONIY/HS1bqZ1/P+XRQO5q3bNa5xMwuQ11Nu185TwlX bFFqP+tivwf3YvimvQVv/T0pOH3OW/4NnkPFsZzwTmGkQwgTvP3kaozQYu1PMYADpoGi NAhg== X-Forwarded-Encrypted: i=1; AJvYcCUtKtxdZR71PkcwUSuqqanCi/244DErooLMT0+BhMnPZUw05HE1jzTZN9QeaKNHvf5yl51GwvtBUoII8gRARd4i6f02k8vT/V2toY9c X-Gm-Message-State: AOJu0YzdxIs130wwcFxl4xdlJoUESjB7juCmmUIaz5On3eKRwzdKOM6j fH3NCZan3old/aBAEiEP+sY/v/7r7hsWLUeTsm2nfI5t4ITXLBgw X-Received: by 2002:a19:5e0e:0:b0:522:80d:5dc6 with SMTP id 2adb3069b0e04-52964fac61amr4578196e87.41.1716784594308; Sun, 26 May 2024 21:36:34 -0700 (PDT) Received: from [192.168.0.101] (ip-77-25-34-87.web.vodafone.de. [77.25.34.87]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a626c97a029sm450130466b.93.2024.05.26.21.36.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 26 May 2024 21:36:34 -0700 (PDT) Message-ID: Date: Mon, 27 May 2024 06:36:33 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 3/3] staging: rtl8192e: remove dead code To: Nam Cao Cc: gregkh@linuxfoundation.org, philipp.g.hortmann@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org References: <20240526111928.14574-1-straube.linux@gmail.com> <20240526111928.14574-4-straube.linux@gmail.com> <20240526143100.FmVupNWq@linutronix.de> Content-Language: en-US From: Michael Straube In-Reply-To: <20240526143100.FmVupNWq@linutronix.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Am 26.05.24 um 16:31 schrieb Nam Cao: > On Sun, May 26, 2024 at 01:19:28PM +0200, Michael Straube wrote: >> Remove two else-if arms that do nothing. >> >> Signed-off-by: Michael Straube >> --- >> drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 6 ------ >> 1 file changed, 6 deletions(-) >> >> diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c >> index 5392d2daf870..4e03eb100175 100644 >> --- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c >> +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c >> @@ -1370,9 +1370,6 @@ static void _rtl92e_dm_rx_path_sel_byrssi(struct net_device *dev) >> tmp_sec_rssi = cur_rf_rssi; >> sec_rssi_index = i; >> } >> - } else if ((cur_rf_rssi < tmp_sec_rssi) && >> - (cur_rf_rssi > tmp_min_rssi)) { >> - ; >> } else if (cur_rf_rssi == tmp_min_rssi) { >> if (tmp_sec_rssi == tmp_min_rssi) { >> tmp_min_rssi = cur_rf_rssi; >> @@ -1426,9 +1423,6 @@ static void _rtl92e_dm_rx_path_sel_byrssi(struct net_device *dev) >> tmp_cck_sec_pwdb = cur_cck_pwdb; >> cck_rx_ver2_sec_index = i; >> } >> - } else if ((cur_cck_pwdb < tmp_cck_sec_pwdb) && >> - (cur_cck_pwdb > tmp_cck_min_pwdb)) { >> - ; >> } else if (cur_cck_pwdb == tmp_cck_min_pwdb) { >> if (tmp_cck_sec_pwdb == tmp_cck_min_pwdb) >> tmp_cck_min_pwdb = cur_cck_pwdb; > > I would be careful with these changes. These else-if do prevent the > execution of the other else-if, so the code do not behave the same anymore. > > The only case this patch doesn't change anything functionally is when the > condition of the removed if-else is mutually exclusive with the conditions > of the following if-else. Are you sure this is the case? Ah yes, I had not thought about that. Thanks for pointing out. I'll have a closer look and resend the series. Either without this patch or, if it's safe to remove, state it in the commit message. Thanks, Michael