On Thu, Jan 5, 2023 at 6:39 AM Philippe Mathieu-Daudé <phi...@linaro.org> wrote:
>
> The point of a getter() function is to not expose the structure
> internal fields. Otherwise callers could simply access the
> PFlashCFI01::mem field.
>
> Have the callers pass a DeviceState* argument. The QOM
> type check is done in the callee.
>
> Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
> ---
>  hw/block/pflash_cfi01.c  | 4 +++-
>  hw/i386/pc_sysfw.c       | 2 +-
>  hw/mips/malta.c          | 3 ++-
>  hw/ppc/e500.c            | 2 +-
>  hw/xtensa/xtfpga.c       | 2 +-
>  include/hw/block/flash.h | 2 +-
>  6 files changed, 9 insertions(+), 6 deletions(-)
>

Reviewed-by: Bin Meng <bmeng...@gmail.com>

Reply via email to