From patchwork Mon Feb 6 16:21:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Marshall X-Patchwork-Id: 9558325 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0ABFB602B1 for ; Mon, 6 Feb 2017 16:21:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F0F5626D05 for ; Mon, 6 Feb 2017 16:21:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E5D7026E90; Mon, 6 Feb 2017 16:21:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C137326D05 for ; Mon, 6 Feb 2017 16:21:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754523AbdBFQVb (ORCPT ); Mon, 6 Feb 2017 11:21:31 -0500 Received: from mail-yw0-f169.google.com ([209.85.161.169]:36157 "EHLO mail-yw0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753061AbdBFQVa (ORCPT ); Mon, 6 Feb 2017 11:21:30 -0500 Received: by mail-yw0-f169.google.com with SMTP id v200so51238063ywc.3 for ; Mon, 06 Feb 2017 08:21:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=omnibond-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=3yCIQojUdTwvZfSvFp9/Xvf7RzI5m1uRqBNLB1jceVM=; b=Fc5xZ2aGUb0NmlBsHb/eZ9fDtihCI0Y/Q9WZV/mbniFYwTA1LMcqwpRqzNPBfagUmG wxKGguSKeCov7ICjI4qMmn6qdUn2zi+OA1d5rZkltXSwM8vZh8kV34GmHPhMY920tdfZ Zafoxi4Z7GJyeOwQhGB/sGr94teHB3ZnO91xhwlxqruRvC4a9wArSCroLUq3fZLcfFCP /hH8ZOngB7Zwdf7KVVUJ2F+37aiRIaCcxNwsL/+Ywb9SS7bbo3TsxuMfjmiulcQFiX6e T0nUkp4D+qzf8Fd/fJkOBXdTuulHedXVOidA5X8yM1QZqoDrLz0q9AUijOIfXf0jUM5W LpuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=3yCIQojUdTwvZfSvFp9/Xvf7RzI5m1uRqBNLB1jceVM=; b=EkG5Gud54Sq+w/q7/DA26OFFm1q/JMLw0R6Y38OIfUfCpMNldwmabEZx60t30DaUDz PiaAtn8hcl+7+LIrtookpIKkdqvyIlgY8IoaRu3L963KAa/vWJxZtwKxsngySWeU8MWr zvTlRyIt7EBEPiO1NkUDqkMplwHByvvPkHBvob7OPwuLKPEsLuscHxCYYO5NzcbcJ227 jNFzCSJsPxQHHj5ZmkhkQ5eMsjIfkW5KXmKqzUJQhT9FxeJT5d6jfB8quAhhIox7PqVB vPtmwcxjtT73yeyFijrsLziyoaKFgo5+DbRfX7DiQ8gfjhPJZxsz4P71wGNChI9yiQN+ 7CYg== X-Gm-Message-State: AIkVDXJvxORjL0ES9v384OF7V8us0BQ++74+gfTkq5ZVGzxQyTEtojPPgT9r4ik70nlKJQ== X-Received: by 10.129.115.9 with SMTP id o9mr7955764ywc.312.1486398089846; Mon, 06 Feb 2017 08:21:29 -0800 (PST) Received: from logtruck.clemson.edu ([2620:103:a003:102:738d:d49:574b:6717]) by smtp.gmail.com with ESMTPSA id k2sm469015ywh.28.2017.02.06.08.21.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Feb 2017 08:21:28 -0800 (PST) From: Mike Marshall To: viro@zeniv.linux.org.uk Cc: Mike Marshall , dan.carpenter@oracle.com, linux-fsdevel@vger.kernel.org Subject: [PATCH] orangefs: Dan Carpenter influenced cleanups... Date: Mon, 6 Feb 2017 11:21:20 -0500 Message-Id: <20170206162120.16717-1-hubcap@omnibond.com> X-Mailer: git-send-email 2.9.3 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- fs/orangefs/devorangefs-req.c | 5 +++-- fs/orangefs/orangefs-debugfs.c | 12 ++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/fs/orangefs/devorangefs-req.c b/fs/orangefs/devorangefs-req.c index 516ffb4..f419dd9 100644 --- a/fs/orangefs/devorangefs-req.c +++ b/fs/orangefs/devorangefs-req.c @@ -402,8 +402,9 @@ static ssize_t orangefs_devreq_write_iter(struct kiocb *iocb, /* 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; } diff --git a/fs/orangefs/orangefs-debugfs.c b/fs/orangefs/orangefs-debugfs.c index b5dbc9c..039c4da 100644 --- a/fs/orangefs/orangefs-debugfs.c +++ b/fs/orangefs/orangefs-debugfs.c @@ -965,13 +965,13 @@ int orangefs_debugfs_new_client_string(void __user *arg) 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,7 +986,7 @@ int orangefs_debugfs_new_client_string(void __user *arg) */ client_debug_array_string[ORANGEFS_MAX_DEBUG_STRING_LEN - 1] = '\0'; - + pr_info("%s: client debug array string has been received.\n", __func__); @@ -996,7 +996,7 @@ int orangefs_debugfs_new_client_string(void __user *arg) if (orangefs_prepare_debugfs_help_string(0)) { gossip_err("%s: no debug help string \n", __func__); - return -EIO; + return -EFAULT; } } @@ -1009,7 +1009,7 @@ int orangefs_debugfs_new_client_string(void __user *arg) help_string_initialized++; - return ret; + return 0; } int orangefs_debugfs_new_debug(void __user *arg)