From patchwork Mon Jan 9 14:02:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 640654 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp2180548pvb; Mon, 9 Jan 2023 06:46:11 -0800 (PST) X-Google-Smtp-Source: AMrXdXsbp06HIBOgGnaXeYee+YB986YV7E0ColJp2gJOz8JC8mZbDZCi9kiaTQ6aSV3iH4L8DqFj X-Received: by 2002:a05:6102:a88:b0:3ce:a2a4:8da8 with SMTP id n8-20020a0561020a8800b003cea2a48da8mr11309888vsg.1.1673275571549; Mon, 09 Jan 2023 06:46:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673275571; cv=none; d=google.com; s=arc-20160816; b=P4p0NqFcLmWBqsIpKUifLJ+KlbUlYiKNyDKd47C4fep/rKadLVEHMNvfsCSYmzOH6p y+7WIVgJu0FDUGjB+on209T/1ish22Dn+xblTsKEuauntfbiitDrqd4oyl6yMztY+4PO 1l3o/So9wfnSBz+DtNDC8Fy1MyLShwju8loFMv5D6KMzd7TylE6xtr3Fy6EEgBakgVKc c6YVJI6Xgt0GBB/Ruh0fzDRlvUQ79orYsY7k3TRZT7s4470UA5KLsmbPG7mLcKNuGtcf h07gVz1MldYE27VsEMggjegROZVkRf1lKjmXS4Qhl5QLPImy4F0xzcRckhVJA96ld4rI QG3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=bwgSmpYYfKNOJH9VNo91pDyRjQC6uHyPY7rBYpr5GJw=; b=OdQu7F7JxchnqIEwLu2ljESMxxIqvi9sTxEJfKmIZ998Gr0We+PltmH5HZeUoauJh/ tUrAUFBryb3QWhY9CMPPLc6RsOqapedu9AzYairMykFiVshHC+pF0uft38mfGBfjKFwz P6gKap3lEg/y4i+5Y+fXLwzLehKjNVviK36NbD3LgwE20jTEW9YwbxvDt8yDnR8aZ/eu xeopBG3z5rrQXsbZ1y9MIKTJXnf6EFbfWoqcEIh6KC4aRDCrfD9uWKxVpft+spU1FX87 CPSPpB2Ylx4JP4XOePks4Kt2uVr39RYV3sduss4M0lhpUBcKEVfzZLrIrfCBefL3iaDy 1ptA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=n5l0+iz3; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v5-20020a05620a440500b006fedaa5d032si5029277qkp.122.2023.01.09.06.46.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Jan 2023 06:46:11 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=n5l0+iz3; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pEskJ-0001W3-U8; Mon, 09 Jan 2023 09:03:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pEskE-0001Us-BT for qemu-devel@nongnu.org; Mon, 09 Jan 2023 09:03:22 -0500 Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pEskC-0006PJ-QJ for qemu-devel@nongnu.org; Mon, 09 Jan 2023 09:03:22 -0500 Received: by mail-lj1-x22f.google.com with SMTP id bx6so8968638ljb.3 for ; Mon, 09 Jan 2023 06:03:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bwgSmpYYfKNOJH9VNo91pDyRjQC6uHyPY7rBYpr5GJw=; b=n5l0+iz3gjBqrKMaIv4+T2CnMxiqzpa1hiMPKWzCyUfaTtojUJTY4jj5noYtmix0PU WS+D4c+1/EkUT4KFu+mj6Xyn9iJ3AruoKivNMKkPV4Ay4HFppmY85TjPqPkZdlUWZ6vP hnVu5URMcS4CxhN32ApAlobFr7VBiX81tgtQ8IXZYaYxsZFp6mMmA/gZQu3yAmr8Z9tN Bh/LbpRBx+vWNau7Q24i2UBR3ipVIv+dkh39gH9fwMvER3FVriZ8gV5dHX+xQSCC8Zd+ CX1JTGRTmuEePqgLJLphOq2M68TEql69VtuudYcS8/cM3kuslBZL3JDP7+qhuZtnt05s FHJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bwgSmpYYfKNOJH9VNo91pDyRjQC6uHyPY7rBYpr5GJw=; b=LWmYryJOOPNlYtdyJrciJDHbTmW2kKLogJ8ytVq3qga64E3VPdfVNFUlvmPEYYhXX1 ao7X6oL5/l2jsQEXs3himZHBKxBaRZOw/gn2h1m8HAk2ib91WSa1BOhFbfAA0hwDd8b5 AzVGRYzEhnVeY292oDzNo8Ohcv2sCS5ZhBUcjxSz2v3wMH/7kxmKeb4ISbM9w4FEqJdy kdfOpvzqVIbL3oLmjzR33//wfGxdZ5Wkjugvggzu85w8jGFNKDBZluO8UW3Z5dsTitfq k+aZYgwI14+PjF1OI8ttN+ZT7P0suPwLmlvAbEKRKov2uPjx66Cc6L+nVvRiNsnHfLxj PTIw== X-Gm-Message-State: AFqh2krg4Pl1C1v7P3mCr4LSu+fZkhtpk/zcrCGuSmpnxoLdJ+IRKbFi CBiIPbSG4UbrRD2u6pKfyT+cu/al0T3kvm/L X-Received: by 2002:a2e:9e57:0:b0:281:789:7ee5 with SMTP id g23-20020a2e9e57000000b0028107897ee5mr4320882ljk.6.1673272998739; Mon, 09 Jan 2023 06:03:18 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id g14-20020a05600c4ece00b003d9ea176d54sm8462614wmq.27.2023.01.09.06.03.17 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 09 Jan 2023 06:03:18 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Havard Skinnemoen , "Edgar E. Iglesias" , Alistair Francis , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Peter Maydell , Eduardo Habkost , Tyrone Ting Subject: [PATCH 02/14] hw/gpio/omap_gpio: Add local variable to avoid embedded cast Date: Mon, 9 Jan 2023 15:02:54 +0100 Message-Id: <20230109140306.23161-3-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230109140306.23161-1-philmd@linaro.org> References: <20230109140306.23161-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::22f; envelope-from=philmd@linaro.org; helo=mail-lj1-x22f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Add a local 'struct omap_gpif_s *' variable to improve readability. (This also eases next commit conversion). Signed-off-by: Philippe Mathieu-Daudé --- hw/gpio/omap_gpio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/gpio/omap_gpio.c b/hw/gpio/omap_gpio.c index bd0841d57f..12ec16d1b0 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)