mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: linux-mtd@lists.infradead.org
Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de,
	Heinz.Egger@linutronix.de, artem.bityutskiy@linux.intel.com,
	tim.bird@am.sony.com, Richard Weinberger <richard@nod.at>
Subject: [PATCH 03/10] UBI: Export next_sqnum()
Date: Wed, 26 Sep 2012 17:51:43 +0200	[thread overview]
Message-ID: <1348674710-102885-4-git-send-email-richard@nod.at> (raw)
In-Reply-To: <1348674710-102885-1-git-send-email-richard@nod.at>

Fastmap needs next_sqnum(), rename it to ubi_next_sqnum()
and make it non-static.

Signed-off-by: Richard Weinberger <richard@nod.at>
---
 drivers/mtd/ubi/eba.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c
index a26d7d2..0910c2c 100644
--- a/drivers/mtd/ubi/eba.c
+++ b/drivers/mtd/ubi/eba.c
@@ -57,7 +57,7 @@
  * global sequence counter value. It also increases the global sequence
  * counter.
  */
-static unsigned long long next_sqnum(struct ubi_device *ubi)
+unsigned long long ubi_next_sqnum(struct ubi_device *ubi)
 {
 	unsigned long long sqnum;
 
@@ -521,7 +521,7 @@ retry:
 		goto out_put;
 	}
 
-	vid_hdr->sqnum = cpu_to_be64(next_sqnum(ubi));
+	vid_hdr->sqnum = cpu_to_be64(ubi_next_sqnum(ubi));
 	err = ubi_io_write_vid_hdr(ubi, new_pnum, vid_hdr);
 	if (err)
 		goto write_error;
@@ -632,7 +632,7 @@ int ubi_eba_write_leb(struct ubi_device *ubi, struct ubi_volume *vol, int lnum,
 	}
 
 	vid_hdr->vol_type = UBI_VID_DYNAMIC;
-	vid_hdr->sqnum = cpu_to_be64(next_sqnum(ubi));
+	vid_hdr->sqnum = cpu_to_be64(ubi_next_sqnum(ubi));
 	vid_hdr->vol_id = cpu_to_be32(vol_id);
 	vid_hdr->lnum = cpu_to_be32(lnum);
 	vid_hdr->compat = ubi_get_compat(ubi, vol_id);
@@ -692,7 +692,7 @@ write_error:
 		return err;
 	}
 
-	vid_hdr->sqnum = cpu_to_be64(next_sqnum(ubi));
+	vid_hdr->sqnum = cpu_to_be64(ubi_next_sqnum(ubi));
 	ubi_msg("try another PEB");
 	goto retry;
 }
@@ -745,7 +745,7 @@ int ubi_eba_write_leb_st(struct ubi_device *ubi, struct ubi_volume *vol,
 		return err;
 	}
 
-	vid_hdr->sqnum = cpu_to_be64(next_sqnum(ubi));
+	vid_hdr->sqnum = cpu_to_be64(ubi_next_sqnum(ubi));
 	vid_hdr->vol_id = cpu_to_be32(vol_id);
 	vid_hdr->lnum = cpu_to_be32(lnum);
 	vid_hdr->compat = ubi_get_compat(ubi, vol_id);
@@ -810,7 +810,7 @@ write_error:
 		return err;
 	}
 
-	vid_hdr->sqnum = cpu_to_be64(next_sqnum(ubi));
+	vid_hdr->sqnum = cpu_to_be64(ubi_next_sqnum(ubi));
 	ubi_msg("try another PEB");
 	goto retry;
 }
@@ -862,7 +862,7 @@ int ubi_eba_atomic_leb_change(struct ubi_device *ubi, struct ubi_volume *vol,
 	if (err)
 		goto out_mutex;
 
-	vid_hdr->sqnum = cpu_to_be64(next_sqnum(ubi));
+	vid_hdr->sqnum = cpu_to_be64(ubi_next_sqnum(ubi));
 	vid_hdr->vol_id = cpu_to_be32(vol_id);
 	vid_hdr->lnum = cpu_to_be32(lnum);
 	vid_hdr->compat = ubi_get_compat(ubi, vol_id);
@@ -930,7 +930,7 @@ write_error:
 		goto out_leb_unlock;
 	}
 
-	vid_hdr->sqnum = cpu_to_be64(next_sqnum(ubi));
+	vid_hdr->sqnum = cpu_to_be64(ubi_next_sqnum(ubi));
 	ubi_msg("try another PEB");
 	goto retry;
 }
@@ -1089,7 +1089,7 @@ int ubi_eba_copy_leb(struct ubi_device *ubi, int from, int to,
 		vid_hdr->data_size = cpu_to_be32(data_size);
 		vid_hdr->data_crc = cpu_to_be32(crc);
 	}
-	vid_hdr->sqnum = cpu_to_be64(next_sqnum(ubi));
+	vid_hdr->sqnum = cpu_to_be64(ubi_next_sqnum(ubi));
 
 	err = ubi_io_write_vid_hdr(ubi, to, vid_hdr);
 	if (err) {
-- 
1.7.6.5


  parent reply	other threads:[~2012-09-26 15:53 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-26 15:51 UBI: Fastmap request for inclusion (v19) Richard Weinberger
2012-09-26 15:51 ` [PATCH 01/10] UBI: Add fastmap on-flash data structures Richard Weinberger
2012-09-26 15:51 ` [PATCH 02/10] UBI: Add fastmap stuff to ubi.h Richard Weinberger
2012-09-26 15:51 ` Richard Weinberger [this message]
2012-09-26 15:51 ` [PATCH 04/10] UBI: Add self_check_eba() Richard Weinberger
2012-09-26 15:51 ` [PATCH 05/10] UBI: Add fastmap bits to build.c Richard Weinberger
2012-09-26 15:51 ` [PATCH 06/10] UBI: Wire-up ->fm_sem Richard Weinberger
2012-09-26 15:51 ` [PATCH 07/10] UBI: Add fastmap stuff to attach.c Richard Weinberger
2012-09-26 15:51 ` [PATCH 08/10] UBI: Add fastmap support to the WL sub-system Richard Weinberger
2012-09-26 15:51 ` [PATCH 09/10] UBI: Add fastmap core Richard Weinberger
2012-09-26 15:51 ` [PATCH 10/10] UBI: Wire-up fastmap Richard Weinberger
2012-09-27 22:18 ` UBI: Fastmap request for inclusion (v19) richard -rw- weinberger
2012-10-03  8:25 ` Artem Bityutskiy
2012-10-03  8:36   ` Richard Weinberger
2012-10-03  8:43     ` Artem Bityutskiy
2012-10-03  8:44     ` Artem Bityutskiy
2012-10-03  9:03       ` Richard Weinberger
2012-10-03  9:30         ` Artem Bityutskiy
2012-10-03  9:32           ` Richard Weinberger
2012-10-03 11:05     ` Artem Bityutskiy
2012-10-03 11:18       ` Artem Bityutskiy
2012-10-03 12:13       ` Artem Bityutskiy
  -- strict thread matches above, loose matches on Subject: below --
2012-09-24 18:31 UBI: Fastmap request for inclusion (v18) Richard Weinberger
2012-09-24 18:31 ` [PATCH 03/10] UBI: Export next_sqnum() Richard Weinberger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1348674710-102885-4-git-send-email-richard@nod.at \
    --to=richard@nod.at \
    --cc=Heinz.Egger@linutronix.de \
    --cc=artem.bityutskiy@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=tglx@linutronix.de \
    --cc=tim.bird@am.sony.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®