Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\kunit\string-stream.c Create Date:2022-07-28 06:38:54
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:string_stream_fragment_init

Proto:static int string_stream_fragment_init(struct kunit_resource *res, void *context)

Type:int

Parameter:

TypeParameterName
struct kunit_resource *res
void *context
23  ctx = context
26  frag = kunit_kzalloc() - Just like kunit_kmalloc(), but zeroes the allocation.*@test: The test context object.*@size: The size in bytes of the desired memory.*@gfp: flags passed to underlying kmalloc().* See kzalloc() and kunit_kmalloc() for more information.
27  If Not frag Then Return -ENOMEM
30  test = test
31  fragment = kunit_kmalloc(test, len, gfp)
32  If Not fragment Then Return -ENOMEM
35  allocation = frag
37  Return 0