From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752390AbcERHux (ORCPT ); Wed, 18 May 2016 03:50:53 -0400 Received: from lan.nucleusys.com ([92.247.61.126]:45010 "EHLO zztop.nucleusys.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751439AbcERHuv (ORCPT ); Wed, 18 May 2016 03:50:51 -0400 Date: Wed, 18 May 2016 10:50:45 +0300 From: Petko Manolov To: Oliver Neukum Cc: Guenter Roeck , Heinrich Schuchardt , Petko Manolov , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [1/1] net: pegasus: remove dead coding Message-ID: <20160518075045.GC4388@p310> References: <1463530410-12772-1-git-send-email-xypron.glpk@gmx.de> <20160518063024.GA29326@roeck-us.net> <1463555740.22748.0.camel@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1463555740.22748.0.camel@suse.com> User-Agent: Mutt/1.6.0 (2016-04-01) X-Spam-Score: -1.0 (-) X-Spam-Report: Spam detection software, running on the system "zztop.nucleusys.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 16-05-18 09:15:40, Oliver Neukum wrote: > On Tue, 2016-05-17 at 23:30 -0700, Guenter Roeck wrote: > > On Wed, May 18, 2016 at 02:13:30AM +0200, Heinrich Schuchardt wrote: > > > (!count || count < 4) is always true. > > > > Even if count >= 4 ? > > The check for !count is redundant, though. Gcc, however, > will surely simplify the expression. [...] Content analysis details: (-1.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP 0.0 TVD_RCVD_IP Message was received from an IP address Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16-05-18 09:15:40, Oliver Neukum wrote: > On Tue, 2016-05-17 at 23:30 -0700, Guenter Roeck wrote: > > On Wed, May 18, 2016 at 02:13:30AM +0200, Heinrich Schuchardt wrote: > > > (!count || count < 4) is always true. > > > > Even if count >= 4 ? > > The check for !count is redundant, though. Gcc, however, > will surely simplify the expression. Yep, gcc-6 generates this code: ... cmp $0x3,%edx jle b9 ... Which does not invalidate your statement that "!count" is redundant. :) Petko