RE: [PATCH rtw-next v6 3/3] wifi: rtw88: rtw8822c: Replace custom DAC IQ sorting with kernel sort
Ping-Ke Shih <[email protected]>
| Newsgroups | org.kernel.vger.linux-wireless,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Arsenii Pashchenko <[email protected]> wrote: > Replace the custom, nested bubble-sort logic in the calibration loop > with direct calls to the kernel's optimized heapsort implementation > inside rtw8822c_dac_cal_iq_search(). > > Implement a safe, overflow-proof s32 comparator using the subtraction > of relationals pattern. Since the input values are already properly > sign-extended into signed arrays, the custom circular index sorting > rules and helper functions completely disappear, reducing lines of code. > > Signed-off-by: Arsenii Pashchenko <[email protected]> Acked-by: Ping-Ke Shih <[email protected]>