SWDEV-351031 - Any bit other than the rightmost 4 bits shouldn't be set

Change-Id: I6c834f491ce393eb37259eabc603220c5b5f164e


[ROCm/clr commit: 35051e778d]
这个提交包含在:
Jaydeep Patel 编写, Jaydeepkumar Patel 于 2022-08-10 23:30:22 -04:00 提交
1 父节点 7e7576a849
当前提交 29d27cdee0
1 个文件已更改
+1 -1
+1 -1
查看文件
@@ -1089,7 +1089,7 @@ hipError_t hipHostGetFlags(unsigned int* flagsPtr, void* hostPtr) {
} }
hipError_t ihipHostRegister(void* hostPtr, size_t sizeBytes, unsigned int flags) { hipError_t ihipHostRegister(void* hostPtr, size_t sizeBytes, unsigned int flags) {
if (hostPtr == nullptr || sizeBytes == 0) { if (hostPtr == nullptr || sizeBytes == 0 || flags > 15) {
return hipErrorInvalidValue; return hipErrorInvalidValue;
} else { } else {
amd::Memory* mem = new (*hip::host_device->asContext()) amd::Buffer(*hip::host_device->asContext(), amd::Memory* mem = new (*hip::host_device->asContext()) amd::Buffer(*hip::host_device->asContext(),