Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdkfd: Return true/false (not 1/0) from bool functions

Return boolean values ("true" or "false") instead of 1 or 0 from bool
functions. This fixes the following warnings from coccicheck:

./drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c:244:9-10: WARNING:
return of 0/1 in function 'event_interrupt_isr_v11' with return type
bool

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Yang Li and committed by
Alex Deucher
594a1d0f 1e51dbad

+3 -3
+3 -3
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c
··· 241 241 if (/*!KFD_IRQ_IS_FENCE(client_id, source_id) &&*/ 242 242 (vmid < dev->vm_info.first_vmid_kfd || 243 243 vmid > dev->vm_info.last_vmid_kfd)) 244 - return 0; 244 + return false; 245 245 246 246 pasid = SOC15_PASID_FROM_IH_ENTRY(ih_ring_entry); 247 247 context_id0 = SOC15_CONTEXT_ID0_FROM_IH_ENTRY(ih_ring_entry); 248 248 249 249 if ((source_id == SOC15_INTSRC_CP_END_OF_PIPE) && 250 250 (context_id0 & AMDGPU_FENCE_MES_QUEUE_FLAG)) 251 - return 0; 251 + return false; 252 252 253 253 pr_debug("client id 0x%x, source id %d, vmid %d, pasid 0x%x. raw data:\n", 254 254 client_id, source_id, vmid, pasid); ··· 258 258 259 259 /* If there is no valid PASID, it's likely a bug */ 260 260 if (WARN_ONCE(pasid == 0, "Bug: No PASID in KFD interrupt")) 261 - return 0; 261 + return false; 262 262 263 263 /* Interrupt types we care about: various signals and faults. 264 264 * They will be forwarded to a work queue (see below).