mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Joe Perches <joe@perches.com>
Cc: Michael Straube <straube.linux@gmail.com>,
	gregkh@linuxfoundation.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 01/19] staging: rtl8188eu: cleanup inconsistent indenting
Date: Mon, 1 Oct 2018 08:12:11 +0300	[thread overview]
Message-ID: <20181001051211.zdpy7otztjrg7gr6@mwanda> (raw)
In-Reply-To: <c9e0b48d829e9b598b7bb68d1152e56ef0c846f9.camel@perches.com>

On Sun, Sep 30, 2018 at 01:30:11PM -0700, Joe Perches wrote:
> On Sun, 2018-09-30 at 21:52 +0200, Michael Straube wrote:
> > Cleanup all inconsistent indenting reported by smatch.
> 
> There are also some others like:
> 
> drivers/staging/rtl8188eu/core/rtw_mlme.c:1752: WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (8, 24)
> 1750:	if ((ndisauthmode == Ndis802_11AuthModeWPA) ||
> 1751:	    (ndisauthmode == Ndis802_11AuthModeWPAPSK))
> 1752:			authmode = _WPA_IE_ID_;
> 
> Perhaps smatch can be enhanced to find those too.
> 

Style issues are not something I want to get into...  I had hoped that
this test would find bugs, because stuff like this looks so suspicious:

diff --git a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c b/drivers/staging/rtl8188eu/core/rtw_ieee80211.c
index 20f34d25c369..5c4ff81987bd 100644
--- a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c
+++ b/drivers/staging/rtl8188eu/core/rtw_ieee80211.c
@@ -246,7 +246,7 @@ int rtw_generate_ie(struct registry_priv *pregistrypriv)
                wireless_mode = pregistrypriv->wireless_mode;
        }

-               rtw_set_supported_rate(pdev_network->SupportedRates, wireless_mode);
+       rtw_set_supported_rate(pdev_network->SupportedRates, wireless_mode);

        rateLen = rtw_get_rateset_len(pdev_network->SupportedRates);

But I've never found even one bug with the inconsistent indenting
check.  The other related test about missing curly braces is pretty
useful though.

regards,
dan carpenter


      reply	other threads:[~2018-10-01  5:12 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-30 19:52 Michael Straube
2018-09-30 19:52 ` [PATCH 02/19] staging: rtl8188eu: rename odm_HWConfig Michael Straube
2018-09-30 19:52 ` [PATCH 03/19] staging: rtl8188eu: remove wrapper odm_SignalScaleMapping() Michael Straube
2018-09-30 19:52 ` [PATCH 04/19] staging: rtl8188eu: add spaces around '+' in odm_hwconfig.c Michael Straube
2018-09-30 19:52 ` [PATCH 05/19] staging: rtl8188eu: add spaces around '*' " Michael Straube
2018-09-30 19:52 ` [PATCH 06/19] staging: rtl8188eu: replace tabs with spaces " Michael Straube
2018-09-30 19:52 ` [PATCH 07/19] staging: rtl8188eu: rename parameter of odm_QueryRxPwrPercentage() Michael Straube
2018-09-30 19:52 ` [PATCH 08/19] staging: rtl8188eu: rename odm_QueryRxPwrPercentage() Michael Straube
2018-09-30 19:53 ` [PATCH 09/19] staging: rtl8188eu: rename parameter of odm_EVMdbToPercentage() Michael Straube
2018-09-30 19:53 ` [PATCH 10/19] staging: rtl8188eu: rename odm_EVMdbToPercentage() Michael Straube
2018-09-30 19:53 ` [PATCH 11/19] staging: rtl8188eu: rename parameter of odm_SignalScaleMapping() Michael Straube
2018-09-30 19:53 ` [PATCH 12/19] staging: rtl8188eu: rename variable in odm_SignalScaleMapping() Michael Straube
2018-09-30 19:53 ` [PATCH 13/19] staging: rtl8188eu: rename odm_SignalScaleMapping() Michael Straube
2018-09-30 19:53 ` [PATCH 14/19] staging: rtl8188eu: correct block comment in bb_cfg.c Michael Straube
2018-09-30 19:53 ` [PATCH 15/19] staging: rtl8188eu: simplify block comment in pwrseq.c Michael Straube
2018-09-30 19:53 ` [PATCH 16/19] staging: rtl8188eu: add spaces around '+' in fw.c Michael Straube
2018-09-30 19:53 ` [PATCH 17/19] staging: rtl8188eu: remove unnecessary parentheses in odm_rtl8188e.c Michael Straube
2018-09-30 19:53 ` [PATCH 18/19] staging: rtl8188eu: remove braces from single if statement Michael Straube
2018-09-30 19:53 ` [PATCH 19/19] staging: rtl8188eu: fix spelling mistake in comment Michael Straube
2018-09-30 20:30 ` [PATCH 01/19] staging: rtl8188eu: cleanup inconsistent indenting Joe Perches
2018-10-01  5:12   ` Dan Carpenter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181001051211.zdpy7otztjrg7gr6@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=straube.linux@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®