Skip to content

Commit 8e6070e

Browse files
William Zhangmiquelraynal
authored andcommitted
mtd: rawnand: brcmnand: fix style issues
Fix various style issues. Signed-off-by: David Regan <[email protected]> Signed-off-by: William Zhang <[email protected]> Reviewed-by: William Zhang <[email protected]> Signed-off-by: Miquel Raynal <[email protected]> Link: https://lore.kernel.org/linux-mtd/[email protected]
1 parent d4bba15 commit 8e6070e

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

drivers/mtd/nand/raw/brcmnand/brcmnand.c

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2339,7 +2339,7 @@ static int brcmnand_write_oob_raw(struct nand_chip *chip, int page)
23392339
}
23402340

23412341
static int brcmnand_exec_instr(struct brcmnand_host *host, int i,
2342-
const struct nand_operation *op)
2342+
const struct nand_operation *op)
23432343
{
23442344
const struct nand_op_instr *instr = &op->instrs[i];
23452345
struct brcmnand_controller *ctrl = host->ctrl;
@@ -2353,7 +2353,7 @@ static int brcmnand_exec_instr(struct brcmnand_host *host, int i,
23532353
* (WAITRDY excepted).
23542354
*/
23552355
last_op = ((i == (op->ninstrs - 1)) && (instr->type != NAND_OP_WAITRDY_INSTR)) ||
2356-
((i == (op->ninstrs - 2)) && (op->instrs[i+1].type == NAND_OP_WAITRDY_INSTR));
2356+
((i == (op->ninstrs - 2)) && (op->instrs[i + 1].type == NAND_OP_WAITRDY_INSTR));
23572357

23582358
switch (instr->type) {
23592359
case NAND_OP_CMD_INSTR:
@@ -2398,21 +2398,21 @@ static int brcmnand_exec_instr(struct brcmnand_host *host, int i,
23982398

23992399
static int brcmnand_op_is_status(const struct nand_operation *op)
24002400
{
2401-
if ((op->ninstrs == 2) &&
2402-
(op->instrs[0].type == NAND_OP_CMD_INSTR) &&
2403-
(op->instrs[0].ctx.cmd.opcode == NAND_CMD_STATUS) &&
2404-
(op->instrs[1].type == NAND_OP_DATA_IN_INSTR))
2401+
if (op->ninstrs == 2 &&
2402+
op->instrs[0].type == NAND_OP_CMD_INSTR &&
2403+
op->instrs[0].ctx.cmd.opcode == NAND_CMD_STATUS &&
2404+
op->instrs[1].type == NAND_OP_DATA_IN_INSTR)
24052405
return 1;
24062406

24072407
return 0;
24082408
}
24092409

24102410
static int brcmnand_op_is_reset(const struct nand_operation *op)
24112411
{
2412-
if ((op->ninstrs == 2) &&
2413-
(op->instrs[0].type == NAND_OP_CMD_INSTR) &&
2414-
(op->instrs[0].ctx.cmd.opcode == NAND_CMD_RESET) &&
2415-
(op->instrs[1].type == NAND_OP_WAITRDY_INSTR))
2412+
if (op->ninstrs == 2 &&
2413+
op->instrs[0].type == NAND_OP_CMD_INSTR &&
2414+
op->instrs[0].ctx.cmd.opcode == NAND_CMD_RESET &&
2415+
op->instrs[1].type == NAND_OP_WAITRDY_INSTR)
24162416
return 1;
24172417

24182418
return 0;
@@ -2440,8 +2440,7 @@ static int brcmnand_exec_op(struct nand_chip *chip,
24402440
*status = ret & 0xFF;
24412441

24422442
return 0;
2443-
}
2444-
else if (brcmnand_op_is_reset(op)) {
2443+
} else if (brcmnand_op_is_reset(op)) {
24452444
ret = brcmnand_reset(host);
24462445
if (ret < 0)
24472446
return ret;

0 commit comments

Comments
 (0)