函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\crc32test.c Create Date:2022-07-27 07:52:59
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:crc32_test

函数原型:static int __init crc32_test(void)

返回类型:int

参数:

749  errors等于0
750  bytes等于0
759 i小于100循环
760  bytes加等于2乘andom 11 bit length of test
762  crc异或等于crc32_le(andom starting crc , 4096 random bytes + andom 6 bit offset in buf , andom 11 bit length of test )
765  crc异或等于crc32_be(andom starting crc , 4096 random bytes + andom 6 bit offset in buf , andom 11 bit length of test )
770  local_irq_save(flags)
771  禁止中断()
773  nsec等于ktime_get_ns()
774 i小于100循环
775  如果xpected crc32_le result 不等于crc32_le(andom starting crc , 4096 random bytes + andom 6 bit offset in buf , andom 11 bit length of test )则errors自加
779  如果xpected crc32_be result 不等于crc32_be(andom starting crc , 4096 random bytes + andom 6 bit offset in buf , andom 11 bit length of test )则errors自加
783  nsec等于ktime_get_ns()减nsec
785  local_irq_restore(flags)
786  开中断()
788  打印信息("crc32: CRC_LE_BITS = %d, CRC_BE BITS = %d\n", CRC_LE_BITS, CRC_BE_BITS)
791  如果errors打印警告信息("crc32: %d self tests failed\n", errors)
793  否则
794  打印信息("crc32: self tests passed, processed %d bytes in %lld nsec\n", bytes, nsec)
798  返回:0
调用者
名称描述
crc32test_init