[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211018090834.856992-1-luo.penghao@zte.com.cn>
Date: Mon, 18 Oct 2021 09:08:34 +0000
From: luo penghao <cgel.zte@...il.com>
To: Phillip Potter <phil@...lpotter.co.uk>
Cc: linux-kernel@...r.kernel.org, penghao luo <luo.penghao@....com.cn>,
Zeal Robot <zealci@....com.cn>
Subject: [PATCH linux-next] cdrom: Remove redundant variable and its assignment.
From: penghao luo <luo.penghao@....com.cn>
Variable is not used in functions, and its assignment is redundant too.
So it should be deleted.
The clang_analyzer complains as follows:
drivers/cdrom/cdrom.c:877: warning:
Although the value stored to 'ret' is used in the enclosing expression,
the value is never actually read from 'ret’.
Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: penghao luo <luo.penghao@....com.cn>
---
drivers/cdrom/cdrom.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index 89a6845..393acf4 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -871,7 +871,7 @@ static void cdrom_mmc3_profile(struct cdrom_device_info *cdi)
{
struct packet_command cgc;
char buffer[32];
- int ret, mmc3_profile;
+ int mmc3_profile;
init_cdrom_command(&cgc, buffer, sizeof(buffer), CGC_DATA_READ);
@@ -881,7 +881,7 @@ static void cdrom_mmc3_profile(struct cdrom_device_info *cdi)
cgc.cmd[8] = sizeof(buffer); /* Allocation Length */
cgc.quiet = 1;
- if ((ret = cdi->ops->generic_packet(cdi, &cgc)))
+ if ((cdi->ops->generic_packet(cdi, &cgc)))
mmc3_profile = 0xffff;
else
mmc3_profile = (buffer[6] << 8) | buffer[7];
--
2.15.2
Powered by blists - more mailing lists