Alex Bennée <alex.ben...@linaro.org> writes: > Markus Armbruster <arm...@redhat.com> writes: > >> QOMification left parameter @size unused in pflash_cfi01_register() >> and pflash_cfi02_register(). register(). Obviously, @size should >> match @sector_len and @nb_blocs, i.e. size == sector_len * nb_blocs. >> All callers satisfy this. >> >> Remove @nb_blocs and compute it from @size and @sector_len. >> >> Signed-off-by: Markus Armbruster <arm...@redhat.com> >> --- [...] >> diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c >> index a989a8c439..a5dae67c26 100644 >> --- a/hw/ppc/sam460ex.c >> +++ b/hw/ppc/sam460ex.c >> @@ -97,7 +97,7 @@ static int sam460ex_load_uboot(void) >> if (!pflash_cfi01_register(FLASH_BASE | ((hwaddr)FLASH_BASE_H << 32), >> "sam460ex.flash", FLASH_SIZE, >> dinfo ? blk_by_legacy_dinfo(dinfo) : NULL, >> - 65536, FLASH_SIZE / 65536, >> + 65536, > > 64 * KiB?
I generally prefer to keep big, repetitive patches as mechanical as possible. But if it's desired, I'll make this change. Zoltan, David, David, you're maintainers, do you have a preference? >> 1, 0x89, 0x18, 0x0000, 0x0, 1)) { >> error_report("Error registering flash memory"); >> /* XXX: return an error instead? */ [...] > > Otherwise: > > Reviewed-by: Alex Bennée <alex.ben...@linaro.org> Thanks!