[PATCH 0/2] soundwire: bus: Prevent infinite loop in sdw_ch_mask_to_ch()

Richard Fitzgerald rf at opensource.cirrus.com
Thu Feb 2 16:42:10 CET 2023


sdw_ch_mask_to_ch() would loop forever if bit 31 of the mask was set.
The entire function is unnecessary because the existing standard
function hweight32() already does the same thing, and hweight32() is
safe. But the change has been made in two steps.

Richard Fitzgerald (2):
  soundwire: bus: Prevent infinite loop in sdw_ch_mask_to_ch()
  soundwire: bandwidth allocation: Use hweight32() to calculate set bits

 drivers/soundwire/bus.h                          | 11 -----------
 drivers/soundwire/generic_bandwidth_allocation.c |  3 ++-
 2 files changed, 2 insertions(+), 12 deletions(-)

-- 
2.30.2



More information about the Alsa-devel mailing list