LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] scsi: ufs: ufshpb: Remove redundant initialization of variable lba
@ 2021-08-04 13:32 Colin King
2021-08-10 3:43 ` Martin K. Petersen
2021-08-17 3:17 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2021-08-04 13:32 UTC (permalink / raw)
To: Alim Akhtar, Avri Altman, James E . J . Bottomley,
Martin K . Petersen, Can Guo, linux-scsi
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The variable lba is being initialized with a value that is never
read, it is being updated later on. The assignment is redundant and
can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/scsi/ufs/ufshcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 40d371f6e147..e3cd033b6885 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -371,7 +371,7 @@ static void ufshcd_add_uic_command_trace(struct ufs_hba *hba,
static void ufshcd_add_command_trace(struct ufs_hba *hba, unsigned int tag,
enum ufs_trace_str_t str_t)
{
- u64 lba = -1;
+ u64 lba;
u8 opcode = 0, group_id = 0;
u32 intr, doorbell;
struct ufshcd_lrb *lrbp = &hba->lrb[tag];
--
2.31.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: ufs: ufshpb: Remove redundant initialization of variable lba
2021-08-04 13:32 [PATCH] scsi: ufs: ufshpb: Remove redundant initialization of variable lba Colin King
@ 2021-08-10 3:43 ` Martin K. Petersen
2021-08-17 3:17 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2021-08-10 3:43 UTC (permalink / raw)
To: Colin King
Cc: Alim Akhtar, Avri Altman, James E . J . Bottomley,
Martin K . Petersen, Can Guo, linux-scsi, kernel-janitors,
linux-kernel
Colin,
> The variable lba is being initialized with a value that is never read,
> it is being updated later on. The assignment is redundant and can be
> removed.
Applied to 5.15/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: ufs: ufshpb: Remove redundant initialization of variable lba
2021-08-04 13:32 [PATCH] scsi: ufs: ufshpb: Remove redundant initialization of variable lba Colin King
2021-08-10 3:43 ` Martin K. Petersen
@ 2021-08-17 3:17 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2021-08-17 3:17 UTC (permalink / raw)
To: Avri Altman, linux-scsi, Colin King, James E . J . Bottomley,
Alim Akhtar, Can Guo
Cc: Martin K . Petersen, kernel-janitors, linux-kernel
On Wed, 4 Aug 2021 14:32:41 +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable lba is being initialized with a value that is never
> read, it is being updated later on. The assignment is redundant and
> can be removed.
>
>
> [...]
Applied to 5.15/scsi-queue, thanks!
[1/1] scsi: ufs: ufshpb: Remove redundant initialization of variable lba
https://git.kernel.org/mkp/scsi/c/102851fc9a0d
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-17 3:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-04 13:32 [PATCH] scsi: ufs: ufshpb: Remove redundant initialization of variable lba Colin King
2021-08-10 3:43 ` Martin K. Petersen
2021-08-17 3:17 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).