From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from b.ns.miles-group.at ([95.130.255.144] helo=radon.swed.at) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VPY6R-0003h4-Ni for linux-mtd@lists.infradead.org; Fri, 27 Sep 2013 13:29:04 +0000 Message-ID: <52458809.6050704@nod.at> Date: Fri, 27 Sep 2013 15:28:41 +0200 From: Richard Weinberger MIME-Version: 1.0 To: Richard Genoud Subject: Re: [PATCH] UBI: simplify image sequence test References: <1380286316-29911-1-git-send-email-richard.genoud@gmail.com> <1380286316-29911-2-git-send-email-richard.genoud@gmail.com> In-Reply-To: <1380286316-29911-2-git-send-email-richard.genoud@gmail.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: linux-mtd , David Woodhouse , linux-kernel@vger.kernel.org, Artem Bityutskiy List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Am 27.09.2013 14:51, schrieb Richard Genoud: > The test: > if (!a && b) > a = b; > can be symplified in: > if (!a) > a = b; > > And there's no need to test if ubi->image_seq is not null, because if it is, > it is set to image_seq. > So, we just test if image_seq is not null. > > Signed-off-by: Richard Genoud Acked-by: Richard Weinberger From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754140Ab3I0Nc1 (ORCPT ); Fri, 27 Sep 2013 09:32:27 -0400 Received: from b.ns.miles-group.at ([95.130.255.144]:1660 "EHLO radon.swed.at" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752206Ab3I0N2n (ORCPT ); Fri, 27 Sep 2013 09:28:43 -0400 Message-ID: <52458809.6050704@nod.at> Date: Fri, 27 Sep 2013 15:28:41 +0200 From: Richard Weinberger User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: Richard Genoud CC: Artem Bityutskiy , David Woodhouse , linux-mtd , linux-kernel@vger.kernel.org Subject: Re: [PATCH] UBI: simplify image sequence test References: <1380286316-29911-1-git-send-email-richard.genoud@gmail.com> <1380286316-29911-2-git-send-email-richard.genoud@gmail.com> In-Reply-To: <1380286316-29911-2-git-send-email-richard.genoud@gmail.com> X-Enigmail-Version: 1.5.2 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 27.09.2013 14:51, schrieb Richard Genoud: > The test: > if (!a && b) > a = b; > can be symplified in: > if (!a) > a = b; > > And there's no need to test if ubi->image_seq is not null, because if it is, > it is set to image_seq. > So, we just test if image_seq is not null. > > Signed-off-by: Richard Genoud Acked-by: Richard Weinberger