From patchwork Mon Jan 9 14:02:56 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: 640652 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp2177214pvb; Mon, 9 Jan 2023 06:39:01 -0800 (PST) X-Google-Smtp-Source: AMrXdXvJ8XpitYmh7Fk0G92IrCi96NKdV95tK0/Ojb7EfpqkmMeh55as8MO49XUcVodFUuUv0uOx X-Received: by 2002:a05:622a:229f:b0:3a7:f552:fd5f with SMTP id ay31-20020a05622a229f00b003a7f552fd5fmr88167257qtb.50.1673275141480; Mon, 09 Jan 2023 06:39:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673275141; cv=none; d=google.com; s=arc-20160816; b=s/xhoixU6T5TABZiUrxY7Gqc94SD6j9iKKrLWIatYCWi+mlNcbLTFw8LienYN0ES2U xslJOIjioUbHq4QC+/ugO9Ary7BA1vcoE7nXwIwEiPhj2R1MB7Tig84PW7KfAGSEpvFP SN4dIabNl7zSAvvWe9vCj0z1qdg21FjG6HK3xcnv/zGJ7+B2q5SQfhmbZKc3iBv6H+sL 0V/nu6mUIyY8++tvs6cSR5qCgQx5qP0S5JdZyi47wVe6stE3GGZje0CH4uFQc4zk/Tml AadaZkZhB7ZxqchY8a1wz/oiLh6HMme2i3G8q9AM7ilQgfeoHiQCoUV62CXg4yWx3llf 62Ag== 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=EffXhNSRUGOU0srNkRxQZt0hvLak4UD63gjuSTSSMgQ=; b=txiUI0TSLVcZrvfuJRSdarJvNfA/m/6711E3/yoRIG1fsl4zm81Ptka7CU5PSwkRLX lejbpcJYMlPDJ/YiouFrsl5tsKYCMH292OhEcqhq7CWcKrYfTqIIN8zvE6gWa6OBMRwX lsC/ENw9KjW69gbkVA7FeGRbAJscz8X7SXlMwowoG7mV9fVJTb7HFGx+mk59XmztgxCv Y+quS5wJUPQJZcLGbfmGWPOgGJZ484h/fx1yPMB+i5t9tnmNyeVAbfu7kUJA9CfYl8S3 Pci5sYEqCrhzmlfmHwGfFgtqhBEskBtxgq0oL2n1kTyTnJYXqEEQ0CEdZ924gS7E7NFo rMrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ehr3gtxN; 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 x18-20020ac84a12000000b003ab9d290688si4649117qtq.209.2023.01.09.06.39.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Jan 2023 06:39:01 -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=Ehr3gtxN; 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 1pEskR-0001Yq-FX; Mon, 09 Jan 2023 09:03:35 -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 1pEskP-0001Xw-Cz for qemu-devel@nongnu.org; Mon, 09 Jan 2023 09:03:33 -0500 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pEskM-0006R5-MU for qemu-devel@nongnu.org; Mon, 09 Jan 2023 09:03:33 -0500 Received: by mail-wr1-x42a.google.com with SMTP id bn26so8289396wrb.0 for ; Mon, 09 Jan 2023 06:03:30 -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=EffXhNSRUGOU0srNkRxQZt0hvLak4UD63gjuSTSSMgQ=; b=Ehr3gtxN0uzv/+8Nne6IYdTv2H0LQ5//9I48FoSexbuVkXlPgmp71/L7C0WIG8Y8DH PVqmpHiVywdS0HJCgC49cOJnyna18RVJKoQW9MC/vd8ELMwDWoAOHhiwc5gALIW1MQwQ D1MCTFlFJlyHJo16LynbrrAus3hRYoYLCmJsgkujaLf5TU6+u1n1PGfRVUs3X65WLCxQ nzwu8n41WC6+rWe+bg/VOy6P1orkY4B+E4fjsz8AeiGzqSGa7/X1qo0tJ5S4oIJJBn6X IsX7evA0B1U4vN1RpDv5c1ooEOzZwDHIB/3KAhPnzqzXrH/eXJHHtu+80llfOg0b++uQ Sp+Q== 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=EffXhNSRUGOU0srNkRxQZt0hvLak4UD63gjuSTSSMgQ=; b=MG17E+IILI5X9Py5yHLrgpYee/K+SDcOFHW8fzAMKcpndrG5VHuV/caWPxne0i4hn+ KH7pKlx96TfdXCBeZTbatjN0TXFmviKigI/cqt9wewJzfik//ilTqrb2ILbRdl94DNqr o8PCzIKL5Ji9nViu/XDCWo626eKiH2uSHCmzBgJV86jUh9CdCcHBsvwzregrc0RXsB/l dQ/+5CBp1DtMYt1qKATotUJhLtc6IGsLtrxLGeMQniXLgznCuyReJzseWCotCnqnG44C YsnVvrrt/C58ii5/Wip1NoLBRPNm+FJsuLQih8d0vCzPgxFe4D6sgX9AtIBautwIvxNa cHGA== X-Gm-Message-State: AFqh2krAYAprbVn8v5GpQOxLrgyYIKoSi8HDgjvPdpYoxWe1LOXX8u4q Akk+H2pv1hjWe109qBP4qRMdAelxkmqmKcU6 X-Received: by 2002:a5d:6145:0:b0:2bb:6b92:d4cc with SMTP id y5-20020a5d6145000000b002bb6b92d4ccmr5386600wrt.53.1673273008808; Mon, 09 Jan 2023 06:03:28 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id w6-20020adfd4c6000000b0027cb20605e3sm8529416wrk.105.2023.01.09.06.03.27 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 09 Jan 2023 06:03:28 -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 04/14] hw/gpio/omap_gpio: Use CamelCase for TYPE_OMAP1_GPIO type name Date: Mon, 9 Jan 2023 15:02:56 +0100 Message-Id: <20230109140306.23161-5-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::42a; envelope-from=philmd@linaro.org; helo=mail-wr1-x42a.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 Following docs/devel/style.rst guidelines, rename omap_gpif_s -> Omap1GpioState. This also remove a use of 'struct' in the DECLARE_INSTANCE_CHECKER() macro call. Signed-off-by: Philippe Mathieu-Daudé --- hw/gpio/omap_gpio.c | 16 ++++++++-------- include/hw/arm/omap.h | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/hw/gpio/omap_gpio.c b/hw/gpio/omap_gpio.c index b3cb3499bd..23502315ea 100644 --- a/hw/gpio/omap_gpio.c +++ b/hw/gpio/omap_gpio.c @@ -41,7 +41,7 @@ struct omap_gpio_s { uint16_t pins; }; -struct omap_gpif_s { +struct Omap1GpioState { SysBusDevice parent_obj; MemoryRegion iomem; @@ -53,7 +53,7 @@ struct omap_gpif_s { /* General-Purpose I/O of OMAP1 */ static void omap_gpio_set(void *opaque, int line, int level) { - struct omap_gpif_s *p = opaque; + Omap1GpioState *p = opaque; struct omap_gpio_s *s = &p->omap1; uint16_t prev = s->inputs; @@ -594,7 +594,7 @@ static const MemoryRegionOps omap2_gpio_module_ops = { static void omap_gpif_reset(DeviceState *dev) { - struct omap_gpif_s *s = OMAP1_GPIO(dev); + Omap1GpioState *s = OMAP1_GPIO(dev); omap_gpio_reset(&s->omap1); } @@ -677,7 +677,7 @@ static const MemoryRegionOps omap2_gpif_top_ops = { static void omap_gpio_init(Object *obj) { DeviceState *dev = DEVICE(obj); - struct omap_gpif_s *s = OMAP1_GPIO(obj); + Omap1GpioState *s = OMAP1_GPIO(obj); SysBusDevice *sbd = SYS_BUS_DEVICE(obj); qdev_init_gpio_in(dev, omap_gpio_set, 16); @@ -690,7 +690,7 @@ static void omap_gpio_init(Object *obj) static void omap_gpio_realize(DeviceState *dev, Error **errp) { - struct omap_gpif_s *s = OMAP1_GPIO(dev); + Omap1GpioState *s = OMAP1_GPIO(dev); if (!s->clk) { error_setg(errp, "omap-gpio: clk not connected"); @@ -742,13 +742,13 @@ static void omap2_gpio_realize(DeviceState *dev, Error **errp) } } -void omap_gpio_set_clk(omap_gpif *gpio, omap_clk clk) +void omap_gpio_set_clk(Omap1GpioState *gpio, omap_clk clk) { gpio->clk = clk; } static Property omap_gpio_properties[] = { - DEFINE_PROP_INT32("mpu_model", struct omap_gpif_s, mpu_model, 0), + DEFINE_PROP_INT32("mpu_model", Omap1GpioState, mpu_model, 0), DEFINE_PROP_END_OF_LIST(), }; @@ -766,7 +766,7 @@ static void omap_gpio_class_init(ObjectClass *klass, void *data) static const TypeInfo omap_gpio_info = { .name = TYPE_OMAP1_GPIO, .parent = TYPE_SYS_BUS_DEVICE, - .instance_size = sizeof(struct omap_gpif_s), + .instance_size = sizeof(Omap1GpioState), .instance_init = omap_gpio_init, .class_init = omap_gpio_class_init, }; diff --git a/include/hw/arm/omap.h b/include/hw/arm/omap.h index ff6a173f8a..29d2ed7e3b 100644 --- a/include/hw/arm/omap.h +++ b/include/hw/arm/omap.h @@ -103,18 +103,18 @@ void omap_i2c_set_fclk(OMAPI2CState *i2c, omap_clk clk); /* omap_gpio.c */ #define TYPE_OMAP1_GPIO "omap-gpio" -DECLARE_INSTANCE_CHECKER(struct omap_gpif_s, OMAP1_GPIO, +typedef struct Omap1GpioState Omap1GpioState; +DECLARE_INSTANCE_CHECKER(Omap1GpioState, OMAP1_GPIO, TYPE_OMAP1_GPIO) #define TYPE_OMAP2_GPIO "omap2-gpio" DECLARE_INSTANCE_CHECKER(struct omap2_gpif_s, OMAP2_GPIO, TYPE_OMAP2_GPIO) -typedef struct omap_gpif_s omap_gpif; typedef struct omap2_gpif_s omap2_gpif; /* TODO: clock framework (see above) */ -void omap_gpio_set_clk(omap_gpif *gpio, omap_clk clk); +void omap_gpio_set_clk(Omap1GpioState *gpio, omap_clk clk); void omap2_gpio_set_iclk(omap2_gpif *gpio, omap_clk clk); void omap2_gpio_set_fclk(omap2_gpif *gpio, uint8_t i, omap_clk clk);