2013-06-05 20:13:30

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 01/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.

Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/mac.c | 24 +++++++++---------------
drivers/staging/vt6656/mac.h | 2 +-
2 files changed, 10 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/vt6656/mac.c b/drivers/staging/vt6656/mac.c
index 343db19..89d700f 100644
--- a/drivers/staging/vt6656/mac.c
+++ b/drivers/staging/vt6656/mac.c
@@ -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);
}

/*
diff --git a/drivers/staging/vt6656/mac.h b/drivers/staging/vt6656/mac.h
index 0db1be5..f0cecc9 100644
--- a/drivers/staging/vt6656/mac.h
+++ b/drivers/staging/vt6656/mac.h
@@ -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);
--
1.8.1.2





2013-06-05 22:43:53

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 01/13] staging: vt6656: cleanup MACvWriteMultiAddr

On Wed, Jun 05, 2013 at 09:13:22PM +0100, Malcolm Priestley wrote:
> Remove internal white space and camel case.
>
> Camel case changes;
> pDevice -> priv
> uByteidx -> byte_idx
> byData -> data
>
> Functional change secondary buffer byData1 removed.
>
> Signed-off-by: Malcolm Priestley <[email protected]>
> ---
> drivers/staging/vt6656/mac.c | 24 +++++++++---------------
> drivers/staging/vt6656/mac.h | 2 +-
> 2 files changed, 10 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/staging/vt6656/mac.c b/drivers/staging/vt6656/mac.c
> index 343db19..89d700f 100644
> --- a/drivers/staging/vt6656/mac.c
> +++ b/drivers/staging/vt6656/mac.c
> @@ -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)

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