From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: qemu-arm@nongnu.org, "Havard Skinnemoen" <hskinnemoen@google.com>,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
"Alistair Francis" <alistair@alistair23.me>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Eduardo Habkost" <eduardo@habkost.net>,
"Tyrone Ting" <kfting@nuvoton.com>
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 [thread overview]
Message-ID: <20230109140306.23161-5-philmd@linaro.org> (raw)
In-Reply-To: <20230109140306.23161-1-philmd@linaro.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é <philmd@linaro.org>
---
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);
--
2.38.1
next prev parent reply other threads:[~2023-01-09 15:33 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-09 14:02 [PATCH 00/14] hw/arm: QOM OBJECT_DECLARE_SIMPLE_TYPE cleanups Philippe Mathieu-Daudé
2023-01-09 14:02 ` [PATCH 01/14] hw/arm/pxa: Avoid forward-declaring PXA2xxI2CState Philippe Mathieu-Daudé
2023-01-09 14:02 ` [PATCH 02/14] hw/gpio/omap_gpio: Add local variable to avoid embedded cast Philippe Mathieu-Daudé
2023-01-09 14:02 ` [PATCH 03/14] hw/arm/omap: Drop useless casts from void * to pointer Philippe Mathieu-Daudé
2023-01-09 14:02 ` Philippe Mathieu-Daudé [this message]
2023-01-09 14:02 ` [PATCH 05/14] hw/gpio/omap_gpio: Use CamelCase for TYPE_OMAP2_GPIO type name Philippe Mathieu-Daudé
2023-01-09 14:02 ` [PATCH 06/14] hw/intc/omap_intc: Use CamelCase for TYPE_OMAP_INTC " Philippe Mathieu-Daudé
2023-01-09 14:02 ` [PATCH 07/14] hw/arm/stellaris: Drop useless casts from void * to pointer Philippe Mathieu-Daudé
2023-01-09 14:03 ` [PATCH 08/14] hw/arm/stellaris: Use CamelCase for STELLARIS_ADC type name Philippe Mathieu-Daudé
2023-01-09 14:03 ` [PATCH 09/14] hw/arm/bcm2836: Remove definitions generated by OBJECT_DECLARE_TYPE() Philippe Mathieu-Daudé
2023-01-09 14:03 ` [PATCH 10/14] hw/arm/npcm7xx: Declare QOM macros using OBJECT_DECLARE_SIMPLE_TYPE() Philippe Mathieu-Daudé
2023-01-09 14:03 ` [PATCH 11/14] hw/misc/sbsa_ec: Rename TYPE_SBSA_EC -> TYPE_SBSA_SECURE_EC Philippe Mathieu-Daudé
2023-01-09 14:03 ` [PATCH 12/14] hw/misc/sbsa_ec: Declare QOM macros using OBJECT_DECLARE_SIMPLE_TYPE() Philippe Mathieu-Daudé
2023-01-09 14:03 ` [PATCH 13/14] hw/intc/xilinx_intc: Use 'XpsIntc' typedef instead of 'struct xlx_pic' Philippe Mathieu-Daudé
2023-01-10 11:59 ` Edgar E. Iglesias
2023-01-09 14:03 ` [PATCH 14/14] hw/timer/xilinx_timer: Use XpsTimerState instead of 'struct timerblock' Philippe Mathieu-Daudé
2023-01-10 12:00 ` Edgar E. Iglesias
2023-01-09 17:59 ` [PATCH 00/14] hw/arm: QOM OBJECT_DECLARE_SIMPLE_TYPE cleanups Richard Henderson
2023-01-12 17:16 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230109140306.23161-5-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=alistair@alistair23.me \
--cc=edgar.iglesias@gmail.com \
--cc=eduardo@habkost.net \
--cc=hskinnemoen@google.com \
--cc=kfting@nuvoton.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).