From patchwork Mon Feb 27 18:14:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simran Singhal X-Patchwork-Id: 9593713 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 5EBEE601D7 for ; Mon, 27 Feb 2017 18:16:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 55E3328491 for ; Mon, 27 Feb 2017 18:16:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4AB5728495; Mon, 27 Feb 2017 18:16:16 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, 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 0409428491 for ; Mon, 27 Feb 2017 18:16:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751809AbdB0SPd (ORCPT ); Mon, 27 Feb 2017 13:15:33 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:35123 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751556AbdB0SPH (ORCPT ); Mon, 27 Feb 2017 13:15:07 -0500 Received: by mail-pf0-f193.google.com with SMTP id y23so927167pfk.2; Mon, 27 Feb 2017 10:12:46 -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:in-reply-to:references; bh=wx6bHQpmQFtE0dCgqA4sgIhd/wbk75lNMGZ8nPdw62M=; b=DSJX7o7+sU2h7YGJkJ/YVr8T6p6sQP8tV0U6fDTjdrWWaXvB7VgdLMSLEg3eEZUymI 0ZPeD/fKqonD+enm1XwgSl2jS3Df20bdmfbVektYdj7aXjlj/B52X5d6MxANcx7cyIF0 AvRG19CEGLxYjypPPfQC/r6qs/OuCh/UL1MZha5AUz/Xlsh/5+SyLRZtFi9rXjJozxYT jaQ0w1ahJ/gPibW242P92huhP3LeNVjC1tN4zi61GBxaSMghiHMuoxtjVvZZwHNUH0i2 C3z7X0ISPc0USWEMsN0gfaTelSlYOwCWZVl3E5HDUp4xON6OPVFAb+COwn578BCE6pfd 7paw== 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:in-reply-to :references; bh=wx6bHQpmQFtE0dCgqA4sgIhd/wbk75lNMGZ8nPdw62M=; b=Rijy7LikkH3UrG4BwpaDzmPPinsIT9tMdXoYYLsirhElDXsC6cZONjZq642hyzJoBc dF2FPOPKxFGF97/ZWOznspypvVjkYYATGaSLxsufNnel1flnY7PxegBAgNITgOX6uKQv V7A+Z46qPGBKzvW127Eg7Re1pJVIUq0OToqZUPQe6Q704pAv7yGs2+6YDjBe1EbJvr9E r61pd1y4bho0tf7fGt9V3KksGmHt3LOaUsrGULks7HttUPvbkqdKAm5Eu8AcZZi0kznG zat5snHwNMP53LsypQRpGzEnnWc1iP18JWq4cH+E1zWfiPdf1OYNcUZt/wR3r3TUdpm/ ITIg== X-Gm-Message-State: AMke39mCUQehKJ5Psifwv3zuqkqnpU3AOikui7DnXuU66hKyiI/55S8k3GWYG076Rdg2yg== X-Received: by 10.99.101.131 with SMTP id z125mr22173728pgb.218.1488219165783; Mon, 27 Feb 2017 10:12:45 -0800 (PST) Received: from singhal-Inspiron-5558 ([14.139.82.6]) by smtp.gmail.com with ESMTPSA id p66sm31927359pfb.88.2017.02.27.10.12.44 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 27 Feb 2017 10:12:44 -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 5/5] staging: gdm724x: Remove unnecessary else after return Date: Mon, 27 Feb 2017 23:44:28 +0530 Message-Id: <1488219268-3006-5-git-send-email-singhalsimran0@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1488219268-3006-1-git-send-email-singhalsimran0@gmail.com> References: <1488219268-3006-1-git-send-email-singhalsimran0@gmail.com> 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. This was done using Coccinelle: @@ expression e2; statement s1; @@ if(e2) { ... return ...; } -else s1 Signed-off-by: simran singhal --- drivers/staging/gdm724x/gdm_endian.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/staging/gdm724x/gdm_endian.c b/drivers/staging/gdm724x/gdm_endian.c index d0b43e2..4ef728f 100644 --- a/drivers/staging/gdm724x/gdm_endian.c +++ b/drivers/staging/gdm724x/gdm_endian.c @@ -26,30 +26,26 @@ __dev16 gdm_cpu_to_dev16(struct gdm_endian *ed, u16 x) { if (ed->dev_ed == ENDIANNESS_LITTLE) return (__force __dev16)cpu_to_le16(x); - else - return (__force __dev16)cpu_to_be16(x); + return (__force __dev16)cpu_to_be16(x); } u16 gdm_dev16_to_cpu(struct gdm_endian *ed, __dev16 x) { if (ed->dev_ed == ENDIANNESS_LITTLE) return le16_to_cpu((__force __le16)x); - else - return be16_to_cpu((__force __be16)x); + return be16_to_cpu((__force __be16)x); } __dev32 gdm_cpu_to_dev32(struct gdm_endian *ed, u32 x) { if (ed->dev_ed == ENDIANNESS_LITTLE) return (__force __dev32)cpu_to_le32(x); - else - return (__force __dev32)cpu_to_be32(x); + return (__force __dev32)cpu_to_be32(x); } u32 gdm_dev32_to_cpu(struct gdm_endian *ed, __dev32 x) { if (ed->dev_ed == ENDIANNESS_LITTLE) return le32_to_cpu((__force __le32)x); - else - return be32_to_cpu((__force __be32)x); + return be32_to_cpu((__force __be32)x); }