From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752133AbdCCRuv (ORCPT ); Fri, 3 Mar 2017 12:50:51 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:43997 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751677AbdCCRuq (ORCPT ); Fri, 3 Mar 2017 12:50:46 -0500 Date: Fri, 3 Mar 2017 20:48:07 +0300 From: Dan Carpenter To: Julia Lawall Cc: Arushi Singhal , devel@driverdev.osuosl.org, Kirk Reiser , Greg Kroah-Hartman , speakup@linux-speakup.org, linux-kernel@vger.kernel.org, outreachy-kernel@googlegroups.com, Samuel Thibault , Chris Brannon Subject: Re: [Outreachy kernel] [PATCH] staging: speakup: else is not generally useful after a break or return Message-ID: <20170303171706.GH4132@mwanda> References: <20170303155557.GA23744@arushi-HP-Pavilion-Notebook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 03, 2017 at 05:03:09PM +0100, Julia Lawall wrote: > > > On Fri, 3 Mar 2017, Arushi Singhal wrote: > > > fixed checkpatch.pl warning: else is not generally useful after a break > > or return. > > Removed the else without affecting the logic. > > Dead code is also eliminated. > > The chhange is not correct. There is a big chain of if/else if. The if > (type == KT_LATIN) can reach the code at the end of the file. > Yeah. And KT_CUR as well. regards, dan carpenter