Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp4036932ybx; Mon, 4 Nov 2019 06:52:09 -0800 (PST) X-Google-Smtp-Source: APXvYqzXvjkLgLjhze7Yxi2HSJrQptAnPomeZu4CSFG4L3RqeoHDYr5xXa2naNjSexkNOVv46b1m X-Received: by 2002:a17:906:2cd4:: with SMTP id r20mr23835562ejr.307.1572879129648; Mon, 04 Nov 2019 06:52:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572879129; cv=none; d=google.com; s=arc-20160816; b=aG+0jAEp49xvE2j29lTeyjOIIte0R8yl7hXam6RChjYwweQ+xcOPbRmZDtA0jCL0CH 3DkmmMevtb+qiDBJGjHwd+YX+7+APpAfjfuCLRbbj1hUAA2a5rde/jXDHCYLiQDWyTOl EkKB8AbmS6VHvkxY+krxtIV+ExkHGkqpa0EBceujPmKeGR8nyYBlRduN8fbfuHRamIi9 jztx3nc4qlQ+HRM6Mm9ay/rt/s5p+oJuz3grUrTd6thX9kHJGUSFpHqlver7d8KpE8lY uOIcz+4nRcahRkknlkh8ezgQAwJMq/QCeFi/b8ukfa3XvfnMacGX7UEOEO/GkvhaCbn+ gXDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=/Bb+p5r9lnSwrcSZepS9+znCNteKJxBZ3/8THZ9QnzY=; b=vstzydqdQtxgj5OkQEzWd7ItFtfIQejJXRbwLb2+DwfhZM/KkjsicdZflRpgKVvFXf oEded3bGsoM0siT4lT9HcnzAKZPs+fmhFZcKLUnqfjBXZknqKRjTvMjGbQzJKTIXv+Xn NJ4QQbMMZJxszhjLB596ZRZalVfD+ZsmTXJGcQCWoELPqa4FJU8zKLmFT6BFZhGf7ikn 8nnuqBBIZ53J3LTHUum88EN1mAfUhmycbIHZNra33ZW0BDe31yZ1uforMvWIu3LyO/Xp Nu8Ow/6VytIm5RBGnHQcuLCuaaqepuoEmi6/JtqXsMF1f0PJYvgT9CA+ba8pS1NwjBLX qtZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="esG+3K/T"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m16si12398017ejd.306.2019.11.04.06.51.45; Mon, 04 Nov 2019 06:52:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="esG+3K/T"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728556AbfKDOs6 (ORCPT + 99 others); Mon, 4 Nov 2019 09:48:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:51336 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727796AbfKDOs6 (ORCPT ); Mon, 4 Nov 2019 09:48:58 -0500 Received: from localhost (unknown [62.119.166.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1AB78218BA; Mon, 4 Nov 2019 14:48:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572878937; bh=hVMop/i9b335c2j96uGaUkv8Zt/8ejZGsLInDF6c9xw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=esG+3K/THFd1ZTOaKJIZZxu+svtt4ljO41FAcQonXNZv3PBFTAugpxmVcYUvC85Vj hsDsqZX//V6lWmG+Fh8eGLsAeROn4dcMMJAazBHVT1IJAT4FC0xBezh1HJe2Apu34n wGQeJ4dqz2g5Fi+u+SjxTuLMLgMVU0NJ54em6yx4= Date: Mon, 4 Nov 2019 15:48:45 +0100 From: Greg KH To: Saurav Girepunje Cc: gustavo@embeddedor.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, saurav.girepunje@hotmail.com Subject: Re: [PATCH] usb: isp1760: isp1760-hcd.c: Drop condition with no effect Message-ID: <20191104144845.GC2183570@kroah.com> References: <20191028211214.GA30014@saurav> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191028211214.GA30014@saurav> User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 29, 2019 at 02:42:14AM +0530, Saurav Girepunje wrote: > As the "else if" and "else" branch body are identical the condition > has no effect. So drop the "else if" condition. > > Signed-off-by: Saurav Girepunje > --- > drivers/usb/isp1760/isp1760-hcd.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/usb/isp1760/isp1760-hcd.c b/drivers/usb/isp1760/isp1760-hcd.c > index 320fc4739835..579a21bd70ad 100644 > --- a/drivers/usb/isp1760/isp1760-hcd.c > +++ b/drivers/usb/isp1760/isp1760-hcd.c > @@ -1032,8 +1032,6 @@ static int check_atl_transfer(struct usb_hcd *hcd, struct ptd *ptd, > urb->status = -EOVERFLOW; > else if (FROM_DW3_CERR(ptd->dw3)) > urb->status = -EPIPE; /* Stall */ > - else if (ptd->dw3 & DW3_ERROR_BIT) > - urb->status = -EPROTO; /* XactErr */ > else > urb->status = -EPROTO; /* Unknown */ Yes, the same thing happens, but look at the comment, this is two different things. So the code is good as-is. thanks, greg k-h