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: <20210401095017.GR2065@kadam>
Date:   Thu, 1 Apr 2021 12:50:18 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Fabio Aiuto <fabioaiuto83@...il.com>
Cc:     gregkh@...uxfoundation.org, joe@...ches.com,
        linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 08/49] staging: rtl8723bs: remove RT_TRACE logs in
 core/rtw_cmd.c

On Thu, Apr 01, 2021 at 11:20:38AM +0200, Fabio Aiuto wrote:
> @@ -677,9 +663,8 @@ u8 rtw_createbss_cmd(struct adapter  *padapter)
>  	u8 res = _SUCCESS;
>  
>  	if (pmlmepriv->assoc_ssid.SsidLength == 0)
> -		RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, (" createbss for Any SSid:%s\n", pmlmepriv->assoc_ssid.Ssid));
> +		;
>  	else
> -		RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, (" createbss for SSid:%s\n", pmlmepriv->assoc_ssid.Ssid));
>  
>  	pcmd = rtw_zmalloc(sizeof(struct cmd_obj));

This is a bug.  Smatch has a check for this which hopefully would have
detected it (I haven't tested).

There are some more similar issues below as well.  So generally the rule
is don't adjust the indenting if it's not related to your patch.  In
some cases you have been fixing the indenting but it should be done in
a separate patch.  But the other rule is that if your patch introduces
a checkpatch warning then you need to fix it in the same patch.  In
this block the whole if statement should be removed.  But also if you
have something like:

	if (foo) {
		RT_TRACE(blha blah blah);
		return;
	}

Then checkpatch will complain that the the curly braces are not
required.  (Checkpatch might not complain for your patch but it will
complain when we re-run it with the -f option over the whole file).  So
you should update this to:

	if (foo)
		return;

That's all considered part of deleting the RT_TRACE().  Also if there
are empty curly braces then delete those in the same patch.

I have looked over patches 1-7 and those seem basically fine.  I'm not
going to review any further into this patchset because you're going to
have to redo them and I will be reviewing the v2 set later anyway.  So
just look it over yourself and check for any similar issues.

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ