lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220330062829.GF3293@kadam>
Date:   Wed, 30 Mar 2022 09:28:29 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Alison Schofield <alison.schofield@...el.com>
Cc:     Rebecca Mckeever <remckee0@...il.com>,
        Larry Finger <Larry.Finger@...inger.net>,
        Phillip Potter <phil@...lpotter.co.uk>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
        outreachy@...ts.linux.dev
Subject: Re: [PATCH] staging: r8188eu: fix suspect code indent for
 conditional statements

I don't really like the focus on commit message minutia...  :/
Basically everyone can understand the commit message.  There are one or
two maintainers who will fly into a rage when they see the word "fix"
in a commit message but I have a simple solution where I just never
email them again.  My time is too valuable for that nonsense.

We would have applied this patch as is.  Or I would normally have
written it like this:

[PATCH] staging: r8188eu: Delete a stray tab in rtw_survey_cmd_callback()

This code works fine, but the line is indented too far so it's confusing.
Delete a tab.

Signed-off-by: ...

I had reviewed this patch earlier and almost pointed out that both sides
of the if statement are the same except for the comment.  The "need to
make timeout handlerOS independent" comment is wrong.  I have not looked
at the details of the other comment.

I did not send my review comments because the patch was fine.  But what
we want is for the code to look more like this.

regards,
dan carpenter

diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188eu/core/rtw_cmd.c
index 6eca30124ee8..dcf7b24f95a8 100644
--- a/drivers/staging/r8188eu/core/rtw_cmd.c
+++ b/drivers/staging/r8188eu/core/rtw_cmd.c
@@ -1404,11 +1404,8 @@ void rtw_survey_cmd_callback(struct adapter *padapter,  struct cmd_obj *pcmd)
 {
 	struct	mlme_priv *pmlmepriv = &padapter->mlmepriv;
 
-	if (pcmd->res == H2C_DROPPED) {
+	if (pcmd->res != H2C_SUCCESS) {
 		/* TODO: cancel timer and do timeout handler directly... */
-		/* need to make timeout handlerOS independent */
-		_set_timer(&pmlmepriv->scan_to_timer, 1);
-		} else if (pcmd->res != H2C_SUCCESS) {
 		_set_timer(&pmlmepriv->scan_to_timer, 1);
 	}
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ