Skip to contentSkip to conversation

staging: dgnc: Removed parentheses.

PATCH Superseded Burcin Akalin 2 participants 2 messages Oct 23, 2015 – Oct 24, 2015 Staging

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: dgnc: Removed parentheses.

Removed unnecessary parentheses.Problem found using checkpatch.pl "CHECK: Unnecessary parentheses around brd->vpd[i + 3]"

---
 drivers/staging/dgnc/dgnc_neo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/dgnc/dgnc_neo.c +1 -1
index 900e3ae..42005cb 100644
@@ -1841,6 +1841,6 @@ static void neo_vpd(struct dgnc_board *brd)
 		/* Search for the serial number */
 		for (i = 0; i < NEO_VPD_IMAGEBYTES - 3; i++)
 			if (brd->vpd[i] == 'S' && brd->vpd[i + 1] == 'N')
-				strncpy(brd->serial_num, &(brd->vpd[i + 3]), 9);
+				strncpy(brd->serial_num, & brd->vpd[i + 3], 9);
 	}
 }
Signature · 1 line
1.9.1
#1 lore raw
Quoted 13 lines · Burcin Akalin

Removed unnecessary parentheses.Problem found using checkpatch.pl "CHECK: Unnecessary parentheses around brd->vpd[i + 3]"

---
 drivers/staging/dgnc/dgnc_neo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/dgnc/dgnc_neo.c +0 -0
index 900e3ae..42005cb 100644

drivers/staging/dgnc/dgnc_neo.c static void neo_vpd(struct dgnc_board *brd) · line 1844

Quoted 5 lines
drivers/staging/dgnc/dgnc_neo.c +1 -1
@@ -1841,6 +1841,6 @@ static void neo_vpd(struct dgnc_board *brd)
 		/* Search for the serial number */
 		for (i = 0; i < NEO_VPD_IMAGEBYTES - 3; i++)
 			if (brd->vpd[i] == 'S' && brd->vpd[i + 1] == 'N')
-				strncpy(brd->serial_num, &(brd->vpd[i + 3]), 9);
+				strncpy(brd->serial_num, & brd->vpd[i + 3], 9);

You don't need a space after the & either.

julia

Quoted 12 lines
drivers/staging/dgnc/dgnc_neo.c +0 -0
 	}
 }
Signature · 8 lines
1.9.1

-- 
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1445639761-16571-1-git-send-email-brcnakalin%40gmail.com.
For more options, visit https://groups.google.com/d/optout.