habanalabs: Simplify bool conversion
PATCH 1/1 habanalabs: Simplify bool conversion
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 <[email protected]>
--- drivers/misc/habanalabs/gaudi2/gaudi2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/habanalabs/gaudi2/gaudi2.c +1 -1
@@ -9724,7 +9724,7 @@ static int gaudi2_get_mmu_base(struct hl_device *hdev, u64 mmu_id, u32 *mmu_basestatic 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;
Signature · 1 line
2.20.1.7.g153144c
Quoted 24 lines · Yang Li
Fix the following coccicheck warning:
./drivers/misc/habanalabs/gaudi2/gaudi2.c:9727:48-53: WARNING:
conversion to bool not needed hereSigned-off-by Yang Li <[email protected]>--- drivers/misc/habanalabs/gaudi2/gaudi2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/misc/habanalabs/gaudi2/gaudi2.c +1
-2@@ -9724,7 +9724,7 @@ static int gaudi2_get_mmu_base(struct hl_device *hdev, u64 mmu_id, u32 *mmu_basestatic 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; --
Quoted 2 lines
2.20.1.7.g153144c
This patch is:
Reviewed-by Oded Gabbay <[email protected]>
Applied to -next.
Thanks,
Oded