]> git.baikalelectronics.ru Git - kernel.git/commit
staging: rtl8723au: core: Replace open coded version with existing hweight function
authorTapasweni Pathak <tapaswenipathak@gmail.com>
Wed, 8 Oct 2014 04:45:42 +0000 (10:15 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Oct 2014 02:29:17 +0000 (10:29 +0800)
commit04480b748f56538040168545a3559dbf6b9d1f62
tree8fe781aee564a53279dbcfc0369eaa6ba60c766d
parentbb408a4c21763cb60550103f34816bac5575a438
staging: rtl8723au: core: Replace open coded version with existing hweight function

This patch replaces the open coded version with Linux's existing hweight
functions.
The original version checked each of the low four bits, accumulating and
returning the result. Instead, use a mask to select those four bits, and
pass the result to hweight8.
It also makes the code in this function simpler.

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_efuse.c