On 02/18/19 13:56, Markus Armbruster wrote: > flash.h's incomplete struct pflash_t is completed both in > pflash_cfi01.c and in pflash_cfi02.c. The complete types are > incompatible.
O_o > This can hide type errors, such as passing a pflash_t > created with pflash_cfi02_register() to pflash_cfi01_get_memory(). > > Furthermore, POSIX reserves typedef names ending with _t. > > Rename the two structs to PFlashCFI01 and PFlashCFI02. > > Signed-off-by: Markus Armbruster <arm...@redhat.com> > --- > hw/arm/vexpress.c | 8 ++-- > hw/block/pflash_cfi01.c | 87 +++++++++++++++++++++------------------- > hw/block/pflash_cfi02.c | 67 ++++++++++++++++--------------- > hw/i386/pc_sysfw.c | 2 +- > hw/mips/mips_malta.c | 2 +- > hw/xtensa/xtfpga.c | 10 ++--- > include/hw/block/flash.h | 53 ++++++++++++++---------- > 7 files changed, 122 insertions(+), 107 deletions(-) I didn't check larger contexts in the modified files. I also didn't look for typos or try to verify the patch by recreating it from scratch, and by comparison. I read through the posted patch and it looks OK to me. Reviewed-by: Laszlo Ersek <ler...@redhat.com> Thanks Laszlo