Skip to contentSkip to conversation

Staging: lustre: Move export_symbol below its function

PATCH New aybuke ozdemir 1 participant 5 messages Feb 26, 2015 Staging

lore
Share & tools
lore
#0 lore raw

PATCH v3 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

---
Changes since v1:
* There is no change, in the set of incorrect file was removed.

---
 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 5ebee6c..25bd513 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 v3 2/5 Staging: lustre: Added blank line after declarations

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

---
Changes since v1:
* There is no change, in the set of incorrect file was removed.

---
 drivers/staging/lustre/lustre/llite/file.c | 1 +
 1 file changed, 1 insertion(+)
drivers/staging/lustre/lustre/llite/file.c +1 -0
index 25bd513..d14fc9c 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 v3 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)

---
Changes since v1:
* changed the description
Changes since v2:
There is no change in the set of incorrect file was removed.

---
 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 d14fc9c..247b4f0 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
#3 lore raw

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

In reply to aybuke ozdemir

Add spaces around =, to conform to kernel coding type. This problem was found by checkpatch.

---
Changes since v1:
* changed the description
Changes since v2:
There is no change in the set of incorrect file was removed.

---
 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 247b4f0..ab8f1a98 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
#4 lore raw

PATCH v3 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

---
Changes since v1:
* There is no change in the set of incorrect file was removed.

---
 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 ab8f1a98..0fd113d 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