Re: [PATCH v2] spi: intel: Allow writeable MTD partition with module param

From: Mark Brown
Date: Thu Jul 24 2025 - 12:00:09 EST


On Thu, Jul 17, 2025 at 03:28:51PM +0000, Jakub Czapiga wrote:
> The MTD device is blocked from writing to the SPI-NOR chip if any region
> of it is write-protected, even if "writeable=1" module parameter is set.
>
> Add ability to bypass this behaviour by introducing new module parameter
> "ignore_protestion_status" which allows to rely on the write protection
> mechanism of SPI-NOR chip itself, which most modern chips (since
> the 1990'+) have already implemented.

This doesn't compile:

/build/stage/linux/drivers/spi/spi-intel.c:196:2: error: expected identifier
196 | "Do not block SPI flash chip write access even if it is write-protected (default=0)");
| ^
/build/stage/linux/drivers/spi/spi-intel.c:194:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
194 | MODULE_PRAM_DESC(
| ^
| int
/build/stage/linux/drivers/spi/spi-intel.c:194:17: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
194 | MODULE_PRAM_DESC(
| ^
195 | ignore_protection_status,
196 | "Do not block SPI flash chip write access even if it is write-protected (default=0)");
|
| void

Attachment: signature.asc
Description: PGP signature