public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] habanalabs: Simplify bool conversion
@ 2022-07-14  1:29 Yang Li
  2022-07-14  6:54 ` Oded Gabbay
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Li @ 2022-07-14  1:29 UTC (permalink / raw)
  To: ogabbay; +Cc: arnd, gregkh, linux-kernel, Yang Li

Fix the following coccicheck warning:
./drivers/misc/habanalabs/gaudi2/gaudi2.c:9727:48-53: WARNING:
conversion to bool not needed here

Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 drivers/misc/habanalabs/gaudi2/gaudi2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/misc/habanalabs/gaudi2/gaudi2.c b/drivers/misc/habanalabs/gaudi2/gaudi2.c
index 98336a1a84b0..344b4dedef41 100644
--- a/drivers/misc/habanalabs/gaudi2/gaudi2.c
+++ b/drivers/misc/habanalabs/gaudi2/gaudi2.c
@@ -9724,7 +9724,7 @@ static int gaudi2_get_mmu_base(struct hl_device *hdev, u64 mmu_id, u32 *mmu_base
 
 static void gaudi2_ack_mmu_error(struct hl_device *hdev, u64 mmu_id)
 {
-	bool is_pmmu = (mmu_id == HW_CAP_PMMU ? true : false);
+	bool is_pmmu = (mmu_id == HW_CAP_PMMU);
 	struct gaudi2_device *gaudi2 = hdev->asic_specific;
 	u32 mmu_base;
 
-- 
2.20.1.7.g153144c


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

* Re: [PATCH -next] habanalabs: Simplify bool conversion
  2022-07-14  1:29 [PATCH -next] habanalabs: Simplify bool conversion Yang Li
@ 2022-07-14  6:54 ` Oded Gabbay
  0 siblings, 0 replies; 2+ messages in thread
From: Oded Gabbay @ 2022-07-14  6:54 UTC (permalink / raw)
  To: Yang Li; +Cc: Arnd Bergmann, Greg Kroah-Hartman, Linux-Kernel@Vger. Kernel. Org

On Thu, Jul 14, 2022 at 4:29 AM Yang Li <yang.lee@linux.alibaba.com> wrote:
>
> Fix the following coccicheck warning:
> ./drivers/misc/habanalabs/gaudi2/gaudi2.c:9727:48-53: WARNING:
> conversion to bool not needed here
>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
> ---
>  drivers/misc/habanalabs/gaudi2/gaudi2.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/misc/habanalabs/gaudi2/gaudi2.c b/drivers/misc/habanalabs/gaudi2/gaudi2.c
> index 98336a1a84b0..344b4dedef41 100644
> --- a/drivers/misc/habanalabs/gaudi2/gaudi2.c
> +++ b/drivers/misc/habanalabs/gaudi2/gaudi2.c
> @@ -9724,7 +9724,7 @@ static int gaudi2_get_mmu_base(struct hl_device *hdev, u64 mmu_id, u32 *mmu_base
>
>  static void gaudi2_ack_mmu_error(struct hl_device *hdev, u64 mmu_id)
>  {
> -       bool is_pmmu = (mmu_id == HW_CAP_PMMU ? true : false);
> +       bool is_pmmu = (mmu_id == HW_CAP_PMMU);
>         struct gaudi2_device *gaudi2 = hdev->asic_specific;
>         u32 mmu_base;
>
> --
> 2.20.1.7.g153144c
>
This patch is:
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>

Applied to -next.
Thanks,
Oded

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

end of thread, other threads:[~2022-07-14  6:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-14  1:29 [PATCH -next] habanalabs: Simplify bool conversion Yang Li
2022-07-14  6:54 ` Oded Gabbay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox