Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1204293

[PATCH V2 2/4] staging: lustre: checkpatch: symbol == NULL should be !symbol

From Swee Hua Law <sweehua81@gmail.com>
Newsgroups linux.kernel
Subject [PATCH V2 2/4] staging: lustre: checkpatch: symbol == NULL should be !symbol
Date 2015-08-10 16:00 +0200
Message-ID <pVVMl-88D-5@gated-at.bofh.it> (permalink)
References <pVBaW-27A-5@gated-at.bofh.it> <pVVMm-88D-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Fix checkpatch problem: change == NULL comparison to !symbol

Signed-off-by: Swee Hua Law <sweehua81@gmail.com>
---
 drivers/staging/lustre/lustre/llite/remote_perm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/llite/remote_perm.c b/drivers/staging/lustre/lustre/llite/remote_perm.c
index c9a7816..aeda91a 100644
--- a/drivers/staging/lustre/lustre/llite/remote_perm.c
+++ b/drivers/staging/lustre/lustre/llite/remote_perm.c
@@ -184,7 +184,7 @@ int ll_update_remote_perm(struct inode *inode, struct mdt_remote_perm *perm)
 
 	if (!lli->lli_remote_perms) {
 		perm_hash = alloc_rmtperm_hash();
-		if (perm_hash == NULL) {
+		if (!perm_hash) {
 			CERROR("alloc lli_remote_perms failed!\n");
 			return -ENOMEM;
 		}
@@ -287,7 +287,7 @@ int lustre_check_remote_perm(struct inode *inode, int mask)
 
 		perm = req_capsule_server_swab_get(&req->rq_pill, &RMF_ACL,
 						   lustre_swab_mdt_remote_perm);
-		if (unlikely(perm == NULL)) {
+		if (unlikely(!perm)) {
 			mutex_unlock(&lli->lli_rmtperm_mutex);
 			rc = -EPROTO;
 			break;
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] Fix various coding style problem Swee Hua Law <sweehua81@gmail.com> - 2015-08-09 18:00 +0200
  Re: [PATCH] Fix various coding style problem Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-08-10 06:50 +0200
  [PATCH V2 2/4] staging: lustre: checkpatch: symbol == NULL should be !symbol Swee Hua Law <sweehua81@gmail.com> - 2015-08-10 16:00 +0200
  [PATCH V2 0/4] staging: lustre: split checkpatch fix for remote_perm.c into series Swee Hua Law <sweehua81@gmail.com> - 2015-08-10 16:00 +0200
    [PATCH V2 1/4] staging: lustre: checkpatch: do not init global to NULL Swee Hua Law <sweehua81@gmail.com> - 2015-08-10 16:00 +0200
    [PATCH V2 3/4] staging: lustre: checkpatch: move */ block comment to next line Swee Hua Law <sweehua81@gmail.com> - 2015-08-10 16:00 +0200
    [PATCH V2 4/4] staging: lustre: checkpatch: argument alignment for readability Swee Hua Law <sweehua81@gmail.com> - 2015-08-10 16:00 +0200

csiph-web