Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754435AbbLKJQB (ORCPT ); Fri, 11 Dec 2015 04:16:01 -0500 Received: from mail-lb0-f170.google.com ([209.85.217.170]:34697 "EHLO mail-lb0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753842AbbLKJPz (ORCPT ); Fri, 11 Dec 2015 04:15:55 -0500 Date: Fri, 11 Dec 2015 10:16:32 +0100 From: Johan Hovold To: "Geyslan G. Bem" Cc: peter.senna@gmail.com, Johan Hovold , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/4] usb: serial: remove redundant conditions Message-ID: <20151211091632.GH28650@localhost> References: <1449780614-5933-1-git-send-email-geyslan@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1449780614-5933-1-git-send-email-geyslan@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 911 Lines: 27 On Thu, Dec 10, 2015 at 05:50:09PM -0300, Geyslan G. Bem wrote: > This patch removes redundant conditions. > > (!A || (A && B)) is the same as (!A || B). > (length && length > 5) can be reduced to a single evaluation. > > Tested by compilation only. > Caught by cppcheck. > > Signed-off-by: Geyslan G. Bem > --- > drivers/usb/serial/io_edgeport.c | 35 ++++++++++++++--------------------- > drivers/usb/serial/mos7840.c | 2 +- > 2 files changed, 15 insertions(+), 22 deletions(-) Please split this up per driver as I (and Felipe) asked. You can send these two separate from the rest, and remember to CC the USB list. Thanks, Johan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/