public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/4] drivers/staging/vt6656/iocmd.h: Removed ttype.h and some
@ 2011-11-04 10:10 Marcos Souza
  2011-11-04 11:07 ` [PATCH 3/4] drivers/staging/vt6656/iocmd.h: Removed ttype.h and Dan Carpenter
  2011-11-04 11:34 ` Marcos Souza
  0 siblings, 2 replies; 3+ messages in thread
From: Marcos Souza @ 2011-11-04 10:10 UTC (permalink / raw)
  To: kernel-janitors

I forgot to sent these patches, so I'm sending now

Removed comments about functions/veriables static and stuff like these.

Signed-off-by: Marcos paulo de Souza <marcos.mage@gmail.com>
---
 drivers/staging/vt6656/iocmd.h |   99 ++++++++++++++--------------------------
 1 files changed, 35 insertions(+), 64 deletions(-)

diff --git a/drivers/staging/vt6656/iocmd.h b/drivers/staging/vt6656/iocmd.h
index 22710ce..95ea2ce 100644
--- a/drivers/staging/vt6656/iocmd.h
+++ b/drivers/staging/vt6656/iocmd.h
@@ -29,11 +29,7 @@
 #ifndef __IOCMD_H__
 #define __IOCMD_H__

-#include "ttype.h"
-
-/*---------------------  Export Definitions -------------------------*/
-
-// ioctl Command code
+/* ioctl Command code */
 #define MAGIC_CODE	                 0x3142
 #define IOCTL_CMD_TEST	            (SIOCDEVPRIVATE + 0)
 #define IOCTL_CMD_SET			    (SIOCDEVPRIVATE + 1)
@@ -92,9 +88,9 @@ typedef enum tagWZONETYPE {
 #define WEP_104BIT_LEN         13
 #define WEP_232BIT_LEN         16

-// Ioctl interface structure
-// Command structure
-//
+/* Ioctl interface structure
+*  Command structure
+*/
 #pragma pack(1)
 typedef struct tagSCmdRequest {
 	u8 name[16];
@@ -103,9 +99,7 @@ typedef struct tagSCmdRequest {
 	u16     wCmdCode;
 } SCmdRequest, *PSCmdRequest;

-//
-// Scan
-//
+/* Scan */

 typedef struct tagSCmdScan {

@@ -113,9 +107,7 @@ typedef struct tagSCmdScan {

 } SCmdScan, *PSCmdScan;

-//
-// BSS Join
-//
+/* BSS Join */

 typedef struct tagSCmdBSSJoin {

@@ -123,18 +115,16 @@ typedef struct tagSCmdBSSJoin {
     u16     wBBPType;
     u8	    ssid[SSID_MAXLEN + 2];
     u32	    uChannel;
-    BOOL    bPSEnable;
-    BOOL    bShareKeyAuth;
+    int    bPSEnable;
+    int    bShareKeyAuth;

 } SCmdBSSJoin, *PSCmdBSSJoin;

-//
-// Zonetype Setting
-//
+/* Zonetype Setting */

 typedef struct tagSCmdZoneTypeSet {

- BOOL       bWrite;
+ int       bWrite;
  WZONETYPE  ZoneType;

 } SCmdZoneTypeSet, *PSCmdZoneTypeSet;
@@ -144,7 +134,7 @@ typedef struct tagSWPAResult {
 	u8 proto;
 	u8 key_mgmt;
 	u8 eap_type;
-         BOOL authenticated;
+	int authenticated;
 } SWPAResult, *PSWPAResult;

 typedef struct tagSCmdStartAP {
@@ -154,17 +144,17 @@ typedef struct tagSCmdStartAP {
     u8	    ssid[SSID_MAXLEN + 2];
 	u32 uChannel;
 	u32 uBeaconInt;
-    BOOL    bShareKeyAuth;
+    int    bShareKeyAuth;
     u8      byBasicRate;

 } SCmdStartAP, *PSCmdStartAP;

 typedef struct tagSCmdSetWEP {

-    BOOL    bEnableWep;
+    int    bEnableWep;
     u8      byKeyIndex;
     u8      abyWepKey[WEP_NKEYS][WEP_KEYMAXLEN];
-    BOOL    bWepKeyAvailable[WEP_NKEYS];
+    int    bWepKeyAvailable[WEP_NKEYS];
     u32     auWepKeyLength[WEP_NKEYS];

 } SCmdSetWEP, *PSCmdSetWEP;
@@ -177,7 +167,7 @@ typedef struct tagSBSSIDItem {
     u16	    wBeaconInterval;
     u16	    wCapInfo;
     u8      byNetType;
-    BOOL    bWEPOn;
+    int    bWEPOn;
     u32     uRSSI;

 } SBSSIDItem;
@@ -191,19 +181,19 @@ typedef struct tagSBSSIDList {


 typedef struct tagSNodeItem {
-    // STA info
+    /* STA info */
     u16            wAID;
     u8             abyMACAddr[6];
     u16            wTxDataRate;
     u16            wInActiveCount;
     u16            wEnQueueCnt;
     u16            wFlags;
-    BOOL           bPWBitOn;
+    int           bPWBitOn;
     u8             byKeyIndex;
     u16            wWepKeyLength;
     u8            abyWepKey[WEP_KEYMAXLEN];
-    // Auto rate fallback vars
-    BOOL           bIsInFallback;
+	/* Auto rate fallback vars */
+	int           bIsInFallback;
     u32            uTxFailures;
     u32            uTxAttempts;
     u16            wFailureRatio;
@@ -221,7 +211,7 @@ typedef struct tagSNodeList {

 typedef struct tagSCmdLinkStatus {

-    BOOL    bLink;
+	int    bLink;
 	u16	    wBSSType;
 	u8      byState;
     u8      abyBSSID[BSSID_LEN];
@@ -231,9 +221,8 @@ typedef struct tagSCmdLinkStatus {

 } SCmdLinkStatus, *PSCmdLinkStatus;

-//
-// 802.11 counter
-//
+/* 802.11 counter */
+
 typedef struct tagSDot11MIBCount {
     u32 TransmittedFragmentCount;
     u32 MulticastTransmittedFrameCount;
@@ -249,15 +238,11 @@ typedef struct tagSDot11MIBCount {
     u32 FCSErrorCount;
 } SDot11MIBCount, *PSDot11MIBCount;

+/* statistic counter */

-
-//
-// statistic counter
-//
 typedef struct tagSStatMIBCount {
-    //
-    // ISR status count
-    //
+
+    /* ISR status count */
     u32   dwIsrTx0OK;
     u32   dwIsrTx1OK;
     u32   dwIsrBeaconTxOK;
@@ -267,12 +252,10 @@ typedef struct tagSStatMIBCount {
     u32   dwIsrUnrecoverableError;
     u32   dwIsrSoftInterrupt;
     u32   dwIsrRxNoBuf;
-    /////////////////////////////////////

-	u32 dwIsrUnknown; /* unknown interrupt count */
+	u32 dwIsrUnknown; /* unknown interrupt count */

-    // RSR status count
-    //
+    /* RSR status count */
     u32   dwRsrFrmAlgnErr;
     u32   dwRsrErr;
     u32   dwRsrCRCErr;
@@ -293,10 +276,10 @@ typedef struct tagSStatMIBCount {
     u32   dwRsrBroadcast;
     u32   dwRsrMulticast;
     u32   dwRsrDirected;
-    // 64-bit OID
+    /* 64-bit OID */
     u32   ullRsrOK;

-    // for some optional OIDs (64 bits) and DMI support
+    /* for some optional OIDs (64 bits) and DMI support */
     u32   ullRxBroadcastBytes;
     u32   ullRxMulticastBytes;
     u32   ullRxDirectedBytes;
@@ -312,8 +295,7 @@ typedef struct tagSStatMIBCount {
     u32   dwRsrRxFrmLen512_1023;
     u32   dwRsrRxFrmLen1024_1518;

-    // TSR0,1 status count
-    //
+	/* TSR0,1 status count */
 	u32 dwTsrTotalRetry[2];        /* total collision retry count */
 	u32 dwTsrOnceRetry[2];         /* this packet had one collision */
 	u32 dwTsrMoreThanOnceRetry[2]; /* this packet had many collisions */
@@ -332,7 +314,7 @@ typedef struct tagSStatMIBCount {
     u32   dwTsrMulticast[2];
     u32   dwTsrDirected[2];

-    // RD/TD count
+    /* RD/TD count */
     u32   dwCntRxFrmLength;
     u32   dwCntTxBufLength;

@@ -348,7 +330,7 @@ typedef struct tagSStatMIBCount {
 	/* 64-bit OID */
 	u32   ullTsrOK[2];

-    // for some optional OIDs (64 bits) and DMI support
+    /* for some optional OIDs (64 bits) and DMI support */
     u32   ullTxBroadcastFrames[2];
     u32   ullTxMulticastFrames[2];
     u32   ullTxDirectedFrames[2];
@@ -363,11 +345,8 @@ typedef struct tagSCmdValue {

 } SCmdValue,  *PSCmdValue;

-//
-// hostapd & viawget ioctl related
-//
-
-// VIAGWET_IOCTL_HOSTAPD ioctl() cmd:
+/* hostapd & viawget ioctl related
+   VIAGWET_IOCTL_HOSTAPD ioctl() cmd: */
 enum {
 	VIAWGET_HOSTAPD_FLUSH = 1,
 	VIAWGET_HOSTAPD_ADD_STA = 2,
@@ -386,7 +365,7 @@ enum {
 #define VIAWGET_HOSTAPD_GENERIC_ELEMENT_HDR_LEN \
 ((int) (&((struct viawget_hostapd_param *) 0)->u.generic_elem.data))

-// Maximum length for algorithm names (-1 for nul termination) used in ioctl()
+/* Maximum length for algorithm names (-1 for nul termination) used
in ioctl() */

 struct viawget_hostapd_param {
 	u32 cmd;
@@ -433,12 +412,4 @@ struct viawget_hostapd_param {
 	} u;
 };

-/*---------------------  Export Classes  ----------------------------*/
-
-/*---------------------  Export Variables  --------------------------*/
-
-/*---------------------  Export Types  ------------------------------*/
-
-/*---------------------  Export Functions  --------------------------*/
-
 #endif /* __IOCMD_H__ */
-- 
1.7.4.4




-- 
Marcos Paulo de Souza

*Porque uma vida sem desafios é uma vida sem razão.*
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 3/4] drivers/staging/vt6656/iocmd.h: Removed ttype.h and
  2011-11-04 10:10 [PATCH 3/4] drivers/staging/vt6656/iocmd.h: Removed ttype.h and some Marcos Souza
@ 2011-11-04 11:07 ` Dan Carpenter
  2011-11-04 11:34 ` Marcos Souza
  1 sibling, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2011-11-04 11:07 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 1443 bytes --]

This patch was mangled by your mail client.  Read
Documentation/email-clients.txt, send the patch to yourself.  Verify
that it applies and then resend.

On Fri, Nov 04, 2011 at 07:10:56AM -0300, Marcos Souza wrote:
> I forgot to sent these patches, so I'm sending now
> 
> Removed comments about functions/veriables static and stuff like these.
                                   variables
Normally, we don't comment too much on changelog spelling but since
you're going to resend this anyway, could you fix the typo there?



> @@ -123,18 +115,16 @@ typedef struct tagSCmdBSSJoin {
>      u16     wBBPType;
>      u8	    ssid[SSID_MAXLEN + 2];
>      u32	    uChannel;
> -    BOOL    bPSEnable;
> -    BOOL    bShareKeyAuth;
> +    int    bPSEnable;
> +    int    bShareKeyAuth;

These should be bool.  Obviously in the original code, BOOL was
defined as int and changing it has the potential to break things so
it needs care.  You would need to look at all the places where
bPSEnable is used and verify that it works for type "bool".  Use grep
or cscope.  If you don't feel comfortable doing that, then I would
leave it as is for now.

> - BOOL       bWrite;
> + int       bWrite;

Same thing for all the other places as well.

Some people might complain that this patch does too many things in
a single patch.  Maybe break out the white space changes from the
other changes.

regards,
dan carpenter

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 3/4] drivers/staging/vt6656/iocmd.h: Removed ttype.h and
  2011-11-04 10:10 [PATCH 3/4] drivers/staging/vt6656/iocmd.h: Removed ttype.h and some Marcos Souza
  2011-11-04 11:07 ` [PATCH 3/4] drivers/staging/vt6656/iocmd.h: Removed ttype.h and Dan Carpenter
@ 2011-11-04 11:34 ` Marcos Souza
  1 sibling, 0 replies; 3+ messages in thread
From: Marcos Souza @ 2011-11-04 11:34 UTC (permalink / raw)
  To: kernel-janitors

2011/11/4, Dan Carpenter <dan.carpenter@oracle.com>:
> This patch was mangled by your mail client.  Read
> Documentation/email-clients.txt, send the patch to yourself.  Verify
> that it applies and then resend.
Strange, because I sent this with the git send-email...
>
> On Fri, Nov 04, 2011 at 07:10:56AM -0300, Marcos Souza wrote:
>> I forgot to sent these patches, so I'm sending now
>>
>> Removed comments about functions/veriables static and stuff like these.
>                                    variables
> Normally, we don't comment too much on changelog spelling but since
> you're going to resend this anyway, could you fix the typo there?
Of course I can.
>
>
>
>> @@ -123,18 +115,16 @@ typedef struct tagSCmdBSSJoin {
>>      u16     wBBPType;
>>      u8	    ssid[SSID_MAXLEN + 2];
>>      u32	    uChannel;
>> -    BOOL    bPSEnable;
>> -    BOOL    bShareKeyAuth;
>> +    int    bPSEnable;
>> +    int    bShareKeyAuth;
>
> These should be bool.  Obviously in the original code, BOOL was
> defined as int and changing it has the potential to break things so
> it needs care.  You would need to look at all the places where
> bPSEnable is used and verify that it works for type "bool".  Use grep
> or cscope.  If you don't feel comfortable doing that, then I would
> leave it as is for now.
>
>> - BOOL       bWrite;
>> + int       bWrite;
>
> Same thing for all the other places as well.
The BOOL type was definied in the ttype.h too, so for the reason of
the TODO, I must remove this header... But I believe that BOOL has a
typedef in the headers of linux... I will check it.
>
> Some people might complain that this patch does too many things in
> a single patch.  Maybe break out the white space changes from the
> other changes.
I think this too, but is so "ugly" fix a TODO file, without make this
"small" changes iof coding standards... I will try to do it =D
> regards,
> dan carpenter
>
Again, thanks for the comments!

-- 
Marcos Paulo de Souza

*Porque uma vida sem desafios é uma vida sem razão.*
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-11-04 11:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-04 10:10 [PATCH 3/4] drivers/staging/vt6656/iocmd.h: Removed ttype.h and some Marcos Souza
2011-11-04 11:07 ` [PATCH 3/4] drivers/staging/vt6656/iocmd.h: Removed ttype.h and Dan Carpenter
2011-11-04 11:34 ` Marcos Souza

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox