Messages in this thread | | | Subject | Re: [PATCH v2 1/4] staging: r8188eu: refactor rtw_is_cckrates_included() | From | Michael Straube <> | Date | Mon, 16 Aug 2021 18:29:12 +0200 |
| |
On 8/16/21 6:15 PM, Joe Perches wrote: > On Mon, 2021-08-16 at 14:59 +0200, Fabio M. De Francesco wrote: >> On Monday, August 16, 2021 1:54:27 PM CEST Michael Straube wrote: >>> Refactor function rtw_is_cckrates_included(). Improves readability >>> and slightly reduces object file size. >>> >>> Signed-off-by: Michael Straube <straube.linux@gmail.com> >>> --- >>> v1 -> v2 >>> Refactored to more compact code as suggested by Joe Perches. >>> >>> drivers/staging/r8188eu/core/rtw_ieee80211.c | 9 ++++----- >>> 1 file changed, 4 insertions(+), 5 deletions(-) >>> >> >> Thanks for redoing the series as suggested by Joe Perches. >> This is a perfect case where conciseness and readability don't clash and >> instead the former enhances the latter. > > Perhaps do the whole thing in one go (moving the & 0x7f into the helper > avoids an early loop exit defect when the rate being indexed is 0x80) >
I will send v3 with your suggestions. The comparsions to boolean ( ... == true ) will be addressed in a separate series that cleans up comparsions to true/false in all files.
Regards, Michael
| |