Skip to content
Unverified Commit 2dcbfe36 authored by Jonathan Neuschäfer's avatar Jonathan Neuschäfer Committed by Tudor Ambarus
Browse files

mtd: spi-nor: Refactor spi_nor_read_id()



- Don't use `tmp` for two purposes (return value, loop counter).
  Instead, use `i` for the loop counter, and `ret` for the return value.
- Don't use tabs between type and name in variable declarations,
  for consistency with other functions in spi-nor.c.
- Rewrite nested `if`s as `if (a && b)`.
- Remove `info` variable, and use spi_nor_ids[i] directly.

Signed-off-by: default avatarJonathan Neuschäfer <j.neuschaefer@gmx.net>
[tudor.ambarus@microchip.com: change i's type from int to unsigned int,
reorder local variables]
Signed-off-by: default avatarTudor Ambarus <tudor.ambarus@microchip.com>
parent df5c2100
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment