Commit 92fdd777 authored by Eva Rachel Retuya's avatar Eva Rachel Retuya Committed by Greg Kroah-Hartman

Staging: mt29f_spinand: Indent to match open parenthesis

Fix alignment issues by properly indenting function parameters in
accordance to the kernel coding style. Checkpatch pointed out this
issue.

CHECK: Alignment should match open parenthesis
Signed-off-by: default avatarEva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bcfe55b4
...@@ -322,7 +322,7 @@ static int spinand_read_page_to_cache(struct spi_device *spi_nand, u16 page_id) ...@@ -322,7 +322,7 @@ static int spinand_read_page_to_cache(struct spi_device *spi_nand, u16 page_id)
* No tRd delay. * No tRd delay.
*/ */
static int spinand_read_from_cache(struct spi_device *spi_nand, u16 page_id, static int spinand_read_from_cache(struct spi_device *spi_nand, u16 page_id,
u16 byte_id, u16 len, u8 *rbuf) u16 byte_id, u16 len, u8 *rbuf)
{ {
struct spinand_cmd cmd = {0}; struct spinand_cmd cmd = {0};
u16 column; u16 column;
...@@ -353,7 +353,7 @@ static int spinand_read_from_cache(struct spi_device *spi_nand, u16 page_id, ...@@ -353,7 +353,7 @@ static int spinand_read_from_cache(struct spi_device *spi_nand, u16 page_id,
* Poll to read status to wait for tRD time. * Poll to read status to wait for tRD time.
*/ */
static int spinand_read_page(struct spi_device *spi_nand, u16 page_id, static int spinand_read_page(struct spi_device *spi_nand, u16 page_id,
u16 offset, u16 len, u8 *rbuf) u16 offset, u16 len, u8 *rbuf)
{ {
int ret; int ret;
u8 status = 0; u8 status = 0;
...@@ -375,14 +375,14 @@ static int spinand_read_page(struct spi_device *spi_nand, u16 page_id, ...@@ -375,14 +375,14 @@ static int spinand_read_page(struct spi_device *spi_nand, u16 page_id,
ret = spinand_read_status(spi_nand, &status); ret = spinand_read_status(spi_nand, &status);
if (ret < 0) { if (ret < 0) {
dev_err(&spi_nand->dev, dev_err(&spi_nand->dev,
"err %d read status register\n", ret); "err %d read status register\n", ret);
return ret; return ret;
} }
if ((status & STATUS_OIP_MASK) == STATUS_READY) { if ((status & STATUS_OIP_MASK) == STATUS_READY) {
if ((status & STATUS_ECC_MASK) == STATUS_ECC_ERROR) { if ((status & STATUS_ECC_MASK) == STATUS_ECC_ERROR) {
dev_err(&spi_nand->dev, "ecc error, page=%d\n", dev_err(&spi_nand->dev, "ecc error, page=%d\n",
page_id); page_id);
return 0; return 0;
} }
break; break;
...@@ -420,7 +420,8 @@ static int spinand_read_page(struct spi_device *spi_nand, u16 page_id, ...@@ -420,7 +420,8 @@ static int spinand_read_page(struct spi_device *spi_nand, u16 page_id,
* Since it is writing the data to cache, there is no tPROG time. * Since it is writing the data to cache, there is no tPROG time.
*/ */
static int spinand_program_data_to_cache(struct spi_device *spi_nand, static int spinand_program_data_to_cache(struct spi_device *spi_nand,
u16 page_id, u16 byte_id, u16 len, u8 *wbuf) u16 page_id, u16 byte_id,
u16 len, u8 *wbuf)
{ {
struct spinand_cmd cmd = {0}; struct spinand_cmd cmd = {0};
u16 column; u16 column;
...@@ -474,7 +475,7 @@ static int spinand_program_execute(struct spi_device *spi_nand, u16 page_id) ...@@ -474,7 +475,7 @@ static int spinand_program_execute(struct spi_device *spi_nand, u16 page_id)
* Poll to wait for the tPROG time to finish the transaction. * Poll to wait for the tPROG time to finish the transaction.
*/ */
static int spinand_program_page(struct spi_device *spi_nand, static int spinand_program_page(struct spi_device *spi_nand,
u16 page_id, u16 offset, u16 len, u8 *buf) u16 page_id, u16 offset, u16 len, u8 *buf)
{ {
int retval; int retval;
u8 status = 0; u8 status = 0;
...@@ -508,7 +509,7 @@ static int spinand_program_page(struct spi_device *spi_nand, ...@@ -508,7 +509,7 @@ static int spinand_program_page(struct spi_device *spi_nand,
dev_err(&spi_nand->dev, "wait timedout!!!\n"); dev_err(&spi_nand->dev, "wait timedout!!!\n");
retval = spinand_program_data_to_cache(spi_nand, page_id, retval = spinand_program_data_to_cache(spi_nand, page_id,
offset, len, wbuf); offset, len, wbuf);
if (retval < 0) if (retval < 0)
return retval; return retval;
retval = spinand_program_execute(spi_nand, page_id); retval = spinand_program_execute(spi_nand, page_id);
...@@ -518,8 +519,7 @@ static int spinand_program_page(struct spi_device *spi_nand, ...@@ -518,8 +519,7 @@ static int spinand_program_page(struct spi_device *spi_nand,
retval = spinand_read_status(spi_nand, &status); retval = spinand_read_status(spi_nand, &status);
if (retval < 0) { if (retval < 0) {
dev_err(&spi_nand->dev, dev_err(&spi_nand->dev,
"error %d reading status register\n", "error %d reading status register\n", retval);
retval);
return retval; return retval;
} }
...@@ -594,8 +594,7 @@ static int spinand_erase_block(struct spi_device *spi_nand, u16 block_id) ...@@ -594,8 +594,7 @@ static int spinand_erase_block(struct spi_device *spi_nand, u16 block_id)
retval = spinand_read_status(spi_nand, &status); retval = spinand_read_status(spi_nand, &status);
if (retval < 0) { if (retval < 0) {
dev_err(&spi_nand->dev, dev_err(&spi_nand->dev,
"error %d reading status register\n", "error %d reading status register\n", retval);
retval);
return retval; return retval;
} }
...@@ -613,7 +612,8 @@ static int spinand_erase_block(struct spi_device *spi_nand, u16 block_id) ...@@ -613,7 +612,8 @@ static int spinand_erase_block(struct spi_device *spi_nand, u16 block_id)
#ifdef CONFIG_MTD_SPINAND_ONDIEECC #ifdef CONFIG_MTD_SPINAND_ONDIEECC
static int spinand_write_page_hwecc(struct mtd_info *mtd, static int spinand_write_page_hwecc(struct mtd_info *mtd,
struct nand_chip *chip, const u8 *buf, int oob_required) struct nand_chip *chip,
const u8 *buf, int oob_required)
{ {
const u8 *p = buf; const u8 *p = buf;
int eccsize = chip->ecc.size; int eccsize = chip->ecc.size;
...@@ -625,7 +625,7 @@ static int spinand_write_page_hwecc(struct mtd_info *mtd, ...@@ -625,7 +625,7 @@ static int spinand_write_page_hwecc(struct mtd_info *mtd,
} }
static int spinand_read_page_hwecc(struct mtd_info *mtd, struct nand_chip *chip, static int spinand_read_page_hwecc(struct mtd_info *mtd, struct nand_chip *chip,
u8 *buf, int oob_required, int page) u8 *buf, int oob_required, int page)
{ {
int retval; int retval;
u8 status; u8 status;
...@@ -644,8 +644,7 @@ static int spinand_read_page_hwecc(struct mtd_info *mtd, struct nand_chip *chip, ...@@ -644,8 +644,7 @@ static int spinand_read_page_hwecc(struct mtd_info *mtd, struct nand_chip *chip,
retval = spinand_read_status(info->spi, &status); retval = spinand_read_status(info->spi, &status);
if (retval < 0) { if (retval < 0) {
dev_err(&mtd->dev, dev_err(&mtd->dev,
"error %d reading status register\n", "error %d reading status register\n", retval);
retval);
return retval; return retval;
} }
...@@ -694,8 +693,7 @@ static int spinand_wait(struct mtd_info *mtd, struct nand_chip *chip) ...@@ -694,8 +693,7 @@ static int spinand_wait(struct mtd_info *mtd, struct nand_chip *chip)
retval = spinand_read_status(info->spi, &status); retval = spinand_read_status(info->spi, &status);
if (retval < 0) { if (retval < 0) {
dev_err(&mtd->dev, dev_err(&mtd->dev,
"error %d reading status register\n", "error %d reading status register\n", retval);
retval);
return retval; return retval;
} }
...@@ -743,7 +741,7 @@ static void spinand_reset(struct spi_device *spi_nand) ...@@ -743,7 +741,7 @@ static void spinand_reset(struct spi_device *spi_nand)
} }
static void spinand_cmdfunc(struct mtd_info *mtd, unsigned int command, static void spinand_cmdfunc(struct mtd_info *mtd, unsigned int command,
int column, int page) int column, int page)
{ {
struct nand_chip *chip = (struct nand_chip *)mtd->priv; struct nand_chip *chip = (struct nand_chip *)mtd->priv;
struct spinand_info *info = (struct spinand_info *)chip->priv; struct spinand_info *info = (struct spinand_info *)chip->priv;
...@@ -789,7 +787,7 @@ static void spinand_cmdfunc(struct mtd_info *mtd, unsigned int command, ...@@ -789,7 +787,7 @@ static void spinand_cmdfunc(struct mtd_info *mtd, unsigned int command,
/* PAGEPROG reuses all of the setup from SEQIN and adds the length */ /* PAGEPROG reuses all of the setup from SEQIN and adds the length */
case NAND_CMD_PAGEPROG: case NAND_CMD_PAGEPROG:
spinand_program_page(info->spi, state->row, state->col, spinand_program_page(info->spi, state->row, state->col,
state->buf_ptr, state->buf); state->buf_ptr, state->buf);
break; break;
case NAND_CMD_STATUS: case NAND_CMD_STATUS:
spinand_get_otp(info->spi, state->buf); spinand_get_otp(info->spi, state->buf);
...@@ -854,7 +852,7 @@ static int spinand_probe(struct spi_device *spi_nand) ...@@ -854,7 +852,7 @@ static int spinand_probe(struct spi_device *spi_nand)
struct mtd_part_parser_data ppdata; struct mtd_part_parser_data ppdata;
info = devm_kzalloc(&spi_nand->dev, sizeof(struct spinand_info), info = devm_kzalloc(&spi_nand->dev, sizeof(struct spinand_info),
GFP_KERNEL); GFP_KERNEL);
if (!info) if (!info)
return -ENOMEM; return -ENOMEM;
...@@ -863,7 +861,7 @@ static int spinand_probe(struct spi_device *spi_nand) ...@@ -863,7 +861,7 @@ static int spinand_probe(struct spi_device *spi_nand)
spinand_lock_block(spi_nand, BL_ALL_UNLOCKED); spinand_lock_block(spi_nand, BL_ALL_UNLOCKED);
state = devm_kzalloc(&spi_nand->dev, sizeof(struct spinand_state), state = devm_kzalloc(&spi_nand->dev, sizeof(struct spinand_state),
GFP_KERNEL); GFP_KERNEL);
if (!state) if (!state)
return -ENOMEM; return -ENOMEM;
...@@ -874,7 +872,7 @@ static int spinand_probe(struct spi_device *spi_nand) ...@@ -874,7 +872,7 @@ static int spinand_probe(struct spi_device *spi_nand)
return -ENOMEM; return -ENOMEM;
chip = devm_kzalloc(&spi_nand->dev, sizeof(struct nand_chip), chip = devm_kzalloc(&spi_nand->dev, sizeof(struct nand_chip),
GFP_KERNEL); GFP_KERNEL);
if (!chip) if (!chip)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment