Skip to content

Commit 2a4c5c8

Browse files
SPRESENSEanchao
authored andcommitted
arch: cxd56xx: Fix nxstyle
Fix error: Case statement should be on a new line. Signed-off-by: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com>
1 parent 48e9de5 commit 2a4c5c8

1 file changed

Lines changed: 14 additions & 11 deletions

File tree

arch/arm/src/cxd56xx/cxd56_dmac.c

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -313,13 +313,13 @@ static int ch2dmac(int ch)
313313
{
314314
switch (ch)
315315
{
316-
case 0: case 1:
316+
case 0 ... 1:
317317
return 1;
318-
case 2: case 3: case 4: case 5: case 6: /* APP IDMAC */
318+
case 2 ... 6: /* APP IDMAC */
319319
return 3;
320-
case 7: case 8: /* APP SKDMAC */
320+
case 7 ... 8: /* APP SKDMAC */
321321
return 2;
322-
default:
322+
default:
323323
return 0;
324324
}
325325
}
@@ -330,9 +330,12 @@ static struct dmac_register_map *get_device(int ch)
330330

331331
switch (id)
332332
{
333-
case 1: return (struct dmac_register_map *)DMAC1_REG_BASE;
334-
case 2: return (struct dmac_register_map *)DMAC2_REG_BASE;
335-
case 3: return (struct dmac_register_map *)DMAC3_REG_BASE;
333+
case 1:
334+
return (struct dmac_register_map *)DMAC1_REG_BASE;
335+
case 2:
336+
return (struct dmac_register_map *)DMAC2_REG_BASE;
337+
case 3:
338+
return (struct dmac_register_map *)DMAC3_REG_BASE;
336339
}
337340

338341
return NULL;
@@ -366,13 +369,13 @@ static int get_pmid(int ch)
366369
{
367370
switch (ch)
368371
{
369-
case 0: case 1:
372+
case 0 ... 1:
370373
return PM_APP_ADMAC;
371-
case 2: case 3: case 4: case 5: case 6:
374+
case 2 ... 6:
372375
return PM_APP_IDMAC;
373-
case 7: case 8:
376+
case 7 ... 8:
374377
return PM_APP_SKDMAC;
375-
default:
378+
default:
376379
break; /* may not comes here */
377380
}
378381

0 commit comments

Comments
 (0)