[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 31/38] hw/arm/stellaris: Use CamelCase for STELLARIS_ADC type name
From: |
Peter Maydell |
Subject: |
[PULL 31/38] hw/arm/stellaris: Use CamelCase for STELLARIS_ADC type name |
Date: |
Fri, 13 Jan 2023 14:11:19 +0000 |
From: Philippe Mathieu-Daudé <philmd@linaro.org>
Following docs/devel/style.rst guidelines, rename
stellaris_adc_state -> StellarisADCState. This also remove a
use of 'struct' in the DECLARE_INSTANCE_CHECKER() macro call.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20230109140306.23161-9-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
hw/arm/stellaris.c | 73 +++++++++++++++++++++++-----------------------
1 file changed, 36 insertions(+), 37 deletions(-)
diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c
index 051c242e9d6..67a2293d35f 100644
--- a/hw/arm/stellaris.c
+++ b/hw/arm/stellaris.c
@@ -674,9 +674,8 @@ static void stellaris_i2c_init(Object *obj)
#define STELLARIS_ADC_FIFO_FULL 0x1000
#define TYPE_STELLARIS_ADC "stellaris-adc"
-typedef struct StellarisADCState stellaris_adc_state;
-DECLARE_INSTANCE_CHECKER(stellaris_adc_state, STELLARIS_ADC,
- TYPE_STELLARIS_ADC)
+typedef struct StellarisADCState StellarisADCState;
+DECLARE_INSTANCE_CHECKER(StellarisADCState, STELLARIS_ADC, TYPE_STELLARIS_ADC)
struct StellarisADCState {
SysBusDevice parent_obj;
@@ -700,7 +699,7 @@ struct StellarisADCState {
qemu_irq irq[4];
};
-static uint32_t stellaris_adc_fifo_read(stellaris_adc_state *s, int n)
+static uint32_t stellaris_adc_fifo_read(StellarisADCState *s, int n)
{
int tail;
@@ -716,7 +715,7 @@ static uint32_t stellaris_adc_fifo_read(stellaris_adc_state
*s, int n)
return s->fifo[n].data[tail];
}
-static void stellaris_adc_fifo_write(stellaris_adc_state *s, int n,
+static void stellaris_adc_fifo_write(StellarisADCState *s, int n,
uint32_t value)
{
int head;
@@ -736,7 +735,7 @@ static void stellaris_adc_fifo_write(stellaris_adc_state
*s, int n,
s->fifo[n].state |= STELLARIS_ADC_FIFO_FULL;
}
-static void stellaris_adc_update(stellaris_adc_state *s)
+static void stellaris_adc_update(StellarisADCState *s)
{
int level;
int n;
@@ -749,7 +748,7 @@ static void stellaris_adc_update(stellaris_adc_state *s)
static void stellaris_adc_trigger(void *opaque, int irq, int level)
{
- stellaris_adc_state *s = opaque;
+ StellarisADCState *s = opaque;
int n;
for (n = 0; n < 4; n++) {
@@ -771,7 +770,7 @@ static void stellaris_adc_trigger(void *opaque, int irq,
int level)
}
}
-static void stellaris_adc_reset(stellaris_adc_state *s)
+static void stellaris_adc_reset(StellarisADCState *s)
{
int n;
@@ -785,7 +784,7 @@ static void stellaris_adc_reset(stellaris_adc_state *s)
static uint64_t stellaris_adc_read(void *opaque, hwaddr offset,
unsigned size)
{
- stellaris_adc_state *s = opaque;
+ StellarisADCState *s = opaque;
/* TODO: Implement this. */
if (offset >= 0x40 && offset < 0xc0) {
@@ -833,7 +832,7 @@ static uint64_t stellaris_adc_read(void *opaque, hwaddr
offset,
static void stellaris_adc_write(void *opaque, hwaddr offset,
uint64_t value, unsigned size)
{
- stellaris_adc_state *s = opaque;
+ StellarisADCState *s = opaque;
/* TODO: Implement this. */
if (offset >= 0x40 && offset < 0xc0) {
@@ -901,31 +900,31 @@ static const VMStateDescription vmstate_stellaris_adc = {
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
- VMSTATE_UINT32(actss, stellaris_adc_state),
- VMSTATE_UINT32(ris, stellaris_adc_state),
- VMSTATE_UINT32(im, stellaris_adc_state),
- VMSTATE_UINT32(emux, stellaris_adc_state),
- VMSTATE_UINT32(ostat, stellaris_adc_state),
- VMSTATE_UINT32(ustat, stellaris_adc_state),
- VMSTATE_UINT32(sspri, stellaris_adc_state),
- VMSTATE_UINT32(sac, stellaris_adc_state),
- VMSTATE_UINT32(fifo[0].state, stellaris_adc_state),
- VMSTATE_UINT32_ARRAY(fifo[0].data, stellaris_adc_state, 16),
- VMSTATE_UINT32(ssmux[0], stellaris_adc_state),
- VMSTATE_UINT32(ssctl[0], stellaris_adc_state),
- VMSTATE_UINT32(fifo[1].state, stellaris_adc_state),
- VMSTATE_UINT32_ARRAY(fifo[1].data, stellaris_adc_state, 16),
- VMSTATE_UINT32(ssmux[1], stellaris_adc_state),
- VMSTATE_UINT32(ssctl[1], stellaris_adc_state),
- VMSTATE_UINT32(fifo[2].state, stellaris_adc_state),
- VMSTATE_UINT32_ARRAY(fifo[2].data, stellaris_adc_state, 16),
- VMSTATE_UINT32(ssmux[2], stellaris_adc_state),
- VMSTATE_UINT32(ssctl[2], stellaris_adc_state),
- VMSTATE_UINT32(fifo[3].state, stellaris_adc_state),
- VMSTATE_UINT32_ARRAY(fifo[3].data, stellaris_adc_state, 16),
- VMSTATE_UINT32(ssmux[3], stellaris_adc_state),
- VMSTATE_UINT32(ssctl[3], stellaris_adc_state),
- VMSTATE_UINT32(noise, stellaris_adc_state),
+ VMSTATE_UINT32(actss, StellarisADCState),
+ VMSTATE_UINT32(ris, StellarisADCState),
+ VMSTATE_UINT32(im, StellarisADCState),
+ VMSTATE_UINT32(emux, StellarisADCState),
+ VMSTATE_UINT32(ostat, StellarisADCState),
+ VMSTATE_UINT32(ustat, StellarisADCState),
+ VMSTATE_UINT32(sspri, StellarisADCState),
+ VMSTATE_UINT32(sac, StellarisADCState),
+ VMSTATE_UINT32(fifo[0].state, StellarisADCState),
+ VMSTATE_UINT32_ARRAY(fifo[0].data, StellarisADCState, 16),
+ VMSTATE_UINT32(ssmux[0], StellarisADCState),
+ VMSTATE_UINT32(ssctl[0], StellarisADCState),
+ VMSTATE_UINT32(fifo[1].state, StellarisADCState),
+ VMSTATE_UINT32_ARRAY(fifo[1].data, StellarisADCState, 16),
+ VMSTATE_UINT32(ssmux[1], StellarisADCState),
+ VMSTATE_UINT32(ssctl[1], StellarisADCState),
+ VMSTATE_UINT32(fifo[2].state, StellarisADCState),
+ VMSTATE_UINT32_ARRAY(fifo[2].data, StellarisADCState, 16),
+ VMSTATE_UINT32(ssmux[2], StellarisADCState),
+ VMSTATE_UINT32(ssctl[2], StellarisADCState),
+ VMSTATE_UINT32(fifo[3].state, StellarisADCState),
+ VMSTATE_UINT32_ARRAY(fifo[3].data, StellarisADCState, 16),
+ VMSTATE_UINT32(ssmux[3], StellarisADCState),
+ VMSTATE_UINT32(ssctl[3], StellarisADCState),
+ VMSTATE_UINT32(noise, StellarisADCState),
VMSTATE_END_OF_LIST()
}
};
@@ -933,7 +932,7 @@ static const VMStateDescription vmstate_stellaris_adc = {
static void stellaris_adc_init(Object *obj)
{
DeviceState *dev = DEVICE(obj);
- stellaris_adc_state *s = STELLARIS_ADC(obj);
+ StellarisADCState *s = STELLARIS_ADC(obj);
SysBusDevice *sbd = SYS_BUS_DEVICE(obj);
int n;
@@ -1381,7 +1380,7 @@ static void stellaris_adc_class_init(ObjectClass *klass,
void *data)
static const TypeInfo stellaris_adc_info = {
.name = TYPE_STELLARIS_ADC,
.parent = TYPE_SYS_BUS_DEVICE,
- .instance_size = sizeof(stellaris_adc_state),
+ .instance_size = sizeof(StellarisADCState),
.instance_init = stellaris_adc_init,
.class_init = stellaris_adc_class_init,
};
--
2.34.1
- [PULL 23/38] hw/arm: Remove unreachable code calling pflash_cfi01_register(), (continued)
- [PULL 23/38] hw/arm: Remove unreachable code calling pflash_cfi01_register(), Peter Maydell, 2023/01/13
- [PULL 18/38] hw/arm/musicpal: Use the IEC binary prefix definitions, Peter Maydell, 2023/01/13
- [PULL 30/38] hw/arm/stellaris: Drop useless casts from void * to pointer, Peter Maydell, 2023/01/13
- [PULL 16/38] hw/arm/gumstix: Use the IEC binary prefix definitions, Peter Maydell, 2023/01/13
- [PULL 28/38] hw/gpio/omap_gpio: Use CamelCase for TYPE_OMAP2_GPIO type name, Peter Maydell, 2023/01/13
- [PULL 20/38] hw/arm/omap_sx1: Use the IEC binary prefix definitions, Peter Maydell, 2023/01/13
- [PULL 19/38] hw/arm/omap_sx1: Remove unused 'total_ram' definitions, Peter Maydell, 2023/01/13
- [PULL 27/38] hw/gpio/omap_gpio: Use CamelCase for TYPE_OMAP1_GPIO type name, Peter Maydell, 2023/01/13
- [PULL 37/38] hw/timer/xilinx_timer: Use XpsTimerState instead of 'struct timerblock', Peter Maydell, 2023/01/13
- [PULL 35/38] hw/misc/sbsa_ec: Declare QOM macros using OBJECT_DECLARE_SIMPLE_TYPE(), Peter Maydell, 2023/01/13
- [PULL 31/38] hw/arm/stellaris: Use CamelCase for STELLARIS_ADC type name,
Peter Maydell <=
- [PULL 29/38] hw/intc/omap_intc: Use CamelCase for TYPE_OMAP_INTC type name, Peter Maydell, 2023/01/13
- [PULL 25/38] hw/gpio/omap_gpio: Add local variable to avoid embedded cast, Peter Maydell, 2023/01/13
- [PULL 32/38] hw/arm/bcm2836: Remove definitions generated by OBJECT_DECLARE_TYPE(), Peter Maydell, 2023/01/13
- [PULL 12/38] hw/arm/pxa2xx: Simplify pxa270_init(), Peter Maydell, 2023/01/13
- [PULL 14/38] hw/arm/collie: Simplify flash creation using for() loop, Peter Maydell, 2023/01/13
- [PULL 24/38] hw/arm/pxa: Avoid forward-declaring PXA2xxI2CState, Peter Maydell, 2023/01/13
- [PULL 17/38] hw/arm/mainstone: Use the IEC binary prefix definitions, Peter Maydell, 2023/01/13
- [PULL 22/38] hw/arm/vexpress: Remove dead code in vexpress_common_init(), Peter Maydell, 2023/01/13
- [PULL 38/38] target/arm: allow writes to SCR_EL3.HXEn bit when FEAT_HCX is enabled, Peter Maydell, 2023/01/13
- [PULL 26/38] hw/arm/omap: Drop useless casts from void * to pointer, Peter Maydell, 2023/01/13