Skip to content

Commit d68b7e5

Browse files
Mani-Sadhasivammiquelraynal
authored andcommitted
mtd: rawnand: qcom: Rename variables in qcom_op_cmd_mapping()
qcom_op_cmd_mapping() function accepts opcode and returns the corresponding command register. So let's rename the local variables and parameters to reflect the same. Reported-by: Miquel Raynal <miquel.raynal@bootlin.com> Closes: https://lore.kernel.org/all/20230804190750.3367a044@xps-13/ Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20230805174146.57006-3-manivannan.sadhasivam@linaro.org
1 parent 847178f commit d68b7e5

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

drivers/mtd/nand/raw/qcom_nandc.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2555,39 +2555,39 @@ static int qcom_nand_attach_chip(struct nand_chip *chip)
25552555
return 0;
25562556
}
25572557

2558-
static int qcom_op_cmd_mapping(struct qcom_nand_controller *nandc, u8 cmd,
2558+
static int qcom_op_cmd_mapping(struct qcom_nand_controller *nandc, u8 opcode,
25592559
struct qcom_op *q_op)
25602560
{
2561-
int ret;
2561+
int cmd;
25622562

2563-
switch (cmd) {
2563+
switch (opcode) {
25642564
case NAND_CMD_RESET:
2565-
ret = OP_RESET_DEVICE;
2565+
cmd = OP_RESET_DEVICE;
25662566
break;
25672567
case NAND_CMD_READID:
2568-
ret = OP_FETCH_ID;
2568+
cmd = OP_FETCH_ID;
25692569
break;
25702570
case NAND_CMD_PARAM:
25712571
if (nandc->props->qpic_v2)
2572-
ret = OP_PAGE_READ_ONFI_READ;
2572+
cmd = OP_PAGE_READ_ONFI_READ;
25732573
else
2574-
ret = OP_PAGE_READ;
2574+
cmd = OP_PAGE_READ;
25752575
break;
25762576
case NAND_CMD_ERASE1:
25772577
case NAND_CMD_ERASE2:
2578-
ret = OP_BLOCK_ERASE;
2578+
cmd = OP_BLOCK_ERASE;
25792579
break;
25802580
case NAND_CMD_STATUS:
2581-
ret = OP_CHECK_STATUS;
2581+
cmd = OP_CHECK_STATUS;
25822582
break;
25832583
case NAND_CMD_PAGEPROG:
2584-
ret = OP_PROGRAM_PAGE;
2584+
cmd = OP_PROGRAM_PAGE;
25852585
q_op->flag = OP_PROGRAM_PAGE;
25862586
nandc->exec_opwrite = true;
25872587
break;
25882588
}
25892589

2590-
return ret;
2590+
return cmd;
25912591
}
25922592

25932593
/* NAND framework ->exec_op() hooks and related helpers */

0 commit comments

Comments
 (0)