From patchwork Mon Feb 27 18:14:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simran Singhal X-Patchwork-Id: 9593695 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 BF267601D7 for ; Mon, 27 Feb 2017 18:15:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B63102849F for ; Mon, 27 Feb 2017 18:15:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A98D8284BC; Mon, 27 Feb 2017 18:15:09 +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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 2593B284C9 for ; Mon, 27 Feb 2017 18:15:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751697AbdB0SPI (ORCPT ); Mon, 27 Feb 2017 13:15:08 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:36253 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751378AbdB0SPH (ORCPT ); Mon, 27 Feb 2017 13:15:07 -0500 Received: by mail-pf0-f196.google.com with SMTP id j5so2367903pfb.3; Mon, 27 Feb 2017 10:12:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=Uv300gixtI6Pu4mrlhF8aC7mOa8YiKTcPSbpdrJHymE=; b=UEBLe1hroeWFajEjJ5V9axJwjusU5tGeBX6dI2Cc+wJC2ANFSImKfXZ1vX1dc2tM8A /t6UaC7cZ4jZHnl3RSfQ9HEwNMJq9Mu7EdR5PyR674a0jjdSdpzjEmrdXrPKoc19uekA dOPPszGA80EItxXBNJNsRTLiBRrnKGvLhUAdqrI9GsaZhJrk6wu0Gz/J7ehFsXFfshxZ 9EAqi3id+4FSyPma1d4zKKQt8FSjqLRlE5+pkExBq4J7IzTRm4LwdqSuROz6dKsEG2X1 G24UQwg25chlJOnvYvxxgCs0uHanh2c1opvBoNiaimKvTv2J1brthg0T0dqIGjddSvRU XF/A== 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=Uv300gixtI6Pu4mrlhF8aC7mOa8YiKTcPSbpdrJHymE=; b=PVo0GwbbN1nJ9ao3DBXYkmHF0rIoWwFj37QzeDsve8jPvLRV0bFhpvazoibqNOhAYQ tzKJ7ZkRnUOzdCL7Hx54ZBawjBiv8hjDPsjMdvQfejO2T2guoA6fYCiPM77PNawL5WcU 3S2vvOD6ZZYBNqlc5JoD641VywJ9ts5DX9uYYOj9mf+FiGtPlWUjx71/vdL/bdBsZQX/ Lm5JibkBtl4WUN+fAtPWNU9kqfDRQ2jftgeLPz/EQU3eoCuMytvPG9/AScbf6n5X4lB9 R/SqqDcAFYunVpEthKLJgVJiymkToDYhc7v8eAAYFk4AiOK9lgrKRH3pqE/gE5VQ0r9T lu2Q== X-Gm-Message-State: AMke39mkuJXgzic4GHxixQO93GTZe5FdcZNsbK2vKOKK0LA4GiKZJRTfs/rtSIuiUGlmiA== X-Received: by 10.99.44.138 with SMTP id s132mr22543821pgs.88.1488219150713; Mon, 27 Feb 2017 10:12:30 -0800 (PST) Received: from singhal-Inspiron-5558 ([14.139.82.6]) by smtp.gmail.com with ESMTPSA id c11sm31950293pfe.68.2017.02.27.10.12.28 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 27 Feb 2017 10:12:29 -0800 (PST) From: simran singhal To: gregkh@linuxfoundation.org Cc: lustre-devel@lists.lustre.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org, outreachy-kernel@googlegroups.com Subject: [PATCH 1/5] staging: lustre: Remove unnecessary else after return Date: Mon, 27 Feb 2017 23:44:24 +0530 Message-Id: <1488219268-3006-1-git-send-email-singhalsimran0@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch fixes the checkpatch warning that else is not generally useful after a break or return. @@ expression e2; statement s1; @@ if(e2) { ... return ...; } -else s1 Signed-off-by: simran singhal --- drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c | 3 +-- drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c index fbbd8a5..02d49b7 100644 --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c @@ -1806,8 +1806,7 @@ ksocknal_close_matching_conns(struct lnet_process_id id, __u32 ipaddr) if (!count) return -ENOENT; - else - return 0; + return 0; } void diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c b/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c index cf3fc57..ac32c82 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c @@ -338,8 +338,7 @@ static int ldlm_cli_pool_shrink(struct ldlm_pool *pl, if (nr == 0) return (unused / 100) * sysctl_vfs_cache_pressure; - else - return ldlm_cancel_lru(ns, nr, LCF_ASYNC, LDLM_LRU_FLAG_SHRINK); + return ldlm_cancel_lru(ns, nr, LCF_ASYNC, LDLM_LRU_FLAG_SHRINK); } static const struct ldlm_pool_ops ldlm_cli_pool_ops = {