From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932572AbdDPINc (ORCPT ); Sun, 16 Apr 2017 04:13:32 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:57024 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932274AbdDPIGN (ORCPT ); Sun, 16 Apr 2017 04:06:13 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mike Marshall Subject: [PATCH 4.9 09/31] orangefs: Dan Carpenter influenced cleanups... Date: Sun, 16 Apr 2017 10:04:00 +0200 Message-Id: <20170416080222.284675926@linuxfoundation.org> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170416080221.808058771@linuxfoundation.org> References: <20170416080221.808058771@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mike Marshall commit 05973c2efb40122f2a9ecde2d065f7ea5068d024 upstream. 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 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: Mike Marshall Signed-off-by: Greg Kroah-Hartman --- fs/orangefs/devorangefs-req.c | 5 +++-- fs/orangefs/orangefs-debugfs.c | 15 ++++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) --- a/fs/orangefs/devorangefs-req.c +++ b/fs/orangefs/devorangefs-req.c @@ -402,8 +402,9 @@ static ssize_t orangefs_devreq_write_ite /* remove the op from the in progress hash table */ op = orangefs_devreq_remove_op(head.tag); if (!op) { - gossip_err("WARNING: No one's waiting for tag %llu\n", - llu(head.tag)); + gossip_debug(GOSSIP_DEV_DEBUG, + "%s: No one's waiting for tag %llu\n", + __func__, llu(head.tag)); return ret; } --- a/fs/orangefs/orangefs-debugfs.c +++ b/fs/orangefs/orangefs-debugfs.c @@ -965,13 +965,13 @@ int orangefs_debugfs_new_client_string(v int ret; ret = copy_from_user(&client_debug_array_string, - (void __user *)arg, - ORANGEFS_MAX_DEBUG_STRING_LEN); + (void __user *)arg, + ORANGEFS_MAX_DEBUG_STRING_LEN); if (ret != 0) { pr_info("%s: CLIENT_STRING: copy_from_user failed\n", __func__); - return -EIO; + return -EFAULT; } /* @@ -986,17 +986,18 @@ int orangefs_debugfs_new_client_string(v */ client_debug_array_string[ORANGEFS_MAX_DEBUG_STRING_LEN - 1] = '\0'; - + pr_info("%s: client debug array string has been received.\n", __func__); if (!help_string_initialized) { /* 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", __func__); - return -EIO; + return ret; } } @@ -1009,7 +1010,7 @@ int orangefs_debugfs_new_client_string(v help_string_initialized++; - return ret; + return 0; } int orangefs_debugfs_new_debug(void __user *arg)