]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
hw/gpio/omap_gpio: Add local variable to avoid embedded cast
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Mon, 9 Jan 2023 14:02:54 +0000 (15:02 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 12 Jan 2023 17:15:09 +0000 (17:15 +0000)
Add a local 'struct omap_gpif_s *' variable to improve readability.
(This also eases next commit conversion).

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20230109140306.23161-3-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/gpio/omap_gpio.c

index bd0841d57fe03f36132356615fd83d30e8a8f0cd..12ec16d1b037dc0f8ab6e1a0c62a1865053a7da1 100644 (file)
@@ -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)