[PATCH 3.16 003/366] staging: vt6656: Fix misleading indentation

From: Ben Hutchings
Date: Sun Nov 11 2018 - 15:41:57 EST


3.16.61-rc1 review patch. If anyone has any objections, please let me know.

------------------

From: Ben Hutchings <ben@xxxxxxxxxxxxxxx>

Fix the compiler warnings:

drivers/staging/vt6656/dpc.c:712:5: warning: this 'if' clause does not guard...
drivers/staging/vt6656/main_usb.c:1101:7: warning: this 'if' clause does not guard...

by reducing indentation of the following statements in
RXbBulkInProcessData() and reformatting the kstrstr() function to
kernel coding style.

Both functions have been removed in a later version, so there is no
corresponding upstream commit.

Signed-off-by: Ben Hutchings <ben@xxxxxxxxxxxxxxx>
---
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -1092,17 +1092,18 @@ out:

/* find out the start position of str2 from str1 */
static unsigned char *kstrstr(const unsigned char *str1,
- const unsigned char *str2) {
- int str1_len = strlen(str1);
- int str2_len = strlen(str2);
+ const unsigned char *str2)
+{
+ int str1_len = strlen(str1);
+ int str2_len = strlen(str2);

- while (str1_len >= str2_len) {
- str1_len--;
- if(memcmp(str1,str2,str2_len)==0)
- return (unsigned char *) str1;
- str1++;
- }
- return NULL;
+ while (str1_len >= str2_len) {
+ str1_len--;
+ if (memcmp(str1, str2, str2_len) == 0)
+ return (unsigned char *)str1;
+ str1++;
+ }
+ return NULL;
}

static int Config_FileGetParameter(unsigned char *string,
--- a/drivers/staging/vt6656/dpc.c
+++ b/drivers/staging/vt6656/dpc.c
@@ -712,8 +712,8 @@ int RXbBulkInProcessData(struct vnt_priv
if (FrameSize < 12)
return false;

- skb->data += cbHeaderOffset;
- skb->tail += cbHeaderOffset;
+ skb->data += cbHeaderOffset;
+ skb->tail += cbHeaderOffset;
skb_put(skb, FrameSize);
skb->protocol=eth_type_trans(skb, skb->dev);
skb->ip_summed=CHECKSUM_NONE;