diff options
| author | Saman Sahebi <saman63@cs.unc.edu> | 2023-07-20 14:12:51 -0400 |
|---|---|---|
| committer | Joshua Bakita <bakitajoshua@gmail.com> | 2023-10-29 15:45:32 -0400 |
| commit | 22ce117a72c557e01950fd97e1380a4d0658ea43 (patch) | |
| tree | 4844f465a073f7633eab9d0870175f30f64728fe | |
| parent | 923fdb37c54598391b54355de0fcd6ac35e5a221 (diff) | |
Updated for loop formatting and fixed a casting error
| -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 |
