Commit 05973c2e authored by Mike Marshall's avatar Mike Marshall

orangefs: Dan Carpenter influenced cleanups...

This patch is simlar to one Dan Carpenter sent me, cleans
up some return codes and whitespace errors. There was one
place where he thought inserting an error message into
the ring buffer might be too chatty, I hope I convinced him
othewise. As a consolation <g> I changed a truly chatty
error message in another location into a debug message,
system-admins had already yelled at me about that one...
Signed-off-by: default avatarMike Marshall <hubcap@omnibond.com>
parent 70823b9b
...@@ -402,8 +402,9 @@ static ssize_t orangefs_devreq_write_iter(struct kiocb *iocb, ...@@ -402,8 +402,9 @@ static ssize_t orangefs_devreq_write_iter(struct kiocb *iocb,
/* remove the op from the in progress hash table */ /* remove the op from the in progress hash table */
op = orangefs_devreq_remove_op(head.tag); op = orangefs_devreq_remove_op(head.tag);
if (!op) { if (!op) {
gossip_err("WARNING: No one's waiting for tag %llu\n", gossip_debug(GOSSIP_DEV_DEBUG,
llu(head.tag)); "%s: No one's waiting for tag %llu\n",
__func__, llu(head.tag));
return ret; return ret;
} }
......
...@@ -965,13 +965,13 @@ int orangefs_debugfs_new_client_string(void __user *arg) ...@@ -965,13 +965,13 @@ int orangefs_debugfs_new_client_string(void __user *arg)
int ret; int ret;
ret = copy_from_user(&client_debug_array_string, ret = copy_from_user(&client_debug_array_string,
(void __user *)arg, (void __user *)arg,
ORANGEFS_MAX_DEBUG_STRING_LEN); ORANGEFS_MAX_DEBUG_STRING_LEN);
if (ret != 0) { if (ret != 0) {
pr_info("%s: CLIENT_STRING: copy_from_user failed\n", pr_info("%s: CLIENT_STRING: copy_from_user failed\n",
__func__); __func__);
return -EIO; return -EFAULT;
} }
/* /*
...@@ -986,17 +986,18 @@ int orangefs_debugfs_new_client_string(void __user *arg) ...@@ -986,17 +986,18 @@ int orangefs_debugfs_new_client_string(void __user *arg)
*/ */
client_debug_array_string[ORANGEFS_MAX_DEBUG_STRING_LEN - 1] = client_debug_array_string[ORANGEFS_MAX_DEBUG_STRING_LEN - 1] =
'\0'; '\0';
pr_info("%s: client debug array string has been received.\n", pr_info("%s: client debug array string has been received.\n",
__func__); __func__);
if (!help_string_initialized) { if (!help_string_initialized) {
/* Build a proper debug help string. */ /* Build a proper debug help string. */
if (orangefs_prepare_debugfs_help_string(0)) { ret = orangefs_prepare_debugfs_help_string(0);
if (ret) {
gossip_err("%s: no debug help string \n", gossip_err("%s: no debug help string \n",
__func__); __func__);
return -EIO; return ret;
} }
} }
...@@ -1009,7 +1010,7 @@ int orangefs_debugfs_new_client_string(void __user *arg) ...@@ -1009,7 +1010,7 @@ int orangefs_debugfs_new_client_string(void __user *arg)
help_string_initialized++; help_string_initialized++;
return ret; return 0;
} }
int orangefs_debugfs_new_debug(void __user *arg) int orangefs_debugfs_new_debug(void __user *arg)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment