From: Dan Carpenter <error27@gmail.com>
To: Toon Schoenmakers <nighteyes1993@gmail.com>
Cc: gregkh@suse.de, caratorn@gmail.com, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Summary: Fixed all the indents and other errors in IEEE11h.c
Date: Mon, 18 Jul 2011 15:36:48 +0300 [thread overview]
Message-ID: <20110718123648.GA4010@shale.localdomain> (raw)
In-Reply-To: <1310859509.4191.6.camel@Rarity>
On Sun, Jul 17, 2011 at 01:38:29AM +0200, Toon Schoenmakers wrote:
> + uNumOfEIDs = ((uLength - offsetof(WLAN_FRAME_MSRREQ,
> + sMSRReqEIDs))/
> + (sizeof(WLAN_IE_MEASURE_REQ)));
It would be better to write this in C instead of Lisp:
uNumOfEIDs = (uLength - offsetof(WLAN_FRAME_MSGREQ, sMSRReqEIDS)) /
sizeof(WLAN_EI_MEASURE_REQ);
The other advantage of that is that the call to offsetof() is now
all together on one line.
> + pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket +
> +sizeof(STxMgmtPacket));
> +
> + pFrame = (PWLAN_FRAME_TPCREP)((unsigned char *)pTxPacket +
> +sizeof(STxMgmtPacket));
> +
Don't do that.
> + pFrame->Header.wFrameCtl = (WLAN_SET_FC_FTYPE(WLAN_FTYPE_MGMT) |
> + WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_ACTION)
> + );
The close parenthesis can fit on the end of the other line. In fact
the paren is not needed at all. Why is the second line aligned where
you have it? The WLAN_SET_FC_FSTYPE() isn't aligned with anything.
Take a another look through the patch and you'll find a bunch of
similar issues.
regards,
dan carpenter
next prev parent reply other threads:[~2011-07-18 12:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-16 23:38 Toon Schoenmakers
2011-07-18 12:36 ` Dan Carpenter [this message]
2011-07-21 14:27 ` Toon Schoenmakers
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=20110718123648.GA4010@shale.localdomain \
--to=error27@gmail.com \
--cc=caratorn@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=nighteyes1993@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®