diff options
Diffstat (limited to 'nvdebug_entry.c')
-rw-r--r-- | nvdebug_entry.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nvdebug_entry.c b/nvdebug_entry.c index 84e8a6a..e77b053 100644 --- a/nvdebug_entry.c +++ b/nvdebug_entry.c | |||
@@ -267,14 +267,15 @@ int __init nvdebug_init(void) { | |||
267 | u32 num_pce = U32(hweight32(ce_pce_map)); | 267 | u32 num_pce = U32(hweight32(ce_pce_map)); |
268 | u32 disabled_pce_mask = ~ce_pce_map; | 268 | u32 disabled_pce_mask = ~ce_pce_map; |
269 | char file_name[20]; | 269 | char file_name[20]; |
270 | for (int pce_id = 0; pce_id < num_pce; pce_id++){ | 270 | int pce_id; |
271 | for (pce_id = 0; pce_id < num_pce; pce_id++){ | ||
271 | //if pce is disabled, do nothing | 272 | //if pce is disabled, do nothing |
272 | if ((1 << pce_id) & disabled_pce_mask) | 273 | if ((1 << pce_id) & disabled_pce_mask) |
273 | continue; | 274 | continue; |
274 | snprintf(file_name, 20, "lce_for_pce%d",pce_id); | 275 | snprintf(file_name, 20, "lce_for_pce%d",pce_id); |
275 | lce_for_pce_entry = proc_create_data( | 276 | lce_for_pce_entry = proc_create_data( |
276 | file_name, 0444, dir, compat_ops(&nvdebug_read_reg32_file_ops), | 277 | file_name, 0444, dir, compat_ops(&nvdebug_read_reg32_file_ops), |
277 | (void*)NV_LCE_FOR_PCE(pce_id)); | 278 | (void*)(uintptr_t)NV_LCE_FOR_PCE(pce_id)); |
278 | } | 279 | } |
279 | 280 | ||
280 | // TODO: Redo to num_pces | 281 | // TODO: Redo to num_pces |