Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\vsprintf.c Create Date:2022-07-28 06:12:09
Last Modify:2022-05-21 09:47:42 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:bitmap_string

Proto:static __attribute__((__noinline__)) char *bitmap_string(char *buf, char *end, unsigned long *bitmap, struct printf_spec spec, const char *fmt)

Type:char

Parameter:

TypeParameterName
char *buf
char *end
unsigned long *bitmap
struct printf_specspec
const char *fmt
1157  CHUNKSZ = 32
1158  nr_bits = max_t - return maximum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(int, width of output field , 0)
1160  bool first = true
1162  If check_pointer( & buf, end, bitmap, spec) Then Return buf
1166  spec = (struct printf_spec){ flags to number() = use lowercase in hex (must be 32 == 0x20) | pad with zero, must be 16 == '0' - ' ' , number base, 8, 10 or 16 only = 16}
1168  chunksz = nr_bits & CHUNKSZ - 1
1169  If chunksz == 0 Then chunksz = CHUNKSZ
1172  i = @a is a power of 2 value (nr_bits, CHUNKSZ) - CHUNKSZ
1173  When i >= 0 cycle
1177  chunkmask = (1ULL << chunksz) - 1
1178  word = i / BITS_PER_LONG
1179  bit = i % BITS_PER_LONG
1180  val = bitmap[word] >> bit & chunkmask
1182  If Not first Then
1183  If buf < end Then buf = ','
1185  buf++
1187  first = false
1189  width of output field = DIV_ROUND_UP(chunksz, 4)
1190  buf = number(buf, end, val, spec)
1192  chunksz = CHUNKSZ
1194  Return buf
Caller
NameDescribe
pointerShow a '%p' thing. A kernel extension is that the '%p' is followed* by an extra set of alphanumeric characters that are extended format* specifiers.* Please update scripts/checkpatch.pl when adding/removing conversion* characters