linux-stable/drivers/mtd/devices
Tudor Ambarus 1df1fc8c62 mtd: core: Constify buf in mtd_write_user_prot_reg()
The write buffer comes from user and should be const.
Constify write buffer in mtd core and across all _write_user_prot_reg()
users. cfi_cmdset_{0001, 0002} and onenand_base will pay the cost of an
explicit cast to discard the const qualifier since the beginning, since
they are using an otp_op_t function prototype that is used for both reads
and writes. mtd_dataflash and SPI NOR will benefit of the const buffer
because they are using different paths for writes and reads.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20210403060931.7119-1-tudor.ambarus@microchip.com
2021-04-16 20:30:54 +02:00
..
Kconfig mtd: spear_smi: Enable compile testing 2020-10-02 09:09:08 +02:00
Makefile mtd: spi-nor: Move m25p80 code in spi-nor.c 2019-08-12 10:54:12 +03:00
bcm47xxsflash.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
bcm47xxsflash.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
block2mtd.c mtd: Convert fallthrough comments into statements 2020-03-30 10:14:54 +02:00
docg3.c mtd: devices: docg3: Fix kernel-doc 'bad line' and 'excessive doc' issues 2020-11-20 12:37:30 +01:00
docg3.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
lart.c mtd: Avoid comma separated statements 2020-08-27 14:16:31 +02:00
mchp23k256.c mtd: devices: fix mchp23k256 read and write 2019-11-14 10:58:03 +01:00
ms02-nv.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ms02-nv.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
mtd_dataflash.c mtd: core: Constify buf in mtd_write_user_prot_reg() 2021-04-16 20:30:54 +02:00
mtdram.c mtd: mtdram: Expose module parameters 2019-01-08 12:42:57 +01:00
phram.c mtd: phram: use div_u64_rem to stop overwrite len in phram_setup 2021-01-27 13:45:51 +01:00
pmc551.c mtd: pmc551: Remove set but not used variable 'soff_lo' 2019-09-15 23:51:07 +02:00
powernv_flash.c mtd: devices: powernv_flash: Add function names to headers and fix 'dev' 2020-11-20 12:37:33 +01:00
serial_flash_cmds.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 420 2019-06-05 17:37:15 +02:00
slram.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
spear_smi.c mtd: spear_smi: use for_each_child_of_node() macro 2020-09-15 10:14:36 +02:00
sst25l.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 420 2019-06-05 17:37:15 +02:00
st_spi_fsm.c mtd: st_spi_fsm: convert comma to semicolon 2021-02-01 18:58:38 +01:00