lkml.org 
[lkml]   [2024]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH][next] comedi: ni_mio_common: remove redundant assignment to variable status1
Date
The variable status1 is being assigned a value that is never read, the
assignment is redundant and can be removed.

Cleans up clang scan build warning:
warning: Although the value stored to 'status1' is used in the enclosing
expression, the value is never actually read from 'status1'
[deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/comedi/drivers/ni_mio_common.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/comedi/drivers/ni_mio_common.c b/drivers/comedi/drivers/ni_mio_common.c
index 980f309d6de7..824b026238b5 100644
--- a/drivers/comedi/drivers/ni_mio_common.c
+++ b/drivers/comedi/drivers/ni_mio_common.c
@@ -3798,8 +3798,7 @@ static int ni_serial_hw_readwrite8(struct comedi_device *dev,
devpriv->dio_control &= ~NISTC_DIO_CTRL_HW_SER_START;

/* Wait until STC says we're done, but don't loop infinitely. */
- while ((status1 = ni_stc_readw(dev, NISTC_STATUS1_REG)) &
- NISTC_STATUS1_SERIO_IN_PROG) {
+ while (ni_stc_readw(dev, NISTC_STATUS1_REG) & NISTC_STATUS1_SERIO_IN_PROG) {
/* Delay one bit per loop */
udelay((devpriv->serial_interval_ns + 999) / 1000);
if (--count < 0) {
--
2.39.2

\
 
 \ /
  Last update: 2024-01-18 13:37    [W:0.115 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site