* [patch] mtip32xx: uninitialized variable in mtip_quiesce_io()
@ 2011-11-24 11:47 Dan Carpenter
2011-11-24 11:59 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2011-11-24 11:47 UTC (permalink / raw)
To: Jens Axboe; +Cc: Asai Thambi S P, Sam Bradshaw, linux-kernel, kernel-janitors
We recently introduce new continue in the loop which make gcc complain.
In theory if MTIP_FLAG_SVC_THD_ACTIVE_BIT is set, we could hit continue
over and over until eventually we time out of the loop. In that case
"active" should be set as true, but right now it's uninitialized.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c
index b5d843a..9bc10e3 100644
--- a/drivers/block/mtip32xx/mtip32xx.c
+++ b/drivers/block/mtip32xx/mtip32xx.c
@@ -1026,7 +1026,8 @@ static void mtip_issue_non_ncq_command(struct mtip_port *port, int tag)
static int mtip_quiesce_io(struct mtip_port *port, unsigned long timeout)
{
unsigned long to;
- unsigned int n, active;
+ unsigned int n;
+ unsigned int active = 1;
to = jiffies + msecs_to_jiffies(timeout);
do {
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-11-24 11:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-24 11:47 [patch] mtip32xx: uninitialized variable in mtip_quiesce_io() Dan Carpenter
2011-11-24 11:59 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox