Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752123AbbLJKnz (ORCPT ); Thu, 10 Dec 2015 05:43:55 -0500 Received: from mail-lf0-f49.google.com ([209.85.215.49]:33174 "EHLO mail-lf0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751303AbbLJKnx (ORCPT ); Thu, 10 Dec 2015 05:43:53 -0500 Date: Thu, 10 Dec 2015 11:44:30 +0100 From: Johan Hovold To: "Geyslan G. Bem" Cc: peter.senna@gmail.com, Felipe Balbi , Greg Kroah-Hartman , Johan Hovold , Robert Baldyga , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] usb: remove redundant conditions Message-ID: <20151210104430.GE24965@localhost> References: <1449712366-31365-1-git-send-email-geyslan@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1449712366-31365-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: 953 Lines: 25 On Wed, Dec 09, 2015 at 10:52:42PM -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. > > Caught by: cppcheck > > Signed-off-by: Geyslan G. Bem > --- > drivers/usb/gadget/udc/s3c-hsudc.c | 2 +- > drivers/usb/host/fhci-sched.c | 2 +- > drivers/usb/musb/musb_gadget.c | 5 ++--- > drivers/usb/serial/io_edgeport.c | 35 ++++++++++++++--------------------- > drivers/usb/serial/mos7840.c | 2 +- > 5 files changed, 19 insertions(+), 27 deletions(-) Please split out (at least) the usb-serial changes into two patches. 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/