[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20231009151016.154039-1-artem.chernyshev@red-soft.ru>
Date: Mon, 9 Oct 2023 18:10:16 +0300
From: Artem Chernyshev <artem.chernyshev@...-soft.ru>
To: "James E . J . Bottomley" <jejb@...ux.ibm.com>,
Kashyap Desai <kashyap.desai@...adcom.com>
Cc: Artem Chernyshev <artem.chernyshev@...-soft.ru>,
Sumit Saxena <sumit.saxena@...adcom.com>,
Shivasharan S <shivasharan.srikanteshwara@...adcom.com>,
"Martin K . Petersen" <martin.petersen@...cle.com>,
megaraidlinux.pdl@...adcom.com, linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org, lvc-project@...uxtesting.org
Subject: [PATCH] scsi: megaraid: megaraid_sas: Remove unnecessary checks
Since divisor checked before function call this if-statement
is never true
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Signed-off-by: Artem Chernyshev <artem.chernyshev@...-soft.ru>
---
drivers/scsi/megaraid/megaraid_sas_fp.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/scsi/megaraid/megaraid_sas_fp.c b/drivers/scsi/megaraid/megaraid_sas_fp.c
index b8b388a4e28f..4cfa98ce3923 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fp.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fp.c
@@ -72,8 +72,6 @@ u32 mega_mod64(u64 dividend, u32 divisor)
u64 d;
u32 remainder;
- if (!divisor)
- printk(KERN_ERR "megasas : DIVISOR is zero, in div fn\n");
d = dividend;
remainder = do_div(d, divisor);
return remainder;
@@ -90,9 +88,6 @@ static u64 mega_div64_32(uint64_t dividend, uint32_t divisor)
{
u64 d = dividend;
- if (!divisor)
- printk(KERN_ERR "megasas : DIVISOR is zero in mod fn\n");
-
do_div(d, divisor);
return d;
--
2.37.3
Powered by blists - more mailing lists