Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1580163lqb; Sun, 26 May 2024 07:31:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVnADxqxr+Sb6zs+rtDCkTyDPWJ2jABIG9OLaJ4G89cDimHvHUNH1U9UBOShaitvLM5AseyQsW/uagM0hpGXKNjwN/boouVN88mIHjeQQ== X-Google-Smtp-Source: AGHT+IHEi4F7lygCOxSQaGZrQQz5qswbT5VpJKWWL5jlJsoQdbPwiTPeku5+/UgYGETAJhnoXhB2 X-Received: by 2002:a05:6a00:3198:b0:6f4:9fc7:d239 with SMTP id d2e1a72fcca58-6f7727be1f4mr10855813b3a.14.1716733876441; Sun, 26 May 2024 07:31:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716733876; cv=pass; d=google.com; s=arc-20160816; b=rPGd9ISbDVYrVxpFZQ2CJcDv8SgWPRURqY9n+DZpX90e+QnfnwtWAjRifozY16Zazv 1BYStYAMf/Makmed/MdI4t7lrOcPXdWLhUg4OliqS7C7Q4GqtoJfISdlg93qEJjWKrkr yD2B9du1k1E39jdR7hFAsRmWFWIx9LCZ173qJZKGBF9Xq96EvUsZx6mLrQYVrXqfU386 VU3kL+7bm3ih2gHCSqvs/M8tPdAQBbsusnIPkA7c3GaCHP981hZbHEYySW0Wx2nyNmY2 pS/5Ogn6aFEWvaZa4O87eJbtQbHuVb62UOnCvZjI0bNzhOQw1MOGZtL8qkLcB9XaQS16 17Ug== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:dkim-signature:dkim-signature:date; bh=hfLHXUSmV0OIK5d8efxFE2fuJzOP3P7TYV7a9MORL6A=; fh=NjlDC6V+eUkJfTvVNEFSC5PK8BsnfYPiCFmpN2EQ6ZQ=; b=RaTYpi7V5+cB0sqLBrEahURvOll1oZRKVSHA3YGLwLb0BDZg6PadVE/Oh3/U44S1YL R4wN5Yns84yWVkHY77VYGK7YpR1Kah032SufW69el6QnU+rdAjELlvuKJUb0wby3eNE9 wJNW4c7j/Rpw+WkOM7Tj4NcGQn7300NznpiKZX/AY3AJ9/R15ONc4Y21b5r6BazZaYU0 eYjdUyByohpdO5tiA3oC9j+Ep/IiabxfV4wDnH9Jfn96S8hazzDaUMbpAJIszTnaOKiy rKBYONa4c1S7rdHw7lCdzGotHWKefoimjJyhV10Iiq8ugCOgsCXZ2gAaBLtXfdAZQMeH QBLg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=e36w4Xbu; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-189751-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189751-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f8fda1c394si4572842b3a.391.2024.05.26.07.31.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 May 2024 07:31:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-189751-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=@linutronix.de header.s=2020 header.b=e36w4Xbu; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-189751-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189751-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de 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 4E6A3B20CDC for ; Sun, 26 May 2024 14:31:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 73DF517552; Sun, 26 May 2024 14:31:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="e36w4Xbu"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Rdcm6R9B" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 50D61D534 for ; Sun, 26 May 2024 14:31:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716733864; cv=none; b=ghpCC8v19dadT1Upc7auFDLV6m4i+ZYyQBXaZhKsqzOIlOQqk5Esxq/q0GqkctNZx2bMMdaZuTtkrnkUB1PKraXC5O2XDrKzgj/LP38NB/kNQlYwL26o3WbPe8gMbJGGyU04UUU9QPxBZb5wWFd8Qf1FnXiG9YNsWs+qxg7LuNo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716733864; c=relaxed/simple; bh=GztFcP8ReuyEBq22Bavh1nCcM/HA12Jpwj7ouvRvTOw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Ni5Jv/36+t/LerjimXN9VD1QsOP7NKGUQjSQawG+AgepT8TWAHnTC/Aw5aibPBXJQCJgiIVbhxmf+69Fsl61ayTyS/pj0aP+j78WQ7NbP9VV4rs4ZrQ1xVcGMXH8K+J2epuOHCL2gfGy1HjMYiLShbUeEg4ShkShS8FSnK5lAVA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=e36w4Xbu; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Rdcm6R9B; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Sun, 26 May 2024 16:31:00 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1716733861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=hfLHXUSmV0OIK5d8efxFE2fuJzOP3P7TYV7a9MORL6A=; b=e36w4XbuoYSsQAZMzY/UrVy+pQCdMLPISsipTirmICt2ITfJqVLeUWrVmLN3h8NPC4ME/t nnaStfeGTi0u8NVswV5qSxewWlB7L9gOAoNXHPnxm+5S/VBj7g6dVCZczmasQIHl7PCkXq wybPjNxJezFrGk9saMC2xJ4ChT23y1oe/n+P7hTHS826zMLc3WCkMKiigJU2js3VTVIFdn BKSH0TY+tuXibb7myCMuSoYeVI8pEKc+AOZ1KY8lVMaFTSQuMaz4DzUNR/h/PGdYHcvxZw 92a9TWRZbqYFfK3Gd4CQqZeA0BMWR4+BGrHrWU4hYAHBaLKWanNebZYa32Rt1A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1716733861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=hfLHXUSmV0OIK5d8efxFE2fuJzOP3P7TYV7a9MORL6A=; b=Rdcm6R9BUePEEOfPrkzxu3h44FwZyombsqMy/lGJM5rdMIGIEBB8uq7yRV5ElKO8jXg4VP QnFJbbYjRSgzt0AA== From: Nam Cao To: Michael Straube Cc: gregkh@linuxfoundation.org, philipp.g.hortmann@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/3] staging: rtl8192e: remove dead code Message-ID: <20240526143100.FmVupNWq@linutronix.de> References: <20240526111928.14574-1-straube.linux@gmail.com> <20240526111928.14574-4-straube.linux@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240526111928.14574-4-straube.linux@gmail.com> 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? Best regards, Nam