Revision 031f196d1b1b6d5dfcb0533b431e3ab1750e6189 authored by Alex Hung on 11 January 2023, 16:54:11 UTC, committed by Alex Deucher on 02 March 2023, 03:43:19 UTC
[WHY]
When PTEBufferSizeInRequests is zero, UBSAN reports the following
warning because dml_log2 returns an unexpected negative value:

  shift exponent 4294966273 is too large for 32-bit type 'int'

[HOW]

In the case PTEBufferSizeInRequests is zero, skip the dml_log2() and
assign the result directly.

Reviewed-by: Jun Lei <Jun.Lei@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 01a18aa
History
File Mode Size
Kconfig -rw-r--r-- 966 bytes
Makefile -rw-r--r-- 68 bytes
dcbevent.c -rw-r--r-- 790 bytes
dcbnl.c -rw-r--r-- 56.3 KB

back to top