lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Tue, 3 Jun 2014 21:34:24 +0200
From:	Nicolas Koch <nioko1337@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: Fwd: [PATCH] fix coding style issues

From: Nicolas Koch <nioko1337@...il.com>
Date: Tue,  3 Jun 2014 21:21:18 +0200
Subject: [PATCH] fix coding style issues
To: devel@...verdev.osuosl.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Aaro Koskinen
<aaro.koskinen@....fi>, Nicolas Koch <nioko1337@...glemail.com>

Done as task 10 of the eudyptula challenge.

Signed-off-by: Nicolas Koch <nioko1337@...glemail.com>
---
 drivers/staging/octeon/ethernet-mem.c |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/octeon/ethernet-mem.c
b/drivers/staging/octeon/ethernet-mem.c
index bf666b0..964da86 100644
--- a/drivers/staging/octeon/ethernet-mem.c
+++ b/drivers/staging/octeon/ethernet-mem.c
@@ -46,9 +46,10 @@
 static int cvm_oct_fill_hw_skbuff(int pool, int size, int elements)
 {
 	int freed = elements;
-	while (freed) {

+	while (freed) {
 		struct sk_buff *skb = dev_alloc_skb(size + 256);
+
 		if (unlikely(skb == NULL))
 			break;
 		skb_reserve(skb, 256 - (((unsigned long)skb->data) & 0x7f));
@@ -81,10 +82,10 @@ static void cvm_oct_free_hw_skbuff(int pool, int
size, int elements)

 	if (elements < 0)
 		pr_warn("Freeing of pool %u had too many skbuffs (%d)\n",
-		     pool, elements);
+			pool, elements);
 	else if (elements > 0)
 		pr_warn("Freeing of pool %u is missing %d skbuffs\n",
-		       pool, elements);
+			pool, elements);
 }

 /**
@@ -115,7 +116,7 @@ static int cvm_oct_fill_hw_memory(int pool, int
size, int elements)
 		memory = kmalloc(size + 256, GFP_ATOMIC);
 		if (unlikely(memory == NULL)) {
 			pr_warn("Unable to allocate %u bytes for FPA pool %d\n",
-				   elements * size, pool);
+				elements * size, pool);
 			break;
 		}
 		fpa = (char *)(((unsigned long)memory + 256) & ~0x7fUL);
@@ -136,6 +137,7 @@ static void cvm_oct_free_hw_memory(int pool, int
size, int elements)
 {
 	char *memory;
 	char *fpa;
+
 	do {
 		fpa = cvmx_fpa_alloc(pool);
 		if (fpa) {
@@ -157,6 +159,7 @@ static void cvm_oct_free_hw_memory(int pool, int
size, int elements)
 int cvm_oct_mem_fill_fpa(int pool, int size, int elements)
 {
 	int freed;
+
 	if (USE_SKBUFFS_IN_HW && pool == CVMX_FPA_PACKET_POOL)
 		freed = cvm_oct_fill_hw_skbuff(pool, size, elements);
 	else
-- 
1.7.10.4




-- 
Mit freundlichen Grüßen,
 Nicolas Koch
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ