* [PATCH] mtd: cfi_cmdset_0001: Disable write buffer functions if FORCE_WORD_WRITE is 1
@ 2023-05-14 9:39 Aleksander Jan Bajkowski
0 siblings, 0 replies; only message in thread
From: Aleksander Jan Bajkowski @ 2023-05-14 9:39 UTC (permalink / raw)
To: miquel.raynal, richard, vigneshr, olek2, linux-mtd, linux-kernel
Some write buffer functions are not used when FORCE_WORD_WRITE is set to 1.
So the compile warning messages are output if FORCE_WORD_WRITE is 1. To
resolve this disable the write buffer functions if FORCE_WORD_WRITE is 1.
This is similar fix to: 557c759036fc3976a5358cef23e65a263853b93f.
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
---
drivers/mtd/chips/cfi_cmdset_0001.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
index 54f92d09d9cf..8f7223221db2 100644
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -61,8 +61,10 @@
static int cfi_intelext_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *);
static int cfi_intelext_write_words(struct mtd_info *, loff_t, size_t, size_t *, const u_char *);
+#if !FORCE_WORD_WRITE
static int cfi_intelext_write_buffers(struct mtd_info *, loff_t, size_t, size_t *, const u_char *);
static int cfi_intelext_writev(struct mtd_info *, const struct kvec *, unsigned long, loff_t, size_t *);
+#endif
static int cfi_intelext_erase_varsize(struct mtd_info *, struct erase_info *);
static void cfi_intelext_sync (struct mtd_info *);
static int cfi_intelext_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
@@ -304,6 +306,7 @@ static void fixup_use_point(struct mtd_info *mtd)
}
}
+#if !FORCE_WORD_WRITE
static void fixup_use_write_buffers(struct mtd_info *mtd)
{
struct map_info *map = mtd->priv;
@@ -314,6 +317,7 @@ static void fixup_use_write_buffers(struct mtd_info *mtd)
mtd->_writev = cfi_intelext_writev;
}
}
+#endif /* !FORCE_WORD_WRITE */
/*
* Some chips power-up with all sectors locked by default.
@@ -1703,6 +1707,7 @@ static int cfi_intelext_write_words (struct mtd_info *mtd, loff_t to , size_t le
}
+#if !FORCE_WORD_WRITE
static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip,
unsigned long adr, const struct kvec **pvec,
unsigned long *pvec_seek, int len)
@@ -1931,6 +1936,7 @@ static int cfi_intelext_write_buffers (struct mtd_info *mtd, loff_t to,
return cfi_intelext_writev(mtd, &vec, 1, to, retlen);
}
+#endif /* !FORCE_WORD_WRITE */
static int __xipram do_erase_oneblock(struct map_info *map, struct flchip *chip,
unsigned long adr, int len, void *thunk)
--
2.30.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-05-14 9:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-14 9:39 [PATCH] mtd: cfi_cmdset_0001: Disable write buffer functions if FORCE_WORD_WRITE is 1 Aleksander Jan Bajkowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®