Message ID | 20250113001001.400669-2-thorsten.blum@linux.dev (mailing list archive) |
---|---|
State | Accepted |
Commit | 8eb27b5758e6fb6d1881413e3f1159c579ac48b3 |
Headers | show |
Series | ASoC: codecs: Use ARRAY_SIZE() to calculate PEB2466_TLV_SIZE | expand |
Hi Thorsten, On Mon, 13 Jan 2025 01:10:01 +0100 Thorsten Blum <thorsten.blum@linux.dev> wrote: > Use the ARRAY_SIZE() macro to calculate PEB2466_TLV_SIZE and improve the > code's readability. > > Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> > --- > sound/soc/codecs/peb2466.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/sound/soc/codecs/peb2466.c b/sound/soc/codecs/peb2466.c > index bb9ca6354ae1..a989cfe058f0 100644 > --- a/sound/soc/codecs/peb2466.c > +++ b/sound/soc/codecs/peb2466.c > @@ -26,8 +26,7 @@ struct peb2466_lookup { > unsigned int count; > }; > > -#define PEB2466_TLV_SIZE (sizeof((unsigned int []){TLV_DB_SCALE_ITEM(0, 0, 0)}) / \ > - sizeof(unsigned int)) > +#define PEB2466_TLV_SIZE ARRAY_SIZE(((unsigned int[]){TLV_DB_SCALE_ITEM(0, 0, 0)})) > > struct peb2466_lkup_ctrl { > int reg; Acked-by: Herve Codina <herve.codina@bootlin.com> Best regards, Hervé
On Mon, 13 Jan 2025 01:10:01 +0100, Thorsten Blum wrote: > Use the ARRAY_SIZE() macro to calculate PEB2466_TLV_SIZE and improve the > code's readability. > > Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next Thanks! [1/1] ASoC: codecs: Use ARRAY_SIZE() to calculate PEB2466_TLV_SIZE commit: 8eb27b5758e6fb6d1881413e3f1159c579ac48b3 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark
diff --git a/sound/soc/codecs/peb2466.c b/sound/soc/codecs/peb2466.c index bb9ca6354ae1..a989cfe058f0 100644 --- a/sound/soc/codecs/peb2466.c +++ b/sound/soc/codecs/peb2466.c @@ -26,8 +26,7 @@ struct peb2466_lookup { unsigned int count; }; -#define PEB2466_TLV_SIZE (sizeof((unsigned int []){TLV_DB_SCALE_ITEM(0, 0, 0)}) / \ - sizeof(unsigned int)) +#define PEB2466_TLV_SIZE ARRAY_SIZE(((unsigned int[]){TLV_DB_SCALE_ITEM(0, 0, 0)})) struct peb2466_lkup_ctrl { int reg;
Use the ARRAY_SIZE() macro to calculate PEB2466_TLV_SIZE and improve the code's readability. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> --- sound/soc/codecs/peb2466.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)