various: Remove unnecessary OBJECT() cast

The OBJECT() macro is defined as:

  #define OBJECT(obj) ((Object *)(obj))

Remove the unnecessary OBJECT() casts when we already know the
pointer is of Object type.

Patch created mechanically using spatch with this script:

  @@
  typedef Object;
  Object *o;
  @@
  -   OBJECT(o)
  +   o

Acked-by: Cornelia Huck <cohuck@redhat.com>
Acked-by: Corey Minyard <cminyard@mvista.com>
Acked-by: John Snow <jsnow@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20200512070020.22782-3-f4bug@amsat.org>
[Trivial rebase conflict in hw/s390x/sclp.c resolved]
This commit is contained in:
Philippe Mathieu-Daudé 2020-05-12 09:00:19 +02:00 committed by Markus Armbruster
parent 96449e4a30
commit 688ffbb4f7
7 changed files with 11 additions and 12 deletions

View file

@ -321,7 +321,7 @@ void s390_sclp_init(void)
Object *new = object_new(TYPE_SCLP);
object_property_add_child(qdev_get_machine(), TYPE_SCLP, new);
object_unref(OBJECT(new));
object_unref(new);
qdev_init_nofail(DEVICE(new));
}