Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit f2c3d800 authored by Xenia Ragiadakou's avatar Xenia Ragiadakou Committed by Greg Kroah-Hartman
Browse files

staging: rtl8192u: replace macro rx_hal_is_cck_rate() in r8192U_core.c



This patch replaces macro rx_hal_is_cck_rate() with
the static inline function rx_hal_is_cck_rate().

This replacement was suggested by Dan Carpenter and
has the following benefits:
- improves code readability
- guarantees type safety
- improves code efficiency by enforcing the evaluation of
  the simple boolean expression (!pdrvinfo->RxHT) to be
  done before the evaluation of the more complex one
  (pdrvinfo->RxRate == DESC90_RATE1M ||
   pdrvinfo->RxRate == DESC90_RATE2M ||
   pdrvinfo->RxRate == DESC90_RATE5_5M ||
   pdrvinfo->RxRate == DESC90_RATE11M)

Signed-off-by: default avatarXenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 88e5a934
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment