linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] UBI: Fastmap: Simplify expression
@ 2015-07-03  8:36 Richard Weinberger
  2015-07-03  8:36 ` [PATCH 2/3] UBI: Fix typo in comment Richard Weinberger
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Richard Weinberger @ 2015-07-03  8:36 UTC (permalink / raw)
  To: linux-mtd; +Cc: Richard Weinberger

There is no need to compute pnum again.

Signed-off-by: Richard Weinberger <richard@nod.at>
---
 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 24f2cf6..22db594 100644
--- a/drivers/mtd/ubi/fastmap.c
+++ b/drivers/mtd/ubi/fastmap.c
@@ -775,7 +775,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.8.4.5

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-10-03 18:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-03  8:36 [PATCH 1/3] UBI: Fastmap: Simplify expression Richard Weinberger
2015-07-03  8:36 ` [PATCH 2/3] UBI: Fix typo in comment Richard Weinberger
2015-09-29  1:36   ` Brian Norris
2015-10-03 18:10     ` Richard Weinberger
2015-07-03  8:36 ` [PATCH 3/3] UBI: Fix debug message Richard Weinberger
2015-09-29  1:35   ` Brian Norris
2015-10-03 18:10     ` Richard Weinberger
2015-09-29  1:35 ` [PATCH 1/3] UBI: Fastmap: Simplify expression Brian Norris
2015-10-03 18:09   ` Richard Weinberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).