diff mbox series

[11/13] lightnvm: pblk: Remove unused smeta_ssec field

Message ID 20190227171442.11853-12-igor.j.konopko@intel.com (mailing list archive)
State New, archived
Headers show
Series lightnvm: bugfixes and improvements | expand

Commit Message

Igor Konopko Feb. 27, 2019, 5:14 p.m. UTC
Smeta_ssec field in pblk_line is set once and
never used, since it was replaced by function
pblk_line_smeta_start(). This patch removes
this no longer needed field

Signed-off-by: Igor Konopko <igor.j.konopko@intel.com>
---
 drivers/lightnvm/pblk-core.c | 1 -
 drivers/lightnvm/pblk.h      | 1 -
 2 files changed, 2 deletions(-)

Comments

Javier González March 4, 2019, 8:21 a.m. UTC | #1
> On 27 Feb 2019, at 18.14, Igor Konopko <igor.j.konopko@intel.com> wrote:
> 
> Smeta_ssec field in pblk_line is set once and
> never used, since it was replaced by function
> pblk_line_smeta_start(). This patch removes
> this no longer needed field
> 
> Signed-off-by: Igor Konopko <igor.j.konopko@intel.com>
> ---
> drivers/lightnvm/pblk-core.c | 1 -
> drivers/lightnvm/pblk.h      | 1 -
> 2 files changed, 2 deletions(-)
> 
> diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c
> index 2e424c0275c1..fa4dc05608ff 100644
> --- a/drivers/lightnvm/pblk-core.c
> +++ b/drivers/lightnvm/pblk-core.c
> @@ -1165,7 +1165,6 @@ static int pblk_line_init_bb(struct pblk *pblk, struct pblk_line *line,
> 	off = bit * geo->ws_opt;
> 	bitmap_set(line->map_bitmap, off, lm->smeta_sec);
> 	line->sec_in_line -= lm->smeta_sec;
> -	line->smeta_ssec = off;
> 	line->cur_sec = off + lm->smeta_sec;
> 
> 	if (init && pblk_line_smeta_write(pblk, line, off)) {
> diff --git a/drivers/lightnvm/pblk.h b/drivers/lightnvm/pblk.h
> index a92377530930..b266563508e6 100644
> --- a/drivers/lightnvm/pblk.h
> +++ b/drivers/lightnvm/pblk.h
> @@ -464,7 +464,6 @@ struct pblk_line {
> 	int meta_line;			/* Metadata line id */
> 	int meta_distance;		/* Distance between data and metadata */
> 
> -	u64 smeta_ssec;			/* Sector where smeta starts */
> 	u64 emeta_ssec;			/* Sector where emeta starts */
> 
> 	unsigned int sec_in_line;	/* Number of usable secs in line */
> --
> 2.17.1

Looks good to me.

Reviewed-by: Javier González <javier@javigon.com>
Hans Holmberg March 4, 2019, 9:40 a.m. UTC | #2
Good riddance!

Reviewed-by: Hans Holmberg <hans.holmberg@cnexlabs.com>

On Mon, Mar 4, 2019 at 9:21 AM Javier González <javier@javigon.com> wrote:
>
> > On 27 Feb 2019, at 18.14, Igor Konopko <igor.j.konopko@intel.com> wrote:
> >
> > Smeta_ssec field in pblk_line is set once and
> > never used, since it was replaced by function
> > pblk_line_smeta_start(). This patch removes
> > this no longer needed field
> >
> > Signed-off-by: Igor Konopko <igor.j.konopko@intel.com>
> > ---
> > drivers/lightnvm/pblk-core.c | 1 -
> > drivers/lightnvm/pblk.h      | 1 -
> > 2 files changed, 2 deletions(-)
> >
> > diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c
> > index 2e424c0275c1..fa4dc05608ff 100644
> > --- a/drivers/lightnvm/pblk-core.c
> > +++ b/drivers/lightnvm/pblk-core.c
> > @@ -1165,7 +1165,6 @@ static int pblk_line_init_bb(struct pblk *pblk, struct pblk_line *line,
> >       off = bit * geo->ws_opt;
> >       bitmap_set(line->map_bitmap, off, lm->smeta_sec);
> >       line->sec_in_line -= lm->smeta_sec;
> > -     line->smeta_ssec = off;
> >       line->cur_sec = off + lm->smeta_sec;
> >
> >       if (init && pblk_line_smeta_write(pblk, line, off)) {
> > diff --git a/drivers/lightnvm/pblk.h b/drivers/lightnvm/pblk.h
> > index a92377530930..b266563508e6 100644
> > --- a/drivers/lightnvm/pblk.h
> > +++ b/drivers/lightnvm/pblk.h
> > @@ -464,7 +464,6 @@ struct pblk_line {
> >       int meta_line;                  /* Metadata line id */
> >       int meta_distance;              /* Distance between data and metadata */
> >
> > -     u64 smeta_ssec;                 /* Sector where smeta starts */
> >       u64 emeta_ssec;                 /* Sector where emeta starts */
> >
> >       unsigned int sec_in_line;       /* Number of usable secs in line */
> > --
> > 2.17.1
>
> Looks good to me.
>
> Reviewed-by: Javier González <javier@javigon.com>
diff mbox series

Patch

diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c
index 2e424c0275c1..fa4dc05608ff 100644
--- a/drivers/lightnvm/pblk-core.c
+++ b/drivers/lightnvm/pblk-core.c
@@ -1165,7 +1165,6 @@  static int pblk_line_init_bb(struct pblk *pblk, struct pblk_line *line,
 	off = bit * geo->ws_opt;
 	bitmap_set(line->map_bitmap, off, lm->smeta_sec);
 	line->sec_in_line -= lm->smeta_sec;
-	line->smeta_ssec = off;
 	line->cur_sec = off + lm->smeta_sec;
 
 	if (init && pblk_line_smeta_write(pblk, line, off)) {
diff --git a/drivers/lightnvm/pblk.h b/drivers/lightnvm/pblk.h
index a92377530930..b266563508e6 100644
--- a/drivers/lightnvm/pblk.h
+++ b/drivers/lightnvm/pblk.h
@@ -464,7 +464,6 @@  struct pblk_line {
 	int meta_line;			/* Metadata line id */
 	int meta_distance;		/* Distance between data and metadata */
 
-	u64 smeta_ssec;			/* Sector where smeta starts */
 	u64 emeta_ssec;			/* Sector where emeta starts */
 
 	unsigned int sec_in_line;	/* Number of usable secs in line */