On Wed, Sep 25, 2024 at 11:27:54AM +0300, Dmitry Baryshkov wrote: > On Wed, Sep 25, 2024 at 05:38:22AM GMT, Alexey Klimov wrote: > > +#define CDC_RX_RXn_RX_PATH_SEC7(rx, n) \ > > + (0x0434 + rx->rxn_reg_stride * n + n * (n - 1) * rx->rxn_reg_stride2) > This is a nice hack to rule out n=0 and n=1, but maybe we can be more > obvious here: > (0x0434 + stride * n + (n > 2) ? stride2 : 0) Yes. We could also use some brackets to make the + and * precedence obvious.
Attachment:
signature.asc
Description: PGP signature
- Follow-Ups:
- References:
- Prev by Date: Re: [PATCH] ASoC: intel: sof_sdw: Add check devm_kasprintf() returned value
- Next by Date: Re: [PATCH v2 5/9] ASoC: loongson: Fix codec detection failure on FDT systems
- Previous by thread: Re: [PATCH REVIEW 1/2] ASoC: codecs: lpass-rx-macro: fix RXn(rx,n) macro for DSM_CTL and SEC7 regs
- Next by thread: Re: [PATCH REVIEW 1/2] ASoC: codecs: lpass-rx-macro: fix RXn(rx,n) macro for DSM_CTL and SEC7 regs
- Index(es):