hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
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;