Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: codecs: rt5677: Use secs_to_jiffies() instead of msecs_to_jiffies()

Use secs_to_jiffies() instead of msecs_to_jiffies() and avoid scaling
'delay' to milliseconds.

Since 'delay' isn't a compile-time constant, secs_to_jiffies() expands
to much simpler code compared to msecs_to_jiffies(), reducing the size
of 'snd-soc-rt5677-spi.ko' by 472 bytes.

No functional changes intended.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20250405125808.302259-1-thorsten.blum@linux.dev
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Thorsten Blum and committed by
Mark Brown
7afa9602 e0cd450a

+2 -2
+2 -2
sound/soc/codecs/rt5677-spi.c
··· 365 365 new_bytes -= copy_bytes; 366 366 } 367 367 368 - delay = bytes_to_frames(runtime, period_bytes) / (runtime->rate / 1000); 369 - schedule_delayed_work(&rt5677_dsp->copy_work, msecs_to_jiffies(delay)); 368 + delay = bytes_to_frames(runtime, period_bytes) / runtime->rate; 369 + schedule_delayed_work(&rt5677_dsp->copy_work, secs_to_jiffies(delay)); 370 370 done: 371 371 mutex_unlock(&rt5677_dsp->dma_lock); 372 372 }