On Wed, Mar 20, 2024 at 10:00:24AM -0500, Pierre-Louis Bossart wrote: > > + for (i = 0; i < CDNS_I2S_FIFO_DEPTH; i++) { > > + if (format == SNDRV_PCM_FORMAT_S16_LE) { > > + data[0] = p16[tx_ptr][0]; > > + data[1] = p16[tx_ptr][1]; > > + } else if (format == SNDRV_PCM_FORMAT_S32_LE) { > > + data[0] = p32[tx_ptr][0]; > > + data[1] = p32[tx_ptr][1]; > > + } > what about other formats implied by the use of 'else if' ? In general things like this should be written as switch statements.
Attachment:
signature.asc
Description: PGP signature
- Follow-Ups:
- References:
- [PATCH v2 0/2] Add Cadence I2S-MC controller driver
- From: Xingyu Wu
- [PATCH v2 2/2] ASoC: cdns: Add drivers of Cadence Multi-Channel I2S Controller
- From: Xingyu Wu
- Re: [PATCH v2 2/2] ASoC: cdns: Add drivers of Cadence Multi-Channel I2S Controller
- From: Pierre-Louis Bossart
- [PATCH v2 0/2] Add Cadence I2S-MC controller driver
- Prev by Date: Re: [PATCH 1/1] ASoC: dt-bindings: fsl-audmix: Convert fsl,audmix.txt to yaml
- Next by Date: Re: [PATCH 1/1] ASoC: dt-bindings: fsl-esai: Convert fsl,esai.txt to yaml
- Previous by thread: Re: [PATCH v2 2/2] ASoC: cdns: Add drivers of Cadence Multi-Channel I2S Controller
- Next by thread: 回复: [PATCH v2 2/2] ASoC: cdns: Add drivers of Cadence Multi-Channel I2S Controller
- Index(es):