With char becoming unsigned by default, and with `char` alone being ambiguous and based on architecture, signed chars need to be marked explicitly as such. This fixes warnings like: drivers/misc/sgi-gru/grumain.c:711 gru_check_chiplet_assignment() warn: 'gts->ts_user_chiplet_id' is unsigned
Unified · Split
| @@ -152,7 +152,7 @@ static int gru_assign_asid(struct gru_state *gru) · 151 unmodified lines | ||
| 152 | 152 | * Optionally, build an array of chars that contain the bit numbers allocated. |
| 153 | 153 | */ |
| 154 | 154 | static unsigned long reserve_resources(unsigned long *p, int n, int mmax, |
| 155 | − char *idx) | |
| 155 | + signed char *idx) | |
| 156 | 156 | { |
| 157 | 157 | unsigned long bits = 0; |
| 158 | 158 | int i; |
| @@ -170,14 +170,14 @@ static unsigned long reserve_resources(unsigned long *p, int n, int mmax, · 11 unmodified lines | ||
| 170 | 170 | } |
| 171 | 171 | |
| 172 | 172 | unsigned long gru_reserve_cb_resources(struct gru_state *gru, int cbr_au_count, |
| 173 | − char *cbmap) | |
| 173 | + signed char *cbmap) | |
| 174 | 174 | { |
| 175 | 175 | return reserve_resources(&gru->gs_cbr_map, cbr_au_count, GRU_CBR_AU, |
| 176 | 176 | cbmap); |
| 177 | 177 | } |
| 178 | 178 | |
| 179 | 179 | unsigned long gru_reserve_ds_resources(struct gru_state *gru, int dsr_au_count, |
| 180 | − char *dsmap) | |
| 180 | + signed char *dsmap) | |
| 181 | 181 | { |
| 182 | 182 | return reserve_resources(&gru->gs_dsr_map, dsr_au_count, GRU_DSR_AU, |
| 183 | 183 | dsmap); |
| @@ -351,7 +351,7 @@ struct gru_thread_state { · 350 unmodified lines | ||
| 351 | 351 | pid_t ts_tgid_owner; /* task that is using the |
| 352 | 352 | context - for migration */ |
| 353 | 353 | short ts_user_blade_id;/* user selected blade */ |
| 354 | − char ts_user_chiplet_id;/* user selected chiplet */ | |
| 354 | + signed char ts_user_chiplet_id;/* user selected chiplet */ | |
| 355 | 355 | unsigned short ts_sizeavail; /* Pagesizes in use */ |
| 356 | 356 | int ts_tsid; /* thread that owns the |
| 357 | 357 | structure */ |
| @@ -364,11 +364,11 @@ struct gru_thread_state { · 6 unmodified lines | ||
| 364 | 364 | required for contest */ |
| 365 | 365 | unsigned char ts_cbr_au_count;/* Number of CBR resources |
| 366 | 366 | required for contest */ |
| 367 | − char ts_cch_req_slice;/* CCH packet slice */ | |
| 368 | − char ts_blade; /* If >= 0, migrate context if | |
| 367 | + signed char ts_cch_req_slice;/* CCH packet slice */ | |
| 368 | + signed char ts_blade; /* If >= 0, migrate context if | |
| 369 | 369 | ref from different blade */ |
| 370 | − char ts_force_cch_reload; | |
| 371 | − char ts_cbr_idx[GRU_CBR_AU];/* CBR numbers of each | |
| 370 | + signed char ts_force_cch_reload; | |
| 371 | + signed char ts_cbr_idx[GRU_CBR_AU];/* CBR numbers of each | |
| 372 | 372 | allocated CB */ |
| 373 | 373 | int ts_data_valid; /* Indicates if ts_gdata has |
| 374 | 374 | valid data */ |
| @@ -643,9 +643,9 @@ extern struct gru_thread_state *gru_alloc_gts(struct vm_area_struct *vma, · 268 unmodified lines | ||
| 643 | 643 | int cbr_au_count, int dsr_au_count, |
| 644 | 644 | unsigned char tlb_preload_count, int options, int tsid); |
| 645 | 645 | extern unsigned long gru_reserve_cb_resources(struct gru_state *gru, |
| 646 | − int cbr_au_count, char *cbmap); | |
| 646 | + int cbr_au_count, signed char *cbmap); | |
| 647 | 647 | extern unsigned long gru_reserve_ds_resources(struct gru_state *gru, |
| 648 | − int dsr_au_count, char *dsmap); | |
| 648 | + int dsr_au_count, signed char *dsmap); | |
| 649 | 649 | extern vm_fault_t gru_fault(struct vm_fault *vmf); |
| 650 | 650 | extern struct gru_mm_struct *gru_register_mmu_notifier(void); |
| 651 | 651 | extern void gru_drop_mmu_notifier(struct gru_mm_struct *gms); |