Skip to contentSkip to conversation

Staging: lustre: Replace comparision "page != NULL" to "page"

PATCH In review Sandhya Bankar 2 participants 2 messages Feb 21, 2016 – Feb 26, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: lustre: Replace comparision "page != NULL" to "page"

Replace comparision "page != NULL" to "page"

---
 drivers/staging/lustre/lustre/obdclass/cl_page.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/obdclass/cl_page.c +1 -1
index 61f28eb..88ee72b 100644
@@ -284,7 +284,7 @@ static struct cl_page *cl_page_alloc(const struct lu_env *env,
 	struct lu_object_header *head;
 
 	page = kzalloc(cl_object_header(o)->coh_page_bufsize, GFP_NOFS);
-	if (page != NULL) {
+	if (page) {
 		int result = 0;
 
 		atomic_set(&page->cp_ref, 1);
Signature · 1 line
1.8.3.4
maintainer
#1 lore raw
Quoted 12 lines · Sandhya Bankar

Replace comparision "page != NULL" to "page"

---
 drivers/staging/lustre/lustre/obdclass/cl_page.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/obdclass/cl_page.c +0 -0
index 61f28eb..88ee72b 100644

drivers/staging/lustre/lustre/obdclass/cl_page.c static struct cl_page *cl_page_alloc(const struct lu_env *env, · line 290

Quoted 8 lines
drivers/staging/lustre/lustre/obdclass/cl_page.c +1 -1
@@ -284,7 +284,7 @@ static struct cl_page *cl_page_alloc(const struct lu_env *env,
 	struct lu_object_header *head;
 
 	page = kzalloc(cl_object_header(o)->coh_page_bufsize, GFP_NOFS);
-	if (page != NULL) {
+	if (page) {
 		int result = 0;
 
 		atomic_set(&page->cp_ref, 1);

Doesn't apply to the tree :(