Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b004223db7249d42db893df916457acecc22759c
Commit:     b004223db7249d42db893df916457acecc22759c
Parent:     1dcfdf93f66375567ec563de74bbb8c295ac88df
Author:     Andrew Morton <[EMAIL PROTECTED]>
AuthorDate: Wed Feb 6 02:57:49 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
CommitDate: Wed Feb 6 02:57:49 2008 +0100

    drivers/ide/legacy/hd.c: fix uninitialized var warning
    
    drivers/ide/legacy/hd.c: In function 'hd_request':
    drivers/ide/legacy/hd.c:424: warning: 'stat' may be used uninitialized in 
this function
    
    gcc is being stupid.
    
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
 drivers/ide/legacy/hd.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/ide/legacy/hd.c b/drivers/ide/legacy/hd.c
index 8e05d88..0b0d867 100644
--- a/drivers/ide/legacy/hd.c
+++ b/drivers/ide/legacy/hd.c
@@ -421,11 +421,14 @@ static void bad_rw_intr(void)
 
 static inline int wait_DRQ(void)
 {
-       int retries = 100000, stat;
+       int retries;
+       int stat;
 
-       while (--retries > 0)
-               if ((stat = inb_p(HD_STATUS)) & DRQ_STAT)
+       for (retries = 0; retries < 100000; retries++) {
+               stat = inb_p(HD_STATUS);
+               if (stat & DRQ_STAT)
                        return 0;
+       }
        dump_status("wait_DRQ", stat);
        return -1;
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to