forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/drivers/hwtracing/coresight/coresight-tmc-etf.c
....@@ -428,7 +428,7 @@
428428 return -EINVAL;
429429
430430 /* wrap head around to the amount of space we have */
431
- head = handle->head & ((buf->nr_pages << PAGE_SHIFT) - 1);
431
+ head = handle->head & (((unsigned long)buf->nr_pages << PAGE_SHIFT) - 1);
432432
433433 /* find the page to write to */
434434 buf->cur = head / PAGE_SIZE;