Skip to content

Commit 5a1fcb6

Browse files
barnas-michalcfriedt
authored andcommitted
doc: replace courge with corge
Grault and corge are both syntactical variables used globally. Courge is misspelling of corge. Signed-off-by: Michał Barnaś <[email protected]>
1 parent 1b06477 commit 5a1fcb6

File tree

3 files changed

+27
-27
lines changed

3 files changed

+27
-27
lines changed

doc/reference/drivers/index.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -499,14 +499,14 @@ For example:
499499
500500
struct my_driver_config {
501501
...
502-
DEVICE_MMIO_NAMED_ROM(courge);
502+
DEVICE_MMIO_NAMED_ROM(corge);
503503
DEVICE_MMIO_NAMED_ROM(grault);
504504
...
505505
}
506506
507507
struct my_driver_dev_data {
508508
...
509-
DEVICE_MMIO_NAMED_RAM(courge);
509+
DEVICE_MMIO_NAMED_RAM(corge);
510510
DEVICE_MMIO_NAMED_RAM(grault);
511511
...
512512
}
@@ -519,15 +519,15 @@ For example:
519519
520520
const static struct my_driver_config my_driver_config_0 = {
521521
...
522-
DEVICE_MMIO_NAMED_ROM_INIT(courge, DT_DRV_INST(...)),
522+
DEVICE_MMIO_NAMED_ROM_INIT(corge, DT_DRV_INST(...)),
523523
DEVICE_MMIO_NAMED_ROM_INIT(grault, DT_DRV_INST(...)),
524524
...
525525
}
526526
527527
int my_driver_init(const struct device *dev)
528528
{
529529
...
530-
DEVICE_MMIO_NAMED_MAP(dev, courge, K_MEM_CACHE_NONE);
530+
DEVICE_MMIO_NAMED_MAP(dev, corge, K_MEM_CACHE_NONE);
531531
DEVICE_MMIO_NAMED_MAP(dev, grault, K_MEM_CACHE_NONE);
532532
...
533533
}
@@ -537,7 +537,7 @@ For example:
537537
...
538538
/* Write some data to the MMIO regions */
539539
sys_write32(0xDEADBEEF, DEVICE_MMIO_GET(dev, grault));
540-
sys_write32(0xF0CCAC1A, DEVICE_MMIO_GET(dev, courge));
540+
sys_write32(0xF0CCAC1A, DEVICE_MMIO_GET(dev, corge));
541541
...
542542
}
543543

include/sys/device_mmio.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ struct z_device_mmio_rom {
323323
*
324324
* struct foo_driver_data {
325325
* int blarg;
326-
* DEVICE_MMIO_NAMED_RAM(courge);
326+
* DEVICE_MMIO_NAMED_RAM(corge);
327327
* DEVICE_MMIO_NAMED_RAM(grault);
328328
* int wibble;
329329
* ...
@@ -380,7 +380,7 @@ struct z_device_mmio_rom {
380380
*
381381
* struct foo_config {
382382
* int bar;
383-
* DEVICE_MMIO_NAMED_ROM(courge);
383+
* DEVICE_MMIO_NAMED_ROM(corge);
384384
* DEVICE_MMIO_NAMED_ROM(grault);
385385
* int baz;
386386
* ...
@@ -417,11 +417,11 @@ struct z_device_mmio_rom {
417417
* a device config struct, using information from DTS.
418418
*
419419
* Example for an instance of a driver belonging to the "foo" subsystem
420-
* that will have two regions named 'courge' and 'grault':
420+
* that will have two regions named 'corge' and 'grault':
421421
*
422422
* struct foo_config my_config = {
423423
* bar = 7;
424-
* DEVICE_MMIO_NAMED_ROM_INIT(courge, DT_DRV_INST(...));
424+
* DEVICE_MMIO_NAMED_ROM_INIT(corge, DT_DRV_INST(...));
425425
* DEVICE_MMIO_NAMED_ROM_INIT(grault, DT_DRV_INST(...));
426426
* baz = 2;
427427
* ...

tests/kernel/device/src/mmio.c

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -103,19 +103,19 @@ void test_mmio_single(void)
103103
struct foo_mult_dev_data {
104104
int baz;
105105

106-
DEVICE_MMIO_NAMED_RAM(courge);
106+
DEVICE_MMIO_NAMED_RAM(corge);
107107
DEVICE_MMIO_NAMED_RAM(grault);
108108
};
109109

110110
struct foo_mult_dev_data foo12_data;
111111

112112
struct foo_mult_config_info {
113-
DEVICE_MMIO_NAMED_ROM(courge);
113+
DEVICE_MMIO_NAMED_ROM(corge);
114114
DEVICE_MMIO_NAMED_ROM(grault);
115115
};
116116

117117
const struct foo_mult_config_info foo12_config = {
118-
DEVICE_MMIO_NAMED_ROM_INIT(courge, DT_DRV_INST(1)),
118+
DEVICE_MMIO_NAMED_ROM_INIT(corge, DT_DRV_INST(1)),
119119
DEVICE_MMIO_NAMED_ROM_INIT(grault, DT_DRV_INST(2))
120120
};
121121

@@ -124,7 +124,7 @@ const struct foo_mult_config_info foo12_config = {
124124

125125
int foo_mult_init(const struct device *dev)
126126
{
127-
DEVICE_MMIO_NAMED_MAP(dev, courge, K_MEM_CACHE_NONE);
127+
DEVICE_MMIO_NAMED_MAP(dev, corge, K_MEM_CACHE_NONE);
128128
DEVICE_MMIO_NAMED_MAP(dev, grault, K_MEM_CACHE_NONE);
129129

130130
return 0;
@@ -143,7 +143,7 @@ DEVICE_DEFINE(foo12, "foo12", foo_mult_init, NULL,
143143
* stuff somewhere.
144144
*
145145
* We show that this works for a device instance that has two named regions,
146-
* 'courge' and 'grault' that respectively come from DTS instances 1 and 2.
146+
* 'corge' and 'grault' that respectively come from DTS instances 1 and 2.
147147
*
148148
* We also perform some checks depending on configuration:
149149
* - If MMIO addresses are maintained in RAM, check that the ROM struct
@@ -159,32 +159,32 @@ void test_mmio_multiple(void)
159159
{
160160
/* See comments for test_mmio_single */
161161
const struct device *dev = device_get_binding("foo12");
162-
mm_reg_t regs_courge, regs_grault;
163-
const struct z_device_mmio_rom *rom_courge, *rom_grault;
162+
mm_reg_t regs_corge, regs_grault;
163+
const struct z_device_mmio_rom *rom_corge, *rom_grault;
164164

165165
zassert_not_null(dev, "null foo12");
166166

167-
regs_courge = DEVICE_MMIO_NAMED_GET(dev, courge);
167+
regs_corge = DEVICE_MMIO_NAMED_GET(dev, corge);
168168
regs_grault = DEVICE_MMIO_NAMED_GET(dev, grault);
169-
rom_courge = DEVICE_MMIO_NAMED_ROM_PTR(dev, courge);
169+
rom_corge = DEVICE_MMIO_NAMED_ROM_PTR(dev, corge);
170170
rom_grault = DEVICE_MMIO_NAMED_ROM_PTR(dev, grault);
171171

172-
zassert_not_equal(regs_courge, 0, "bad regs_courge");
172+
zassert_not_equal(regs_corge, 0, "bad regs_corge");
173173
zassert_not_equal(regs_grault, 0, "bad regs_grault");
174174

175175
#ifdef DEVICE_MMIO_IS_IN_RAM
176-
zassert_equal(rom_courge->phys_addr, DT_INST_REG_ADDR(1),
177-
"bad phys_addr (courge)");
178-
zassert_equal(rom_courge->size, DT_INST_REG_SIZE(1),
179-
"bad size (courge)");
176+
zassert_equal(rom_corge->phys_addr, DT_INST_REG_ADDR(1),
177+
"bad phys_addr (corge)");
178+
zassert_equal(rom_corge->size, DT_INST_REG_SIZE(1),
179+
"bad size (corge)");
180180
zassert_equal(rom_grault->phys_addr, DT_INST_REG_ADDR(2),
181181
"bad phys_addr (grault)");
182182
zassert_equal(rom_grault->size, DT_INST_REG_SIZE(2),
183183
"bad size (grault)");
184184
#else
185-
zassert_equal(rom_courge->addr, DT_INST_REG_ADDR(1),
186-
"bad addr (courge)");
187-
zassert_equal(regs_courge, rom_courge->addr, "bad regs (courge)");
185+
zassert_equal(rom_corge->addr, DT_INST_REG_ADDR(1),
186+
"bad addr (corge)");
187+
zassert_equal(regs_corge, rom_corge->addr, "bad regs (corge)");
188188
zassert_equal(rom_grault->addr, DT_INST_REG_ADDR(2),
189189
"bad addr (grault)");
190190
zassert_equal(regs_grault, rom_grault->addr, "bad regs (grault)");
@@ -231,7 +231,7 @@ void test_mmio_toplevel(void)
231231
rom_foo3 = DEVICE_MMIO_TOPLEVEL_ROM_PTR(foo3);
232232
rom_foo4 = DEVICE_MMIO_TOPLEVEL_ROM_PTR(foo4);
233233

234-
zassert_not_equal(regs_foo3, 0, "bad regs_courge");
234+
zassert_not_equal(regs_foo3, 0, "bad regs_corge");
235235
zassert_not_equal(regs_foo4, 0, "bad regs_grault");
236236

237237
#ifdef DEVICE_MMIO_IS_IN_RAM

0 commit comments

Comments
 (0)