Skip to contentSkip to conversation

Staging: lustre: Move export_symbol below its function

PATCH Superseded aybuke ozdemir 2 participants 7 messages Feb 21, 2015 Staging

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/5 Staging: lustre: Move export_symbol below its function

This patch fixes "EXPORT_SYMBOL(foo); should immediately follow its function/variable" checkpatch.pl warning in file.c

---
 drivers/staging/lustre/lustre/llite/file.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/lustre/lustre/llite/file.c +1 -2
index 7c7ef7e..40bb11e 100644
@@ -3233,6 +3233,7 @@ void *ll_iocontrol_register(llioc_callback_t cb, int count, unsigned int *cmd)
 
 	return in_data;
 }
+EXPORT_SYMBOL(ll_iocontrol_register);
 
 void ll_iocontrol_unregister(void *magic)
 {
@@ -3257,8 +3258,6 @@ void ll_iocontrol_unregister(void *magic)
 
 	CWARN("didn't find iocontrol register block with magic: %p\n", magic);
 }
-
-EXPORT_SYMBOL(ll_iocontrol_register);
 EXPORT_SYMBOL(ll_iocontrol_unregister);
 
 static enum llioc_iter
Signature · 1 line
1.9.1
#1 lore raw

PATCH 2/5 Staging: lustre: Added blank line after declarations

This patch fixes "Missing a blank line after declarations" checkpatch.pl warning in file.c

---
 drivers/staging/lustre/lustre/llite/file.c | 1 +
 1 file changed, 1 insertion(+)
drivers/staging/lustre/lustre/llite/file.c +1 -0
index 40bb11e..845589f 100644
@@ -197,6 +197,7 @@ static int ll_close_inode_openhandle(struct obd_export *md_exp,
 	}
 	if (rc == 0 && op_data->op_bias & MDS_HSM_RELEASE) {
 		struct mdt_body *body;
+
 		body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY);
 		if (!(body->valid & OBD_MD_FLRELEASED))
 			rc = -EBUSY;
Signature · 1 line
1.9.1
#2 lore raw

PATCH 3/5 Staging: lustre: Corrected code indentation

In reply to aybuke ozdemir

This patch fixes these warning messages found by checkpatch.pl:
WARNING: suspect code indent for conditional statements(8,15)

---
 drivers/staging/lustre/lustre/llite/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/llite/file.c +1 -1
index 845589f..9a7ab65 100644
@@ -2822,7 +2822,7 @@ int ll_have_md_lock(struct inode *inode, __u64 *bits,  ldlm_mode_t l_req_mode)
 	int i;
 
 	if (!inode)
-	       return 0;
+		return 0;
 
 	fid = &ll_i2info(inode)->lli_fid;
 	CDEBUG(D_INFO, "trying to match res "DFID" mode %s\n", PFID(fid),
Signature · 1 line
1.9.1
#4 lore raw

PATCH 4/5 Staging: lustre: Added spaces around '='

In reply to aybuke ozdemir

This patch fixes "spaces required around that '=' (ctx:VxV)" checkpatch.pl error in file.c

---
 drivers/staging/lustre/lustre/llite/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/llite/file.c +1 -1
index 9a7ab65..2dd6a8d 100644
@@ -270,7 +270,7 @@ static int ll_md_close(struct obd_export *md_exp, struct inode *inode,
 	int lockmode;
 	__u64 flags = LDLM_FL_BLOCK_GRANTED | LDLM_FL_TEST_LOCK;
 	struct lustre_handle lockh;
-	ldlm_policy_data_t policy = {.l_inodebits={MDS_INODELOCK_OPEN}};
+	ldlm_policy_data_t policy = {.l_inodebits = {MDS_INODELOCK_OPEN}};
 	int rc = 0;
 
 	/* clear group lock, if present */
Signature · 1 line
1.9.1
#6 lore raw

PATCH 5/5 Staging: lustre: Remove space after the name of that function

In reply to aybuke ozdemir

Fix checkpatch.pl issues with "space prohibited between function name and open parenthesis" in file.c

---
 drivers/staging/lustre/lustre/llite/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/llite/file.c +1 -1
index 2dd6a8d..16e3045 100644
@@ -693,7 +693,7 @@ restart:
 out_och_free:
 	if (rc) {
 		if (och_p && *och_p) {
-			OBD_FREE(*och_p, sizeof (struct obd_client_handle));
+			OBD_FREE(*och_p, sizeof(struct obd_client_handle));
 			*och_p = NULL; /* OBD_FREE writes some magic there */
 			(*och_usecount)--;
 		}
Signature · 1 line
1.9.1
#3 lore raw

Re: [Outreachy kernel] [PATCH 3/5] Staging: lustre: Corrected code indentation

In reply to aybuke ozdemir
Quoted 2 lines · aybuke ozdemir

This patch fixes these warning messages found by checkpatch.pl:
WARNING: suspect code indent for conditional statements(8,15)

It would be good to say what you have done, rather than just that you have fixed something. In this case I suspect that you converted spaces to tabs?

julia

Quoted 28 lines
---
 drivers/staging/lustre/lustre/llite/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/llite/file.c +1 -2
index 845589f..9a7ab65 100644
@@ -2822,7 +2822,7 @@ int ll_have_md_lock(struct inode *inode, __u64 *bits,  ldlm_mode_t l_req_mode)
 	int i;
 
 	if (!inode)
-	       return 0;
+		return 0;
 
 	fid = &ll_i2info(inode)->lli_fid;
 	CDEBUG(D_INFO, "trying to match res "DFID" mode %s\n", PFID(fid),
--

1.9.1

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1424519075-4378-3-git-send-email-aybuke.147%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

#5 lore raw

Re: [Outreachy kernel] [PATCH 4/5] Staging: lustre: Added spaces around '='

In reply to aybuke ozdemir
Quoted 2 lines · aybuke ozdemir

This patch fixes "spaces required around that '=' (ctx:VxV)" checkpatch.pl error in file.c

Likewise, here you can say "Add spaces around =, to conform to kernel coding type. This problem was found by checkpatch." That says what you have done and why.

julia

Quoted 28 lines
---
 drivers/staging/lustre/lustre/llite/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/llite/file.c +1 -2
index 9a7ab65..2dd6a8d 100644
@@ -270,7 +270,7 @@ static int ll_md_close(struct obd_export *md_exp, struct inode *inode,
 	int lockmode;
 	__u64 flags = LDLM_FL_BLOCK_GRANTED | LDLM_FL_TEST_LOCK;
 	struct lustre_handle lockh;
-	ldlm_policy_data_t policy = {.l_inodebits={MDS_INODELOCK_OPEN}};
+	ldlm_policy_data_t policy = {.l_inodebits = {MDS_INODELOCK_OPEN}};
 	int rc = 0;
 
 	/* clear group lock, if present */
--

1.9.1

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1424519075-4378-4-git-send-email-aybuke.147%40gmail.com.
For more options, visit https://groups.google.com/d/optout.