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>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1475058332-15817-1-git-send-email-mayhs11saini@gmail.com>
Date:   Wed, 28 Sep 2016 15:55:32 +0530
From:   shyam saini <mayhs11saini@...il.com>
To:     labbott@...hat.com
Cc:     sumit.semwal@...aro.org, gregkh@...uxfoundation.org,
        linux-kernel@...r.kernel.org, devel@...verdev.osuosl.org,
        arve@...roid.com, shyam saini <mayhs11saini@...il.com>
Subject: [PATCH 1/1] Staging: android: ion : Remove explicit NULL comparison and Fixed coding style

Remove the explicit NULL comparison and rewrite in a compact form and
fixed switch case indentation issue.

Signed-off-by: shyam saini <mayhs11saini@...il.com>
---
 drivers/staging/android/ion/ion_of.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/android/ion/ion_of.c b/drivers/staging/android/ion/ion_of.c
index de0899a..0b7bb30 100644
--- a/drivers/staging/android/ion/ion_of.c
+++ b/drivers/staging/android/ion/ion_of.c
@@ -36,7 +36,7 @@ int ion_parse_dt_heap_common(struct device_node *heap_node,
 			break;
 	}
 
-	if (compatible[i].name == NULL)
+	if (!compatible[i].name)
 		return -ENODEV;
 
 	heap->id = compatible[i].heap_id;
@@ -58,15 +58,15 @@ int ion_setup_heap_common(struct platform_device *parent,
 	int ret = 0;
 
 	switch (heap->type) {
-		case ION_HEAP_TYPE_CARVEOUT:
-		case ION_HEAP_TYPE_CHUNK:
-			if (heap->base && heap->size)
-				return 0;
-
-			ret = of_reserved_mem_device_init(heap->priv);
-			break;
-		default:
-			break;
+	case ION_HEAP_TYPE_CARVEOUT:
+	case ION_HEAP_TYPE_CHUNK:
+		if (heap->base && heap->size)
+			return 0;
+
+		ret = of_reserved_mem_device_init(heap->priv);
+		break;
+	default:
+		break;
 	}
 
 	return ret;
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ