Am 18.06.2013 13:10, schrieb peter.crosthwa...@xilinx.com:
> From: Peter Crosthwaite <peter.crosthwa...@xilinx.com>
> 
> Define and use standard QOM cast macro. Remove usages of DO_UPCAST and
> direct -> style casting.
> 
> Cc: afaer...@suse.de
> 
> Signed-off-by: Peter Crosthwaite <peter.crosthwa...@xilinx.com>
> ---
> 
>  hw/block/nand.c | 25 ++++++++++++++++---------
>  1 file changed, 16 insertions(+), 9 deletions(-)
> 
> diff --git a/hw/block/nand.c b/hw/block/nand.c
> index de0a022..d2469f5 100644
> --- a/hw/block/nand.c
> +++ b/hw/block/nand.c
[...]
> @@ -319,14 +324,14 @@ static void nand_command(NANDFlashState *s)
>  
>  static void nand_pre_save(void *opaque)
>  {
> -    NANDFlashState *s = opaque;
> +    NANDFlashState *s = NAND(opaque);
>  
>      s->ioaddr_vmstate = s->ioaddr - s->io;
>  }
>  
>  static int nand_post_load(void *opaque, int version_id)
>  {
> -    NANDFlashState *s = opaque;
> +    NANDFlashState *s = NAND(opaque);
>  
>      if (s->ioaddr_vmstate > sizeof(s->io)) {
>          return -EINVAL;
[snip]

These two are not strictly necessary, but either way:

Reviewed-by: Andreas Färber <afaer...@suse.de>

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

Reply via email to