Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1485078 > unrolled thread

[PATCH v3 02/18] UBI: fix add_fastmap() to use the vid_hdr passed in argument

Started byBoris Brezillon <boris.brezillon@free-electrons.com>
First post2016-09-16 17:00 +0200
Last post2016-09-16 17:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v3 02/18] UBI: fix add_fastmap() to use the vid_hdr passed in argument Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-09-16 17:00 +0200

#1485078 — [PATCH v3 02/18] UBI: fix add_fastmap() to use the vid_hdr passed in argument

FromBoris Brezillon <boris.brezillon@free-electrons.com>
Date2016-09-16 17:00 +0200
Subject[PATCH v3 02/18] UBI: fix add_fastmap() to use the vid_hdr passed in argument
Message-ID<si2Mp-63M-5@gated-at.bofh.it>
add_fastmap() is passed a ubi_vid_hdr pointer in argument, but is
referencing the global vidh pointer.
Even if this is correct from a functional point of view (vidh and vid_hdr
point to the same object), it is confusing.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
---
 drivers/mtd/ubi/attach.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/ubi/attach.c b/drivers/mtd/ubi/attach.c
index 903becd31410..95138ae2062f 100644
--- a/drivers/mtd/ubi/attach.c
+++ b/drivers/mtd/ubi/attach.c
@@ -197,8 +197,8 @@ static int add_fastmap(struct ubi_attach_info *ai, int pnum,
 		return -ENOMEM;
 
 	aeb->pnum = pnum;
-	aeb->vol_id = be32_to_cpu(vidh->vol_id);
-	aeb->sqnum = be64_to_cpu(vidh->sqnum);
+	aeb->vol_id = be32_to_cpu(vid_hdr->vol_id);
+	aeb->sqnum = be64_to_cpu(vid_hdr->sqnum);
 	aeb->ec = ec;
 	list_add(&aeb->u.list, &ai->fastmap);
 
-- 
2.7.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web