From patchwork Mon Feb 27 18:14:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simran Singhal X-Patchwork-Id: 9593701 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 B743D601D7 for ; Mon, 27 Feb 2017 18:15:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AE689284DC for ; Mon, 27 Feb 2017 18:15:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A1B08284DE; Mon, 27 Feb 2017 18:15:30 +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 513B8284C9 for ; Mon, 27 Feb 2017 18:15:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751704AbdB0SPJ (ORCPT ); Mon, 27 Feb 2017 13:15:09 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:36314 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751552AbdB0SPH (ORCPT ); Mon, 27 Feb 2017 13:15:07 -0500 Received: by mail-pf0-f195.google.com with SMTP id j5so2368430pfb.3; Mon, 27 Feb 2017 10:12:42 -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=POK9M3fo3zT7mAWidbw8u1Cn9EsH+WygLl6OaGw5RLY=; b=ViPGfugMoOwl/1ImMy5NcSdso3WnmDA6VY0+uou/cnrVeeEHxT4XFNqaxB+OCMVEa7 nJiSuiNDaaC8t4N+qogo/zFXvi4wwhT29gOMS1rN40BQLB8crPALxj4KHtUvgI9NoLJC fTldg/4ew8NgItlyfQGEpQQ1UAgRa7T+Aza6uQrZqgxjKKcVJ/c1f9J1PdDFAhPKJAoz 1/dgpHDkivTLznmzSIrRH1mRIJak3YCTtqHPhHIVaGKN8ZVT9JDTFXIL26iDJU847sPL 6kHlHxXIX+v95OdxBqh8hubuHL0OYisM5R/RN+upRn49Xqwl7gbt/vMd/p4TKA3qlMtw RY2A== 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=POK9M3fo3zT7mAWidbw8u1Cn9EsH+WygLl6OaGw5RLY=; b=TlxyaPCc9ThNtzmZDUJS3BAtxgo74TmSZkhFVO5rNCus//J0Pba/Z0kVkWKxvDjyO+ 9A/S3PtOKWdpqCqm5jlCCCPqSb03oKaRCU72ltd06iNsOuwb/Q1NiFJEecqjyvXXBLNe vWue7SNHkjHpeOBUvLcB5JM3K9Dr4ca8Oh7LFfouy3z576r6ov9o3UIEookbRVu5PUtf KpRXrWGtjh3MorKii/jcNdi+I7M/mogiFsfHBMG91WOaw5BWuslAu9wCd7v9Xndy4w27 WqX3/ukcLACqleD261kSCTDW011eA11o43mXK7XtYC69pHpHZUQXFUFWUlmO3l8Ai+xi abgg== X-Gm-Message-State: AMke39mtrU5pnP+OpvLepZH/wjyg1XhRU0bhe+bZgduZcV8NA+p274GJ4gsHQHsc8JLGeQ== X-Received: by 10.99.151.18 with SMTP id n18mr19288613pge.183.1488219162035; Mon, 27 Feb 2017 10:12:42 -0800 (PST) Received: from singhal-Inspiron-5558 ([14.139.82.6]) by smtp.gmail.com with ESMTPSA id e68sm14880932pfa.85.2017.02.27.10.12.40 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 27 Feb 2017 10:12:41 -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 4/5] staging: sm750fb: Remove unnecessary else after return Date: Mon, 27 Feb 2017 23:44:27 +0530 Message-Id: <1488219268-3006-4-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/sm750fb/ddk750_sii164.c | 6 ++---- drivers/staging/sm750fb/ddk750_swi2c.c | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/staging/sm750fb/ddk750_sii164.c b/drivers/staging/sm750fb/ddk750_sii164.c index 259006a..6906598 100644 --- a/drivers/staging/sm750fb/ddk750_sii164.c +++ b/drivers/staging/sm750fb/ddk750_sii164.c @@ -368,8 +368,7 @@ unsigned char sii164IsConnected(void) hotPlugValue = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT) & SII164_DETECT_HOT_PLUG_STATUS_MASK; if (hotPlugValue == SII164_DETECT_HOT_PLUG_STATUS_ON) return 1; - else - return 0; + return 0; } /* @@ -387,8 +386,7 @@ unsigned char sii164CheckInterrupt(void) detectReg = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT) & SII164_DETECT_MONITOR_STATE_MASK; if (detectReg == SII164_DETECT_MONITOR_STATE_CHANGE) return 1; - else - return 0; + return 0; } /* diff --git a/drivers/staging/sm750fb/ddk750_swi2c.c b/drivers/staging/sm750fb/ddk750_swi2c.c index a4ac07c..5997349 100644 --- a/drivers/staging/sm750fb/ddk750_swi2c.c +++ b/drivers/staging/sm750fb/ddk750_swi2c.c @@ -199,8 +199,7 @@ static unsigned char sw_i2c_read_sda(void) gpio_data = peek32(sw_i2c_data_gpio_data_reg); if (gpio_data & (1 << sw_i2c_data_gpio)) return 1; - else - return 0; + return 0; } /* @@ -295,8 +294,7 @@ static long sw_i2c_write_byte(unsigned char data) if (i < 0xff) return 0; - else - return -1; + return -1; } /*