[PATCH v2 4/8] mtd: spi-nor: spansion: switch set_octal_dtr method to use vreg_offset
Tudor Ambarus
tudor.ambarus at linaro.org
Fri Jul 21 09:49:14 PDT 2023
>> static int cypress_nor_set_octal_dtr(struct spi_nor *nor, bool enable)
>> {
> const struct spi_nor_flash_parameter *params = nor->params;
>
>> + if (!nor->params->vreg_offset) {
>
> wouldn't hurt to check for params->n_dice as well, even though one
> implies the other. In the next patch you have a loop with n-dice being
> the max number of elements. If n-dice becomes zero sometime, the loop is
> skipped. Thus:
>
> if (params->n_dice && !nor->params->vreg_offset)
>
if (!params->n_dice || !params->vreg_offset)
More information about the linux-mtd
mailing list