-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ upstream commit 0cf0f931267ae751c503dba929307bb2a6acbbfa ] The function is_fec_mode_one_bit_set() is used to check whether the binary of the mode from user only contains one '1'. But it uses the bytes number this mode variable occupied to calculate the count. So this patch uses __builtin_popcount() to replace it. This patch also extracts the code for verifying mode parameter into a function. Fixes: 9bf2ea8 ("net/hns3: support FEC") Signed-off-by: Jie Hai <haijie1@huawei.com> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
- Loading branch information
1 parent
3e8f218
commit 65193ac
Showing
1 changed file
with
24 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters