diff --git a/drivers/mtd/mtd_nandscheme.c b/drivers/mtd/mtd_nandscheme.c index 17269bb09d2..69a2ec4271c 100644 --- a/drivers/mtd/mtd_nandscheme.c +++ b/drivers/mtd/mtd_nandscheme.c @@ -344,7 +344,7 @@ void nandscheme_writeextra(FAR const struct nand_scheme_s *scheme, * * Input Parameters: * scheme Pointer to a nand_scheme_s instance. - * spareSize Size of spare area. + * sparesize Size of spare area. * offset Index where to write the first extra byte. * size Number of extra bytes to write. * offset Index where to write the first extra byte. @@ -355,12 +355,12 @@ void nandscheme_writeextra(FAR const struct nand_scheme_s *scheme, ****************************************************************************/ int nandscheme_build4086(FAR struct nand_scheme_s *scheme, - unsigned int spareSize, unsigned int eccOffset) + unsigned int sparesize, unsigned int eccoffset) { uint8_t eccsize = g_nand_sparescheme4096.eccsize; int i; - if ((eccOffset + eccsize) > spareSize) + if ((eccoffset + eccsize) > sparesize) { return -E2BIG; } @@ -370,10 +370,10 @@ int nandscheme_build4086(FAR struct nand_scheme_s *scheme, for (i = 0; i < eccsize; i++) { - scheme->eccbytepos[i] = eccOffset + i; + scheme->eccbytepos[i] = eccoffset + i; } - scheme->nxbytes = spareSize - eccsize - 2; + scheme->nxbytes = sparesize - eccsize - 2; for (i = 0; i < scheme->nxbytes; i++) { diff --git a/include/nuttx/mtd/nand_scheme.h b/include/nuttx/mtd/nand_scheme.h index 5184ecd6576..2ab237d9a06 100644 --- a/include/nuttx/mtd/nand_scheme.h +++ b/include/nuttx/mtd/nand_scheme.h @@ -300,7 +300,7 @@ void nandscheme_writeextra(FAR const struct nand_scheme_s *scheme, * * Input Parameters: * scheme Pointer to a nand_scheme_s instance. - * spareSize Size of spare area. + * sparesize Size of spare area. * offset Index where to write the first extra byte. * size Number of extra bytes to write. * offset Index where to write the first extra byte. @@ -311,7 +311,7 @@ void nandscheme_writeextra(FAR const struct nand_scheme_s *scheme, ****************************************************************************/ int nandscheme_build4086(FAR struct nand_scheme_s *scheme, - unsigned int spareSize, unsigned int eccOffset); + unsigned int sparesize, unsigned int eccoffset); #undef EXTERN #ifdef __cplusplus