Skip to contentSkip to conversation

staging: android: Remove allocation from declaration line

PATCH In review Quentin Lambert 2 participants 2 messages Feb 10, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: android: Remove allocation from declaration line

This patch removes allocation from declaration line because people are known to gloss over declarations.

---
 drivers/staging/android/ion/ion_page_pool.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/staging/android/ion/ion_page_pool.c +3 -2
index 4b88f11..7643d83 100644
@@ -148,8 +148,9 @@ int ion_page_pool_shrink(struct ion_page_pool *pool, gfp_t gfp_mask,
 
 struct ion_page_pool *ion_page_pool_create(gfp_t gfp_mask, unsigned int order)
 {
-	struct ion_page_pool *pool = kmalloc(sizeof(struct ion_page_pool),
-					     GFP_KERNEL);
+	struct ion_page_pool *pool;
+
+	pool = kmalloc(sizeof(struct ion_page_pool), GFP_KERNEL);
 	if (!pool)
 		return NULL;
 	pool->high_count = 0;
Signature · 1 line
1.9.1
#1 lore raw
Quoted 2 lines · Quentin Lambert

This patch removes allocation from declaration line because people are known to gloss over declarations.

Then those people should not be reviewing kernel code :)

Seriously, this is unneeded churn, the code is fine as-is.

thanks,

greg k-h