All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next 2/2] drm/amdkfd: Return true/false (not 1/0) from bool functions
@ 2022-05-05 23:23 ` Yang Li
  0 siblings, 0 replies; 10+ messages in thread
From: Yang Li @ 2022-05-05 23:23 UTC (permalink / raw)
  To: alexander.deucher
  Cc: christian.koenig, Xinhui.Pan, airlied, daniel, Felix.Kuehling,
	amd-gfx, dri-devel, linux-kernel, Yang Li, Abaci Robot

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>
---
 drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c b/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c
index c3919aaa76e6..1431f0961769 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c
@@ -241,14 +241,14 @@ static bool event_interrupt_isr_v11(struct kfd_dev *dev,
 	if (/*!KFD_IRQ_IS_FENCE(client_id, source_id) &&*/
 	    (vmid < dev->vm_info.first_vmid_kfd ||
 	    vmid > dev->vm_info.last_vmid_kfd))
-		return 0;
+		return false;
 
 	pasid = SOC15_PASID_FROM_IH_ENTRY(ih_ring_entry);
 	context_id0 = SOC15_CONTEXT_ID0_FROM_IH_ENTRY(ih_ring_entry);
 
 	if ((source_id == SOC15_INTSRC_CP_END_OF_PIPE) &&
 	    (context_id0 & AMDGPU_FENCE_MES_QUEUE_FLAG))
-		return 0;
+		return false;
 
 	pr_debug("client id 0x%x, source id %d, vmid %d, pasid 0x%x. raw data:\n",
 		 client_id, source_id, vmid, pasid);
@@ -258,7 +258,7 @@ static bool event_interrupt_isr_v11(struct kfd_dev *dev,
 
 	/* If there is no valid PASID, it's likely a bug */
 	if (WARN_ONCE(pasid == 0, "Bug: No PASID in KFD interrupt"))
-		return 0;
+		return false;
 
 	/* Interrupt types we care about: various signals and faults.
 	 * They will be forwarded to a work queue (see below).
-- 
2.20.1.7.g153144c


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH -next 2/2] drm/amdkfd: Return true/false (not 1/0) from bool functions
@ 2022-05-05 23:23 ` Yang Li
  0 siblings, 0 replies; 10+ messages in thread
From: Yang Li @ 2022-05-05 23:23 UTC (permalink / raw)
  To: alexander.deucher
  Cc: airlied, Felix.Kuehling, Xinhui.Pan, Abaci Robot, linux-kernel,
	amd-gfx, Yang Li, dri-devel, christian.koenig

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>
---
 drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c b/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c
index c3919aaa76e6..1431f0961769 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c
@@ -241,14 +241,14 @@ static bool event_interrupt_isr_v11(struct kfd_dev *dev,
 	if (/*!KFD_IRQ_IS_FENCE(client_id, source_id) &&*/
 	    (vmid < dev->vm_info.first_vmid_kfd ||
 	    vmid > dev->vm_info.last_vmid_kfd))
-		return 0;
+		return false;
 
 	pasid = SOC15_PASID_FROM_IH_ENTRY(ih_ring_entry);
 	context_id0 = SOC15_CONTEXT_ID0_FROM_IH_ENTRY(ih_ring_entry);
 
 	if ((source_id == SOC15_INTSRC_CP_END_OF_PIPE) &&
 	    (context_id0 & AMDGPU_FENCE_MES_QUEUE_FLAG))
-		return 0;
+		return false;
 
 	pr_debug("client id 0x%x, source id %d, vmid %d, pasid 0x%x. raw data:\n",
 		 client_id, source_id, vmid, pasid);
@@ -258,7 +258,7 @@ static bool event_interrupt_isr_v11(struct kfd_dev *dev,
 
 	/* If there is no valid PASID, it's likely a bug */
 	if (WARN_ONCE(pasid == 0, "Bug: No PASID in KFD interrupt"))
-		return 0;
+		return false;
 
 	/* Interrupt types we care about: various signals and faults.
 	 * They will be forwarded to a work queue (see below).
-- 
2.20.1.7.g153144c


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH -next 2/2] drm/amdkfd: Return true/false (not 1/0) from bool functions
@ 2022-05-05 23:23 ` Yang Li
  0 siblings, 0 replies; 10+ messages in thread
From: Yang Li @ 2022-05-05 23:23 UTC (permalink / raw)
  To: alexander.deucher
  Cc: airlied, Felix.Kuehling, Xinhui.Pan, Abaci Robot, linux-kernel,
	amd-gfx, Yang Li, dri-devel, daniel, christian.koenig

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>
---
 drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c b/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c
index c3919aaa76e6..1431f0961769 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c
@@ -241,14 +241,14 @@ static bool event_interrupt_isr_v11(struct kfd_dev *dev,
 	if (/*!KFD_IRQ_IS_FENCE(client_id, source_id) &&*/
 	    (vmid < dev->vm_info.first_vmid_kfd ||
 	    vmid > dev->vm_info.last_vmid_kfd))
-		return 0;
+		return false;
 
 	pasid = SOC15_PASID_FROM_IH_ENTRY(ih_ring_entry);
 	context_id0 = SOC15_CONTEXT_ID0_FROM_IH_ENTRY(ih_ring_entry);
 
 	if ((source_id == SOC15_INTSRC_CP_END_OF_PIPE) &&
 	    (context_id0 & AMDGPU_FENCE_MES_QUEUE_FLAG))
-		return 0;
+		return false;
 
 	pr_debug("client id 0x%x, source id %d, vmid %d, pasid 0x%x. raw data:\n",
 		 client_id, source_id, vmid, pasid);
@@ -258,7 +258,7 @@ static bool event_interrupt_isr_v11(struct kfd_dev *dev,
 
 	/* If there is no valid PASID, it's likely a bug */
 	if (WARN_ONCE(pasid == 0, "Bug: No PASID in KFD interrupt"))
-		return 0;
+		return false;
 
 	/* Interrupt types we care about: various signals and faults.
 	 * They will be forwarded to a work queue (see below).
-- 
2.20.1.7.g153144c


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH -next 1/2] drm/amdgpu/gfx11: remove unneeded semicolon
  2022-05-05 23:23 ` Yang Li
  (?)
@ 2022-05-05 23:23   ` Yang Li
  -1 siblings, 0 replies; 10+ messages in thread
From: Yang Li @ 2022-05-05 23:23 UTC (permalink / raw)
  To: alexander.deucher
  Cc: christian.koenig, Xinhui.Pan, airlied, daniel, Felix.Kuehling,
	amd-gfx, dri-devel, linux-kernel, Yang Li, Abaci Robot

Eliminate the following coccicheck warning:
./drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c:1222:2-3: Unneeded semicolon

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
index 184bf554acca..d2ab325e40b4 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
@@ -1219,7 +1219,7 @@ static void gfx_v11_0_parse_rlc_toc(struct amdgpu_device *adev, void *rlc_toc)
 		rlc_autoload_info[ucode->id].size = ucode->size * 4;
 
 		ucode++;
-	};
+	}
 }
 
 static uint32_t gfx_v11_0_calc_toc_total_size(struct amdgpu_device *adev)
-- 
2.20.1.7.g153144c


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH -next 1/2] drm/amdgpu/gfx11: remove unneeded semicolon
@ 2022-05-05 23:23   ` Yang Li
  0 siblings, 0 replies; 10+ messages in thread
From: Yang Li @ 2022-05-05 23:23 UTC (permalink / raw)
  To: alexander.deucher
  Cc: airlied, Felix.Kuehling, Xinhui.Pan, Abaci Robot, linux-kernel,
	amd-gfx, Yang Li, dri-devel, christian.koenig

Eliminate the following coccicheck warning:
./drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c:1222:2-3: Unneeded semicolon

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
index 184bf554acca..d2ab325e40b4 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
@@ -1219,7 +1219,7 @@ static void gfx_v11_0_parse_rlc_toc(struct amdgpu_device *adev, void *rlc_toc)
 		rlc_autoload_info[ucode->id].size = ucode->size * 4;
 
 		ucode++;
-	};
+	}
 }
 
 static uint32_t gfx_v11_0_calc_toc_total_size(struct amdgpu_device *adev)
-- 
2.20.1.7.g153144c


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH -next 1/2] drm/amdgpu/gfx11: remove unneeded semicolon
@ 2022-05-05 23:23   ` Yang Li
  0 siblings, 0 replies; 10+ messages in thread
From: Yang Li @ 2022-05-05 23:23 UTC (permalink / raw)
  To: alexander.deucher
  Cc: airlied, Felix.Kuehling, Xinhui.Pan, Abaci Robot, linux-kernel,
	amd-gfx, Yang Li, dri-devel, daniel, christian.koenig

Eliminate the following coccicheck warning:
./drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c:1222:2-3: Unneeded semicolon

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
index 184bf554acca..d2ab325e40b4 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
@@ -1219,7 +1219,7 @@ static void gfx_v11_0_parse_rlc_toc(struct amdgpu_device *adev, void *rlc_toc)
 		rlc_autoload_info[ucode->id].size = ucode->size * 4;
 
 		ucode++;
-	};
+	}
 }
 
 static uint32_t gfx_v11_0_calc_toc_total_size(struct amdgpu_device *adev)
-- 
2.20.1.7.g153144c


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH -next 2/2] drm/amdkfd: Return true/false (not 1/0) from bool functions
  2022-05-05 23:23 ` Yang Li
@ 2022-05-06 16:04   ` Alex Deucher
  -1 siblings, 0 replies; 10+ messages in thread
From: Alex Deucher @ 2022-05-06 16:04 UTC (permalink / raw)
  To: Yang Li
  Cc: Dave Airlie, Kuehling, Felix, xinhui pan, Abaci Robot, LKML,
	amd-gfx list, Maling list - DRI developers, Deucher, Alexander,
	Christian Koenig

Series is:
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

On Thu, May 5, 2022 at 7:28 PM Yang Li <yang.lee@linux.alibaba.com> wrote:
>
> 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>
> ---
>  drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c b/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c
> index c3919aaa76e6..1431f0961769 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c
> @@ -241,14 +241,14 @@ static bool event_interrupt_isr_v11(struct kfd_dev *dev,
>         if (/*!KFD_IRQ_IS_FENCE(client_id, source_id) &&*/
>             (vmid < dev->vm_info.first_vmid_kfd ||
>             vmid > dev->vm_info.last_vmid_kfd))
> -               return 0;
> +               return false;
>
>         pasid = SOC15_PASID_FROM_IH_ENTRY(ih_ring_entry);
>         context_id0 = SOC15_CONTEXT_ID0_FROM_IH_ENTRY(ih_ring_entry);
>
>         if ((source_id == SOC15_INTSRC_CP_END_OF_PIPE) &&
>             (context_id0 & AMDGPU_FENCE_MES_QUEUE_FLAG))
> -               return 0;
> +               return false;
>
>         pr_debug("client id 0x%x, source id %d, vmid %d, pasid 0x%x. raw data:\n",
>                  client_id, source_id, vmid, pasid);
> @@ -258,7 +258,7 @@ static bool event_interrupt_isr_v11(struct kfd_dev *dev,
>
>         /* If there is no valid PASID, it's likely a bug */
>         if (WARN_ONCE(pasid == 0, "Bug: No PASID in KFD interrupt"))
> -               return 0;
> +               return false;
>
>         /* Interrupt types we care about: various signals and faults.
>          * They will be forwarded to a work queue (see below).
> --
> 2.20.1.7.g153144c
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH -next 2/2] drm/amdkfd: Return true/false (not 1/0) from bool functions
@ 2022-05-06 16:04   ` Alex Deucher
  0 siblings, 0 replies; 10+ messages in thread
From: Alex Deucher @ 2022-05-06 16:04 UTC (permalink / raw)
  To: Yang Li
  Cc: Deucher, Alexander, Dave Airlie, Kuehling, Felix, xinhui pan,
	Abaci Robot, LKML, amd-gfx list, Maling list - DRI developers,
	Christian Koenig

Series is:
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

On Thu, May 5, 2022 at 7:28 PM Yang Li <yang.lee@linux.alibaba.com> wrote:
>
> 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>
> ---
>  drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c b/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c
> index c3919aaa76e6..1431f0961769 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c
> @@ -241,14 +241,14 @@ static bool event_interrupt_isr_v11(struct kfd_dev *dev,
>         if (/*!KFD_IRQ_IS_FENCE(client_id, source_id) &&*/
>             (vmid < dev->vm_info.first_vmid_kfd ||
>             vmid > dev->vm_info.last_vmid_kfd))
> -               return 0;
> +               return false;
>
>         pasid = SOC15_PASID_FROM_IH_ENTRY(ih_ring_entry);
>         context_id0 = SOC15_CONTEXT_ID0_FROM_IH_ENTRY(ih_ring_entry);
>
>         if ((source_id == SOC15_INTSRC_CP_END_OF_PIPE) &&
>             (context_id0 & AMDGPU_FENCE_MES_QUEUE_FLAG))
> -               return 0;
> +               return false;
>
>         pr_debug("client id 0x%x, source id %d, vmid %d, pasid 0x%x. raw data:\n",
>                  client_id, source_id, vmid, pasid);
> @@ -258,7 +258,7 @@ static bool event_interrupt_isr_v11(struct kfd_dev *dev,
>
>         /* If there is no valid PASID, it's likely a bug */
>         if (WARN_ONCE(pasid == 0, "Bug: No PASID in KFD interrupt"))
> -               return 0;
> +               return false;
>
>         /* Interrupt types we care about: various signals and faults.
>          * They will be forwarded to a work queue (see below).
> --
> 2.20.1.7.g153144c
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH -next 2/2] drm/amdkfd: Return true/false (not 1/0) from bool functions
  2022-05-06 16:04   ` Alex Deucher
@ 2022-05-06 16:04     ` Alex Deucher
  -1 siblings, 0 replies; 10+ messages in thread
From: Alex Deucher @ 2022-05-06 16:04 UTC (permalink / raw)
  To: Yang Li
  Cc: Dave Airlie, Kuehling, Felix, xinhui pan, Abaci Robot, LKML,
	amd-gfx list, Maling list - DRI developers, Deucher, Alexander,
	Christian Koenig

Applied.  Thanks!

On Fri, May 6, 2022 at 12:04 PM Alex Deucher <alexdeucher@gmail.com> wrote:
>
> Series is:
> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
>
> On Thu, May 5, 2022 at 7:28 PM Yang Li <yang.lee@linux.alibaba.com> wrote:
> >
> > 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>
> > ---
> >  drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c b/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c
> > index c3919aaa76e6..1431f0961769 100644
> > --- a/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c
> > +++ b/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c
> > @@ -241,14 +241,14 @@ static bool event_interrupt_isr_v11(struct kfd_dev *dev,
> >         if (/*!KFD_IRQ_IS_FENCE(client_id, source_id) &&*/
> >             (vmid < dev->vm_info.first_vmid_kfd ||
> >             vmid > dev->vm_info.last_vmid_kfd))
> > -               return 0;
> > +               return false;
> >
> >         pasid = SOC15_PASID_FROM_IH_ENTRY(ih_ring_entry);
> >         context_id0 = SOC15_CONTEXT_ID0_FROM_IH_ENTRY(ih_ring_entry);
> >
> >         if ((source_id == SOC15_INTSRC_CP_END_OF_PIPE) &&
> >             (context_id0 & AMDGPU_FENCE_MES_QUEUE_FLAG))
> > -               return 0;
> > +               return false;
> >
> >         pr_debug("client id 0x%x, source id %d, vmid %d, pasid 0x%x. raw data:\n",
> >                  client_id, source_id, vmid, pasid);
> > @@ -258,7 +258,7 @@ static bool event_interrupt_isr_v11(struct kfd_dev *dev,
> >
> >         /* If there is no valid PASID, it's likely a bug */
> >         if (WARN_ONCE(pasid == 0, "Bug: No PASID in KFD interrupt"))
> > -               return 0;
> > +               return false;
> >
> >         /* Interrupt types we care about: various signals and faults.
> >          * They will be forwarded to a work queue (see below).
> > --
> > 2.20.1.7.g153144c
> >

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH -next 2/2] drm/amdkfd: Return true/false (not 1/0) from bool functions
@ 2022-05-06 16:04     ` Alex Deucher
  0 siblings, 0 replies; 10+ messages in thread
From: Alex Deucher @ 2022-05-06 16:04 UTC (permalink / raw)
  To: Yang Li
  Cc: Deucher, Alexander, Dave Airlie, Kuehling, Felix, xinhui pan,
	Abaci Robot, LKML, amd-gfx list, Maling list - DRI developers,
	Christian Koenig

Applied.  Thanks!

On Fri, May 6, 2022 at 12:04 PM Alex Deucher <alexdeucher@gmail.com> wrote:
>
> Series is:
> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
>
> On Thu, May 5, 2022 at 7:28 PM Yang Li <yang.lee@linux.alibaba.com> wrote:
> >
> > 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>
> > ---
> >  drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c b/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c
> > index c3919aaa76e6..1431f0961769 100644
> > --- a/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c
> > +++ b/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c
> > @@ -241,14 +241,14 @@ static bool event_interrupt_isr_v11(struct kfd_dev *dev,
> >         if (/*!KFD_IRQ_IS_FENCE(client_id, source_id) &&*/
> >             (vmid < dev->vm_info.first_vmid_kfd ||
> >             vmid > dev->vm_info.last_vmid_kfd))
> > -               return 0;
> > +               return false;
> >
> >         pasid = SOC15_PASID_FROM_IH_ENTRY(ih_ring_entry);
> >         context_id0 = SOC15_CONTEXT_ID0_FROM_IH_ENTRY(ih_ring_entry);
> >
> >         if ((source_id == SOC15_INTSRC_CP_END_OF_PIPE) &&
> >             (context_id0 & AMDGPU_FENCE_MES_QUEUE_FLAG))
> > -               return 0;
> > +               return false;
> >
> >         pr_debug("client id 0x%x, source id %d, vmid %d, pasid 0x%x. raw data:\n",
> >                  client_id, source_id, vmid, pasid);
> > @@ -258,7 +258,7 @@ static bool event_interrupt_isr_v11(struct kfd_dev *dev,
> >
> >         /* If there is no valid PASID, it's likely a bug */
> >         if (WARN_ONCE(pasid == 0, "Bug: No PASID in KFD interrupt"))
> > -               return 0;
> > +               return false;
> >
> >         /* Interrupt types we care about: various signals and faults.
> >          * They will be forwarded to a work queue (see below).
> > --
> > 2.20.1.7.g153144c
> >

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-05-06 16:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-05 23:23 [PATCH -next 2/2] drm/amdkfd: Return true/false (not 1/0) from bool functions Yang Li
2022-05-05 23:23 ` Yang Li
2022-05-05 23:23 ` Yang Li
2022-05-05 23:23 ` [PATCH -next 1/2] drm/amdgpu/gfx11: remove unneeded semicolon Yang Li
2022-05-05 23:23   ` Yang Li
2022-05-05 23:23   ` Yang Li
2022-05-06 16:04 ` [PATCH -next 2/2] drm/amdkfd: Return true/false (not 1/0) from bool functions Alex Deucher
2022-05-06 16:04   ` Alex Deucher
2022-05-06 16:04   ` Alex Deucher
2022-05-06 16:04     ` Alex Deucher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.