[2/3] mtd: onenand: make onenand_scan_bbt() static
diff mbox

Message ID 1452782691-5193-2-git-send-email-thomas.petazzoni@free-electrons.com
State Accepted
Commit fd2a2f20c7a8173acd4858e5178eb40fd7c025b9
Headers show

Commit Message

Thomas Petazzoni Jan. 14, 2016, 2:44 p.m. UTC
Like was done in commit 17799359e7b3fa6ef4f2bf926cd6821cf7903ecf
("mtd: nand_bbt: make nand_scan_bbt() static") for the NAND code, this
commit makes the onenand_scan_bbt() function static in the OneNAND
code, since it is only used in onenand_bbt.c itself.

Consequently, the EXPORT_SYMBOL() and declaration in bbm.h are also
removed.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 drivers/mtd/onenand/onenand_bbt.c | 3 +--
 include/linux/mtd/bbm.h           | 1 -
 2 files changed, 1 insertion(+), 3 deletions(-)

Comments

Boris Brezillon Jan. 14, 2016, 3:56 p.m. UTC | #1
+Peter

On Thu, 14 Jan 2016 15:44:50 +0100
Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote:

> Like was done in commit 17799359e7b3fa6ef4f2bf926cd6821cf7903ecf
> ("mtd: nand_bbt: make nand_scan_bbt() static") for the NAND code, this
> commit makes the onenand_scan_bbt() function static in the OneNAND
> code, since it is only used in onenand_bbt.c itself.
> 
> Consequently, the EXPORT_SYMBOL() and declaration in bbm.h are also
> removed.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Not sure how this will impact the BBT rework done by Peter, but those
are trivial changes, so I guess it should be pretty easy to fix the
conflicts in case Brian decides to take them before the BBT rework
changes.

Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>

> ---
>  drivers/mtd/onenand/onenand_bbt.c | 3 +--
>  include/linux/mtd/bbm.h           | 1 -
>  2 files changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/mtd/onenand/onenand_bbt.c b/drivers/mtd/onenand/onenand_bbt.c
> index 08d0085..5f8d470 100644
> --- a/drivers/mtd/onenand/onenand_bbt.c
> +++ b/drivers/mtd/onenand/onenand_bbt.c
> @@ -179,7 +179,7 @@ static int onenand_isbad_bbt(struct mtd_info *mtd, loff_t offs, int allowbbt)
>   * by the onenand_release function.
>   *
>   */
> -int onenand_scan_bbt(struct mtd_info *mtd, struct nand_bbt_descr *bd)
> +static int onenand_scan_bbt(struct mtd_info *mtd, struct nand_bbt_descr *bd)
>  {
>  	struct onenand_chip *this = mtd->priv;
>  	struct bbm_info *bbm = this->bbm;
> @@ -248,5 +248,4 @@ int onenand_default_bbt(struct mtd_info *mtd)
>  	return onenand_scan_bbt(mtd, bbm->badblock_pattern);
>  }
>  
> -EXPORT_SYMBOL(onenand_scan_bbt);
>  EXPORT_SYMBOL(onenand_default_bbt);
> diff --git a/include/linux/mtd/bbm.h b/include/linux/mtd/bbm.h
> index 36bb6a5..3bf8f95 100644
> --- a/include/linux/mtd/bbm.h
> +++ b/include/linux/mtd/bbm.h
> @@ -166,7 +166,6 @@ struct bbm_info {
>  };
>  
>  /* OneNAND BBT interface */
> -extern int onenand_scan_bbt(struct mtd_info *mtd, struct nand_bbt_descr *bd);
>  extern int onenand_default_bbt(struct mtd_info *mtd);
>  
>  #endif	/* __LINUX_MTD_BBM_H */

Patch
diff mbox

diff --git a/drivers/mtd/onenand/onenand_bbt.c b/drivers/mtd/onenand/onenand_bbt.c
index 08d0085..5f8d470 100644
--- a/drivers/mtd/onenand/onenand_bbt.c
+++ b/drivers/mtd/onenand/onenand_bbt.c
@@ -179,7 +179,7 @@  static int onenand_isbad_bbt(struct mtd_info *mtd, loff_t offs, int allowbbt)
  * by the onenand_release function.
  *
  */
-int onenand_scan_bbt(struct mtd_info *mtd, struct nand_bbt_descr *bd)
+static int onenand_scan_bbt(struct mtd_info *mtd, struct nand_bbt_descr *bd)
 {
 	struct onenand_chip *this = mtd->priv;
 	struct bbm_info *bbm = this->bbm;
@@ -248,5 +248,4 @@  int onenand_default_bbt(struct mtd_info *mtd)
 	return onenand_scan_bbt(mtd, bbm->badblock_pattern);
 }
 
-EXPORT_SYMBOL(onenand_scan_bbt);
 EXPORT_SYMBOL(onenand_default_bbt);
diff --git a/include/linux/mtd/bbm.h b/include/linux/mtd/bbm.h
index 36bb6a5..3bf8f95 100644
--- a/include/linux/mtd/bbm.h
+++ b/include/linux/mtd/bbm.h
@@ -166,7 +166,6 @@  struct bbm_info {
 };
 
 /* OneNAND BBT interface */
-extern int onenand_scan_bbt(struct mtd_info *mtd, struct nand_bbt_descr *bd);
 extern int onenand_default_bbt(struct mtd_info *mtd);
 
 #endif	/* __LINUX_MTD_BBM_H */