lkml.org 
[lkml]   [2023]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v2] soundwire: bandwidth allocation: Use hweight32() to calculate set bits
    On 15-03-23, 14:50, Richard Fitzgerald wrote:
    > Replace the call to sdw_ch_mask_to_ch() with a call to hweight32().
    >
    > sdw_ch_mask_to_ch() is counting the number of set bits. The hweight()
    > family of functions already do this, and they have an advantage of
    > using a bit-counting instruction if it is available on the target CPU.
    > This also fixes a potential infinite loop bug in the implementation of
    > sdw_ch_mask_to_ch().

    Applied, thanks

    --
    ~Vinod

    \
     
     \ /
      Last update: 2023-03-27 01:02    [W:3.851 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site