From 22ce117a72c557e01950fd97e1380a4d0658ea43 Mon Sep 17 00:00:00 2001 From: Saman Sahebi Date: Thu, 20 Jul 2023 14:12:51 -0400 Subject: Updated for loop formatting and fixed a casting error --- nvdebug_entry.c | 5 +++-- 1 file 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) { u32 num_pce = U32(hweight32(ce_pce_map)); u32 disabled_pce_mask = ~ce_pce_map; char file_name[20]; - for (int pce_id = 0; pce_id < num_pce; pce_id++){ + int pce_id; + for (pce_id = 0; pce_id < num_pce; pce_id++){ //if pce is disabled, do nothing if ((1 << pce_id) & disabled_pce_mask) continue; snprintf(file_name, 20, "lce_for_pce%d",pce_id); lce_for_pce_entry = proc_create_data( file_name, 0444, dir, compat_ops(&nvdebug_read_reg32_file_ops), - (void*)NV_LCE_FOR_PCE(pce_id)); + (void*)(uintptr_t)NV_LCE_FOR_PCE(pce_id)); } // TODO: Redo to num_pces -- cgit v1.2.2