From: Philippe Mathieu-Daudé Date: Mon, 9 Jan 2023 14:02:54 +0000 (+0100) Subject: hw/gpio/omap_gpio: Add local variable to avoid embedded cast X-Git-Tag: v8.0.0-rc0~97^2~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=28180159ecf38d097475a5429474a4be9d2a24b8;p=thirdparty%2Fqemu.git hw/gpio/omap_gpio: Add local variable to avoid embedded cast Add a local 'struct omap_gpif_s *' variable to improve readability. (This also eases next commit conversion). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-id: 20230109140306.23161-3-philmd@linaro.org Signed-off-by: Peter Maydell --- diff --git a/hw/gpio/omap_gpio.c b/hw/gpio/omap_gpio.c index bd0841d57fe..12ec16d1b03 100644 --- a/hw/gpio/omap_gpio.c +++ b/hw/gpio/omap_gpio.c @@ -53,7 +53,8 @@ struct omap_gpif_s { /* General-Purpose I/O of OMAP1 */ static void omap_gpio_set(void *opaque, int line, int level) { - struct omap_gpio_s *s = &((struct omap_gpif_s *) opaque)->omap1; + struct omap_gpif_s *p = opaque; + struct omap_gpio_s *s = &p->omap1; uint16_t prev = s->inputs; if (level)