]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/pflash: refactor pflash_data_write()
authorGerd Hoffmann <kraxel@redhat.com>
Mon, 8 Jan 2024 16:08:57 +0000 (17:08 +0100)
committerMichael Tokarev <mjt@tls.msk.ru>
Sat, 20 Jan 2024 14:41:47 +0000 (17:41 +0300)
commit06679ac8b565b4485516336c497089d8ca2496f0
tree9cf943b8c05f0c99eeb4acdf8381e13b3d37d000
parenta290e43f5868f1276fdbb4fc66fe49c28fd5fa9a
hw/pflash: refactor pflash_data_write()

Move the offset calculation, do it once at the start of the function and
let the 'p' variable point directly to the memory location which should
be updated.  This makes it simpler to update other buffers than
pfl->storage in an upcoming patch.  No functional change.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240108160900.104835-2-kraxel@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
(cherry picked from commit 3b14a555fdb627ac091559ef5931c887d06590d8)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/block/pflash_cfi01.c