From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail.x-arc.de ([217.6.246.34] helo=root.phytec.de) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b6CTa-0004xy-N7 for barebox@lists.infradead.org; Fri, 27 May 2016 07:46:37 +0000 Received: from idefix.phytec.de (idefix.phytec.de [172.16.0.10]) by root.phytec.de (Postfix) with ESMTP id 4D25BA00B57 for ; Fri, 27 May 2016 09:46:42 +0200 (CEST) From: Teresa Remmet Date: Fri, 27 May 2016 09:44:46 +0200 Message-Id: <1464335095-35180-54-git-send-email-t.remmet@phytec.de> In-Reply-To: <1464335095-35180-1-git-send-email-t.remmet@phytec.de> References: <1464335095-35180-1-git-send-email-t.remmet@phytec.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH v2 53/62] UBI: Fastmap: Simplify expression To: barebox@lists.infradead.org From: Richard Weinberger There is no need to compute pnum again. Signed-off-by: Richard Weinberger Acked-by: Brian Norris Signed-off-by: Teresa Remmet --- drivers/mtd/ubi/fastmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/ubi/fastmap.c b/drivers/mtd/ubi/fastmap.c index 1504911..173da9c 100644 --- a/drivers/mtd/ubi/fastmap.c +++ b/drivers/mtd/ubi/fastmap.c @@ -714,7 +714,7 @@ static int ubi_attach_fastmap(struct ubi_device *ubi, for (j = 0; j < be32_to_cpu(fm_eba->reserved_pebs); j++) { int pnum = be32_to_cpu(fm_eba->pnum[j]); - if ((int)be32_to_cpu(fm_eba->pnum[j]) < 0) + if (pnum < 0) continue; aeb = NULL; -- 1.9.1 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox