From: Lars Lindley <lindley@coyote.org>
To: Lars Lindley <lindley@coyote.org>
Cc: gregkh@suse.de, greg@kroah.com, penberg@cs.helsinki.fi,
pavel@ucw.cz, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: winbond: mlmetxrx.c Coding style fixes.
Date: Fri, 19 Mar 2010 18:11:05 +0100 [thread overview]
Message-ID: <4BA3B029.7070403@coyote.org> (raw)
In-Reply-To: <1269018531-18891-1-git-send-email-lindley@coyote.org>
It builds fine and generated .o file is identical to the one from a clean tree.
/Lars
On 2010-03-19 18:08, Lars Lindley wrote:
> I fixed all coding style issues found by checkpatch.pl
> and converted argument names away from CamelCase and
> hungarian notation.
>
> Signed-off-by: Lars Lindley <lindley@coyote.org>
> ---
> drivers/staging/winbond/mlmetxrx.c | 79 +++++++++++++++++-------------------
> 1 files changed, 37 insertions(+), 42 deletions(-)
>
> diff --git a/drivers/staging/winbond/mlmetxrx.c b/drivers/staging/winbond/mlmetxrx.c
> index f856b94..76b79f0 100644
> --- a/drivers/staging/winbond/mlmetxrx.c
> +++ b/drivers/staging/winbond/mlmetxrx.c
> @@ -1,28 +1,25 @@
> -//============================================================================
> -// Module Name:
> -// MLMETxRx.C
> -//
> -// Description:
> -// The interface between MDS (MAC Data Service) and MLME.
> -//
> -// Revision History:
> -// --------------------------------------------------------------------------
> -// 200209 UN20 Jennifer Xu
> -// Initial Release
> -// 20021108 PD43 Austin Liu
> -// 20030117 PD43 Austin Liu
> -// Deleted MLMEReturnPacket and MLMEProcThread()
> -//
> -// Copyright (c) 1996-2002 Winbond Electronics Corp. All Rights Reserved.
> -//============================================================================
> +/*
> + * ============================================================================
> + * Module Name:
> + * MLMETxRx.C
> + *
> + * Description:
> + * The interface between MDS (MAC Data Service) and MLME.
> + *
> + * Copyright (c) 1996-2002 Winbond Electronics Corp. All Rights Reserved.
> + * ============================================================================
> + */
> #include "sysdef.h"
>
> #include "mds_f.h"
>
> -//=============================================================================
> -u8 MLMESendFrame(struct wbsoft_priv * adapter, u8 *pMMPDU, u16 len, u8 DataType)
> -/* DataType : FRAME_TYPE_802_11_MANAGEMENT, FRAME_TYPE_802_11_MANAGEMENT_CHALLENGE,
> - FRAME_TYPE_802_11_DATA */
> +/*
> + * ============================================================================
> + * DataType: FRAME_TYPE_802_11_MANAGEMENT,
> + * FRAME_TYPE_802_11_MANAGEMENT_CHALLENGE,
> + * FRAME_TYPE_802_11_DATA
> + */
> +u8 MLMESendFrame(struct wbsoft_priv *adapter, u8 *mmpdu, u16 len, u8 datatype)
> {
> if (adapter->sMlmeFrame.IsInUsed != PACKET_FREE_TO_USE) {
> adapter->sMlmeFrame.wNumTxMMPDUDiscarded++;
> @@ -30,17 +27,19 @@ u8 MLMESendFrame(struct wbsoft_priv * adapter, u8 *pMMPDU, u16 len, u8 DataType)
> }
> adapter->sMlmeFrame.IsInUsed = PACKET_COME_FROM_MLME;
>
> - // Keep information for sending
> - adapter->sMlmeFrame.pMMPDU = pMMPDU;
> - adapter->sMlmeFrame.DataType = DataType;
> - // len must be the last setting due to QUERY_SIZE_SECOND of Mds
> + /* Keep information for sending */
> + adapter->sMlmeFrame.pMMPDU = mmpdu;
> + adapter->sMlmeFrame.DataType = datatype;
> + /* len must be the last setting due to QUERY_SIZE_SECOND of Mds */
> adapter->sMlmeFrame.len = len;
> adapter->sMlmeFrame.wNumTxMMPDU++;
>
> - // H/W will enter power save by set the register. S/W don't send null frame
> - //with PWRMgt bit enbled to enter power save now.
> + /*
> + * H/W will enter power save by set the register. S/W don't send null
> + * frame with PWRMgt bit enbled to enter power save now.
> + */
>
> - // Transmit NDIS packet
> + /* Transmit NDIS packet */
> Mds_Tx(adapter);
> return true;
> }
> @@ -56,38 +55,34 @@ void MLME_GetNextPacket(struct wbsoft_priv *adapter, struct wb35_descriptor *des
> desc->Type = adapter->sMlmeFrame.DataType;
> }
>
> -static void MLMEfreeMMPDUBuffer(struct wbsoft_priv *adapter, s8 *pData)
> +static void MLMEfreeMMPDUBuffer(struct wbsoft_priv *adapter, s8 *data)
> {
> int i;
>
> - // Reclaim the data buffer
> + /* Reclaim the data buffer */
> for (i = 0; i < MAX_NUM_TX_MMPDU; i++) {
> - if (pData == (s8 *)&(adapter->sMlmeFrame.TxMMPDU[i]))
> + if (data == (s8 *)&(adapter->sMlmeFrame.TxMMPDU[i]))
> break;
> }
> if (adapter->sMlmeFrame.TxMMPDUInUse[i])
> adapter->sMlmeFrame.TxMMPDUInUse[i] = false;
> - else {
> - // Something wrong
> - // PD43 Add debug code here???
> + else {
> + /* Something wrong */
> + /* PD43 Add debug code here??? */
> }
> }
>
> -void
> -MLME_SendComplete(struct wbsoft_priv * adapter, u8 PacketID, unsigned char SendOK)
> +void MLME_SendComplete(struct wbsoft_priv *adapter, u8 packetid, unsigned char sendok)
> {
> MLME_TXCALLBACK TxCallback;
>
> - // Reclaim the data buffer
> + /* Reclaim the data buffer */
> adapter->sMlmeFrame.len = 0;
> - MLMEfreeMMPDUBuffer( adapter, adapter->sMlmeFrame.pMMPDU );
> -
> + MLMEfreeMMPDUBuffer(adapter, adapter->sMlmeFrame.pMMPDU);
>
> TxCallback.bResult = MLME_SUCCESS;
>
> - // Return resource
> + /* Return resource */
> adapter->sMlmeFrame.IsInUsed = PACKET_FREE_TO_USE;
> }
>
> -
> -
next prev parent reply other threads:[~2010-03-19 17:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-19 17:08 [PATCH] staging: winbond: mlmetxrx.c Coding style fixes Lars Lindley
2010-03-19 17:11 ` Lars Lindley [this message]
2010-03-20 0:10 ` Pavel Machek
2010-03-20 8:09 ` Lars Lindley
2010-03-21 12:42 ` Pekka Enberg
2010-04-28 22:57 ` Greg KH
2010-05-02 8:40 ` Lars Lindley
2010-05-03 18:47 ` Greg KH
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=4BA3B029.7070403@coyote.org \
--to=lindley@coyote.org \
--cc=devel@driverdev.osuosl.org \
--cc=greg@kroah.com \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=penberg@cs.helsinki.fi \
/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