On Thu, Jan 5, 2023 at 6:40 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::blk 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/arm/sbsa-ref.c        | 2 +-
>  hw/arm/virt.c            | 2 +-
>  hw/block/pflash_cfi01.c  | 4 +++-
>  hw/i386/pc_sysfw.c       | 4 ++--
>  include/hw/block/flash.h | 2 +-
>  5 files changed, 8 insertions(+), 6 deletions(-)
>

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

Reply via email to