forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
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;