Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753516AbbLJOuW (ORCPT ); Thu, 10 Dec 2015 09:50:22 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:46960 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751134AbbLJOuU (ORCPT ); Thu, 10 Dec 2015 09:50:20 -0500 From: Felipe Balbi To: "Geyslan G. Bem" , CC: "Geyslan G. Bem" , Greg Kroah-Hartman , Johan Hovold , Robert Baldyga , , Subject: Re: [PATCH] usb: remove redundant conditions In-Reply-To: <1449712366-31365-1-git-send-email-geyslan@gmail.com> References: <1449712366-31365-1-git-send-email-geyslan@gmail.com> User-Agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Thu, 10 Dec 2015 08:50:10 -0600 Message-ID: <87zixijr31.fsf@saruman.tx.rr.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1631 Lines: 49 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, "Geyslan G. Bem" writes: > 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 Can you split this into one patch per driver, that way it's easier to apply by different maintainers. =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWaZEjAAoJEIaOsuA1yqREEn0P/jFrWynZh4TPpABojK0WrFol /+j7iCZTuacvghlj9l/uwG+1cJlp1kR5wPDoFxNaIijRQPuSZOqr1lrWHJP+ioZQ Jum5OVNn/DaOysKYuBdZ9WSlwdrz9aXUSwf2uzrUSVdIK/qrJeJ0ordCTv4Wz8wq B9DybGe/+vuvIvzEVClcDV/NPye5yQyBWB2ol5NW57NuY/hlVi405zi3WQI0SFYl EybC1V+ZNZvs3mtPvGX3K4tbAs/uPn8oB7KA6dmTvbfHV9YB1q2ptVxSXAQpAPSc 49p/kErwx3dgIIPRsz9XuG1iTjD3sui0lCFAeQkGWXXC2Z28OfL71rCteD83FSou nRGvog5OwXjmpqDpXXIRnp77lVqfa62YGwEdDJA30GoOtI232lUWtzbK48uWZ/EY xLdWjM0e7nl5U3ithQE+gV1X/qlaoV2bLsZK+CkD4rOsEWCi5I1pxCF7z7JUWSsL Y4XVMN+JpOEEbiHJoisSWEY1hNxz+SbPjSzB8O9yYAuqebafEJVWNfMLV/aVs28w Ltkx43UUUR0ZcyrYHo6yfXNdnyYF8KAhqyTGae8EjzXQVus6ZLemSZMi2b0i0AWj DSIsnPJvEqtoaiBSN41oRgZcUOU82jK90SN5kSxk3Yk/YXP5129sI2fhMqjWNCfz PM+2i6M2G92ak5XDINf7 =5PCx -----END PGP SIGNATURE----- --=-=-=-- -- 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/