Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\log2.h Create Date:2022-07-28 05:34:20
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__bits_per

Proto:static inline __attribute__((const)) int __bits_per(unsigned long n)

Type:int

Parameter:

TypeParameterName
unsigned longn
227  If n < 2 Then Return 1
229  If s_power_of_2() - check if a value is a power of two*@n: the value to check* Determine whether some value is a power of two, where zero is* *not* considered a power of two.* Return: true if @n is a power of 2, otherwise false. Then Return rder_base_2 - calculate the (rounded up) base 2 order of the argument*@n: parameter* The first few values calculated by this routine:* ob2(0) = 0* ob2(1) = 0* ob2(2) = 1* ob2(3) = 2* ob2(4) = 2* ob2(5) = 3* ... and so on.(n) + 1
231  Return rder_base_2 - calculate the (rounded up) base 2 order of the argument*@n: parameter* The first few values calculated by this routine:* ob2(0) = 0* ob2(1) = 0* ob2(2) = 1* ob2(3) = 2* ob2(4) = 2* ob2(5) = 3* ... and so on.(n)