Skip to contentSkip to conversation

staging: vt6656: cleanup MACvWriteMultiAddr

PATCH In review Malcolm Priestley 2 participants 2 messages Jun 5, 2013 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/13 staging: vt6656: cleanup MACvWriteMultiAddr

Remove internal white space and camel case.

Camel case changes;
pDevice -> priv
uByteidx -> byte_idx
byData -> data

Functional change secondary buffer byData1 removed.

---
 drivers/staging/vt6656/mac.c | 24 +++++++++---------------
 drivers/staging/vt6656/mac.h |  2 +-
 2 files changed, 10 insertions(+), 16 deletions(-)
drivers/staging/vt6656/mac.c +9 -15
index 343db19..89d700f 100644
@@ -46,26 +46,20 @@ static int          msglevel                =MSG_LEVEL_INFO;
  *      Write MAC Multicast Address Mask
  *
  * Parameters:
- *  In:
- *      uByteidx    - Index of Mask
- *      byData      - Mask Value to write
- *  Out:
- *      none
+ * In:
+ *	byte_idx - Index of Mask
+ *	data- Mask Value to write
+ * Out:
+ *	none
  *
  * Return Value: none
  *
  */
-void MACvWriteMultiAddr(struct vnt_private *pDevice, u32 uByteIdx, u8 byData)
+void MACvWriteMultiAddr(struct vnt_private *priv, u16 byte_idx, u8 data)
 {
-	u8 byData1;
-
-    byData1 = byData;
-    CONTROLnsRequestOut(pDevice,
-                        MESSAGE_TYPE_WRITE,
-                        (u16) (MAC_REG_MAR0 + uByteIdx),
-                        MESSAGE_REQUEST_MACREG,
-                        1,
-                        &byData1);
+	CONTROLnsRequestOut(priv, MESSAGE_TYPE_WRITE,
+		(u16)(MAC_REG_MAR0 + byte_idx), MESSAGE_REQUEST_MACREG,
+			sizeof(data), &data);
 }
 
 /*
drivers/staging/vt6656/mac.h +1 -1
index 0db1be5..f0cecc9 100644
@@ -403,7 +403,7 @@
 #define MAC_REVISION_A0     0x00
 #define MAC_REVISION_A1     0x01
 
-void MACvWriteMultiAddr(struct vnt_private *, u32, u8);
+void MACvWriteMultiAddr(struct vnt_private *, u16, u8);
 void MACbShutdown(struct vnt_private *);
 void MACvSetBBType(struct vnt_private *, u8);
 void MACvDisableKeyEntry(struct vnt_private *, u32);
Signature · 1 line
1.8.1.2
maintainer
#1 lore raw
Quoted 29 lines · Malcolm Priestley

Remove internal white space and camel case.

Camel case changes;
pDevice -> priv
uByteidx -> byte_idx
byData -> data

Functional change secondary buffer byData1 removed.

---
 drivers/staging/vt6656/mac.c | 24 +++++++++---------------
 drivers/staging/vt6656/mac.h |  2 +-
 2 files changed, 10 insertions(+), 16 deletions(-)
drivers/staging/vt6656/mac.c +1 -5
index 343db19..89d700f 100644
@@ -46,26 +46,20 @@ static int          msglevel                =MSG_LEVEL_INFO;
  *      Write MAC Multicast Address Mask
  *
  * Parameters:
- *  In:
- *      uByteidx    - Index of Mask
- *      byData      - Mask Value to write
- *  Out:
- *      none
+ * In:

drivers/staging/vt6656/mac.c static int msglevel =MSG_LEVEL_INFO; · line 58

Quoted 10 lines
drivers/staging/vt6656/mac.c +5 -1
+ *	byte_idx - Index of Mask
+ *	data- Mask Value to write
+ * Out:
+ *	none
  *
  * Return Value: none
  *
  */
-void MACvWriteMultiAddr(struct vnt_private *pDevice, u32 uByteIdx, u8 byData)
+void MACvWriteMultiAddr(struct vnt_private *priv, u16 byte_idx, u8 data)

Why did you change the variable type of byte_idx? You don't document that in your changelog above.

Yes, it's being cast, but don't mix formatting / variable name changes with logical changes please. Remember, one patch per "thing" you change.

please redo this.

thanks,

greg k-h