diff mbox

mtd: nand: make nand_ooblayout_lp_hamming_ops static

Message ID 20170504121100.2709-1-colin.king@canonical.com
State Accepted
Commit d4ed3b9015b5eebc90d629579d9e7944607cbae5
Delegated to: Boris Brezillon
Headers show

Commit Message

Colin Ian King May 4, 2017, 12:11 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

nand_ooblayout_lp_hamming_ops can be made static as it does not need to be
in global scope.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/mtd/nand/nand_base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Boris Brezillon May 4, 2017, 2:08 p.m. UTC | #1
On Thu,  4 May 2017 13:11:00 +0100
Colin King <colin.king@canonical.com> wrote:

> From: Colin Ian King <colin.king@canonical.com>
> 
> nand_ooblayout_lp_hamming_ops can be made static as it does not need to be
> in global scope.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

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

Brian, feel free to apply this patch directly if you want, otherwise,
I'll queue it for 4.13.

> ---
>  drivers/mtd/nand/nand_base.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
> index d474378ed810..d3a735012b81 100644
> --- a/drivers/mtd/nand/nand_base.c
> +++ b/drivers/mtd/nand/nand_base.c
> @@ -202,7 +202,7 @@ static int nand_ooblayout_free_lp_hamming(struct mtd_info *mtd, int section,
>  	return 0;
>  }
>  
> -const struct mtd_ooblayout_ops nand_ooblayout_lp_hamming_ops = {
> +static const struct mtd_ooblayout_ops nand_ooblayout_lp_hamming_ops = {
>  	.ecc = nand_ooblayout_ecc_lp_hamming,
>  	.free = nand_ooblayout_free_lp_hamming,
>  };
Brian Norris May 11, 2017, 6:35 p.m. UTC | #2
On Thu, May 04, 2017 at 04:08:13PM +0200, Boris Brezillon wrote:
> On Thu,  4 May 2017 13:11:00 +0100
> Colin King <colin.king@canonical.com> wrote:
> 
> > From: Colin Ian King <colin.king@canonical.com>
> > 
> > nand_ooblayout_lp_hamming_ops can be made static as it does not need to be
> > in global scope.
> > 
> > Signed-off-by: Colin Ian King <colin.king@canonical.com>
> 
> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> 
> Brian, feel free to apply this patch directly if you want, otherwise,
> I'll queue it for 4.13.

Eh, queue it for 4.13, or in a fixes branch if you want.
Boris Brezillon May 15, 2017, 8:45 p.m. UTC | #3
On Thu,  4 May 2017 13:11:00 +0100
Colin King <colin.king@canonical.com> wrote:

> From: Colin Ian King <colin.king@canonical.com>
> 
> nand_ooblayout_lp_hamming_ops can be made static as it does not need to be
> in global scope.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied to nand/fixes.

Thanks,

Boris

> ---
>  drivers/mtd/nand/nand_base.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
> index d474378ed810..d3a735012b81 100644
> --- a/drivers/mtd/nand/nand_base.c
> +++ b/drivers/mtd/nand/nand_base.c
> @@ -202,7 +202,7 @@ static int nand_ooblayout_free_lp_hamming(struct mtd_info *mtd, int section,
>  	return 0;
>  }
>  
> -const struct mtd_ooblayout_ops nand_ooblayout_lp_hamming_ops = {
> +static const struct mtd_ooblayout_ops nand_ooblayout_lp_hamming_ops = {
>  	.ecc = nand_ooblayout_ecc_lp_hamming,
>  	.free = nand_ooblayout_free_lp_hamming,
>  };
diff mbox

Patch

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index d474378ed810..d3a735012b81 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -202,7 +202,7 @@  static int nand_ooblayout_free_lp_hamming(struct mtd_info *mtd, int section,
 	return 0;
 }
 
-const struct mtd_ooblayout_ops nand_ooblayout_lp_hamming_ops = {
+static const struct mtd_ooblayout_ops nand_ooblayout_lp_hamming_ops = {
 	.ecc = nand_ooblayout_ecc_lp_hamming,
 	.free = nand_ooblayout_free_lp_hamming,
 };