lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aYX8qnKiPxHej-Xo@sirena.co.uk>
Date: Fri, 6 Feb 2026 14:37:30 +0000
From: Mark Brown <broonie@...nel.org>
To: Shengjiu Wang <shengjiu.wang@....com>
Cc: shengjiu.wang@...il.com, Xiubo.Lee@...il.com, festevam@...il.com,
	nicoleotsuka@...il.com, lgirdwood@...il.com, perex@...ex.cz,
	tiwai@...e.com, linux-sound@...r.kernel.org,
	linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] ASoC: fsl_sai: add bitcount and timestamp controls

On Fri, Feb 06, 2026 at 04:43:33PM +0800, Shengjiu Wang wrote:

> +	SOC_ENUM("Transmit Timestamp Increment", tstmp_enum[0]),

Don't have arrays of enums with magic indexes into them - this is just
error prone and hard to follow.  The normal thing is to declare a
separtae variable for each enum, or if you *must* use an array use
named constants at both ends to index into it (but that's not
meaningfully different to just having multiple variables...).

> +	SOC_SINGLE("Transmit Timestamp Reset", FSL_SAI_TTCTL, __bf_shf(FSL_SAI_xTCTL_RTSC), 1, 0),
> +	SOC_SINGLE("Transmit Bit Counter Reset", FSL_SAI_TTCTL, __bf_shf(FSL_SAI_xTCTL_RBC), 1, 0),

__bf_shf()?

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ