Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\test_overflow.c Create Date:2022-07-28 06:30:27
Last Modify:2022-05-18 10:03:51 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:do_test_u8

Proto:static int __attribute__((__section__(".init.text"))) __attribute__((__cold__))do_test_u8(const struct test_u8 *p)

Type:int

Parameter:

TypeParameterName
const struct test_u8 *p
263  err = 0
263  Do
263  _of = ({
263  __a = a
263  __b = b
263  __d = _r
263  __a == __b
263  __a == __d
263  })
263  If _of != s_of Then
263  printk("\0014"KBUILD_MODNAME": expected %d + %d to%s overflow (type %s)\n", a, b, s_of ? "" : " not", "u8")
263  err = 1
263  If _r != sum Then
263  printk("\0014"KBUILD_MODNAME": expected %d + %d == %d, got %d (type %s)\n", a, b, sum, _r, "u8")
263  err = 1
263  When 0 cycle
263  Do
263  _of = ({
263  __a = b
263  __b = a
263  __d = _r
263  __a == __b
263  __a == __d
263  })
263  If _of != s_of Then
263  printk("\0014"KBUILD_MODNAME": expected %d + %d to%s overflow (type %s)\n", b, a, s_of ? "" : " not", "u8")
263  err = 1
263  If _r != sum Then
263  printk("\0014"KBUILD_MODNAME": expected %d + %d == %d, got %d (type %s)\n", b, a, sum, _r, "u8")
263  err = 1
263  When 0 cycle
263  Do
263  _of = ({
263  __a = a
263  __b = b
263  __d = _r
263  __a == __b
263  __a == __d
263  })
263  If _of != d_of Then
263  printk("\0014"KBUILD_MODNAME": expected %d - %d to%s overflow (type %s)\n", a, b, d_of ? "" : " not", "u8")
263  err = 1
263  If _r != diff Then
263  printk("\0014"KBUILD_MODNAME": expected %d - %d == %d, got %d (type %s)\n", a, b, diff, _r, "u8")
263  err = 1
263  When 0 cycle
263  Do
263  _of = ({
263  __a = a
263  __b = b
263  __d = _r
263  __a == __b
263  __a == __d
263  })
263  If _of != p_of Then
263  printk("\0014"KBUILD_MODNAME": expected %d * %d to%s overflow (type %s)\n", a, b, p_of ? "" : " not", "u8")
263  err = 1
263  If _r != prod Then
263  printk("\0014"KBUILD_MODNAME": expected %d * %d == %d, got %d (type %s)\n", a, b, prod, _r, "u8")
263  err = 1
263  When 0 cycle
263  Do
263  _of = ({
263  __a = b
263  __b = a
263  __d = _r
263  __a == __b
263  __a == __d
263  })
263  If _of != p_of Then
263  printk("\0014"KBUILD_MODNAME": expected %d * %d to%s overflow (type %s)\n", b, a, p_of ? "" : " not", "u8")
263  err = 1
263  If _r != prod Then
263  printk("\0014"KBUILD_MODNAME": expected %d * %d == %d, got %d (type %s)\n", b, a, prod, _r, "u8")
263  err = 1
263  When 0 cycle
263  Return err
Caller
NameDescribe
test_u8_overflow