diff mbox series

ide: remove duplicated assignment to 'cursg'

Message ID 20180116175422.19722-1-colin.king@canonical.com
State Accepted
Delegated to: David Miller
Headers show
Series ide: remove duplicated assignment to 'cursg' | expand

Commit Message

Colin Ian King Jan. 16, 2018, 5:54 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Pointer cursg is initialized to cmd->cursg and again re-assigned the
same value a few lines later, hence the second assignment is redundant
and can be removed.

Cleans up clang warning:
drivers/ide/ide-taskfile.c:229:22: warning: Value stored to 'cursg'
during its initialization is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/ide/ide-taskfile.c | 1 -
 1 file changed, 1 deletion(-)

Comments

David Miller Jan. 29, 2018, 7:39 p.m. UTC | #1
From: Colin King <colin.king@canonical.com>
Date: Tue, 16 Jan 2018 17:54:22 +0000

> From: Colin Ian King <colin.king@canonical.com>
> 
> Pointer cursg is initialized to cmd->cursg and again re-assigned the
> same value a few lines later, hence the second assignment is redundant
> and can be removed.
> 
> Cleans up clang warning:
> drivers/ide/ide-taskfile.c:229:22: warning: Value stored to 'cursg'
> during its initialization is never read
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Patch applied, thanks Colin.
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox series

Patch

diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index 4efe4c6e956c..abe0822dd429 100644
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -232,7 +232,6 @@  void ide_pio_bytes(ide_drive_t *drive, struct ide_cmd *cmd,
 	unsigned int offset;
 	u8 *buf;
 
-	cursg = cmd->cursg;
 	if (cursg == NULL)
 		cursg = cmd->cursg = sg;