From: Dan Carpenter <dan.carpenter@oracle.com>
To: Michael Gunselmann <michael.gunselmann@studium.uni-erlangen.de>
Cc: devel@driverdev.osuosl.org, linux-kernel@i4.cs.fau.de,
Martin Hofmann <martin.hofmann@studium.uni-erlange.de>,
gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
Michael Gunselmann <michael.gunselmann@studium.uni-erlange.de>,
martin.hofmann@studium.uni-erlangen.de,
forest@alittletooquiet.net
Subject: Re: [PATCH 7/7] vt6655: Fixed most of the checkpatch warnings in wmgr
Date: Thu, 2 Jan 2014 17:57:01 +0300 [thread overview]
Message-ID: <20140102145701.GA30164@mwanda> (raw)
In-Reply-To: <1388415157-17615-8-git-send-email-michael.gunselmann@studium.uni-erlangen.de>
On Mon, Dec 30, 2013 at 03:52:37PM +0100, Michael Gunselmann wrote:
> wmgr.h: Fixed checkpatch errors.
> Four typedef warnings remain.
> line 85: This typedef increases understandability
> so this warning is not touched.
> line 196, 203 and 214:
> These typedef-errors might be fixed in a
> later commit. Fixing them makes it necessary
> to touch many other files of the driver
> using this typedef.
>
> wmgr.c: Fixed checkpatch errors (mostly comments and braces)
> Long lines were ignored and will be fixed in a later commit.
> Seven warnings remain:
> line 562, 770 and 921:
> When removing the braces checkpatch complains
> about the compiler is running into trouble.
> So these lines are not touched.
> line 713, 865, 1618 and 2163:
> Checkpatch complains about not using netdev_dbg
> instead of printk.
> These warnings will be fixed in a later commit.
>
Don't list the things which you don't change. We're not interested in
that.
This patch does too many changes at once. If you want to fix all all
the "checkpatch warnings" and your diff is around 20 lines long then
that counts as doing one thing per patch. If the diffstat is over a
thousand lines long like in this patch then it can't be a grab bag of
random things all munged together in one gigantor patch.
This patch mindlessly updates comment style. If we wanted that we
could script it.
> -//2008-8-4 <add> by chester
> +/* 2008-8-4 <add> by chester */
Delete these. We have proper version control now.
> - DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "Max Support rate = %d \n",
> + DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "Max Support rate = %d\n",
> pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate);
> - }//else { TODO: received STA under state1 handle }
> - else {
> - return;
> }
> + /* else { TODO: received STA under state1 handle } */
> + else
> + return;
This isn't right. The correct style is:
} else {
return;
}
But even better would be to reverse the condition and pull everything
in one indent level.
if (pMgmt->sNodeDBTable[uNodeIndex].eNodeState < NODE_AUTH)
return;
pMgmt->sNodeDBTable[uNodeIndex].eNodeState = NODE_ASSOC;
pMgmt->sNodeDBTable[uNodeIndex].wCapInfo = cpu_to_le16(*sFrame.pwCapInfo);
etc...
> @@ -1384,11 +1369,12 @@ s_vMgrRxAuthenSequence_2(
> s_vMgrLogStatus(pMgmt, cpu_to_le16((*(pFrame->pwStatus))));
> pMgmt->eCurrState = WMAC_STATE_IDLE;
> }
> - if (pDevice->eCommandState == WLAN_AUTHENTICATE_WAIT) {
> -// spin_unlock_irq(&pDevice->lock);
> -// vCommandTimerWait((void *)pDevice, 0);
> -// spin_lock_irq(&pDevice->lock);
> - }
> +/* if (pDevice->eCommandState == WLAN_AUTHENTICATE_WAIT) {
> + * spin_unlock_irq(&pDevice->lock);
> + * vCommandTimerWait((void *)pDevice, 0);
> + * spin_lock_irq(&pDevice->lock);
> + * }
> + */
>
Just delete this sort of thing instead of updating the comment style.
There are a couple other examples of this as well. Please redo this
patch.
regards,
dan carpenter
prev parent reply other threads:[~2014-01-02 14:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-30 14:52 [PATCH 0/7] vt6655: Cleanup of checkpatch errors Michael Gunselmann
2013-12-30 14:52 ` [PATCH 1/7] vt6655: Remove unused macros in 80211hdr.h Michael Gunselmann
2013-12-31 16:55 ` Dan Carpenter
2013-12-30 14:52 ` [PATCH 2/7] vt6655: Fix most of checkpatch.pl errors in wroute Michael Gunselmann
2013-12-31 11:12 ` Dan Carpenter
2013-12-30 14:52 ` [PATCH 3/7] vt6655: Fixed most of the checkpatch warnings in wpactl Michael Gunselmann
2013-12-30 14:52 ` [PATCH 4/7] vt6655: Fixed most of the checkpatch warnings in wpa2 Michael Gunselmann
2013-12-31 16:52 ` Dan Carpenter
2013-12-30 14:52 ` [PATCH 5/7] vt6655: Fixed most of the checkpatch warnings in wpa Michael Gunselmann
2013-12-30 14:52 ` [PATCH 6/7] vt6655: Remove typedefs in 80211hdr.h Michael Gunselmann
2013-12-30 14:52 ` [PATCH 7/7] vt6655: Fixed most of the checkpatch warnings in wmgr Michael Gunselmann
2014-01-02 14:57 ` 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=20140102145701.GA30164@mwanda \
--to=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=forest@alittletooquiet.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@i4.cs.fau.de \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.hofmann@studium.uni-erlange.de \
--cc=martin.hofmann@studium.uni-erlangen.de \
--cc=michael.gunselmann@studium.uni-erlange.de \
--cc=michael.gunselmann@studium.uni-erlangen.de \
/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