Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ab37128797148edb5993d98b638d668f75ee5119
Commit:     ab37128797148edb5993d98b638d668f75ee5119
Parent:     e1fc2b5167f9c3614099e55d3f49763a26a5a339
Author:     Eric Moore <[EMAIL PROTECTED]>
AuthorDate: Sat Sep 29 10:22:54 2007 -0600
Committer:  James Bottomley <[EMAIL PROTECTED]>
CommitDate: Fri Oct 12 14:52:27 2007 -0400

    [SCSI] mptctl : shutup uninitialized variable warnings
    
    drivers/message/fusion/mptctl.c: In function ‘mptctl_mpt_command’:
    drivers/message/fusion/mptctl.c:1764: warning: ‘bufIn.len’ may be used 
uninitialized in this function
    drivers/message/fusion/mptctl.c:1765: warning: ‘bufOut.len’ may be used 
uninitialized in this function
    
    come because gcc gets confused by some "goto" statements in above
    function.  The warnings have been verified to be bogus, however, the
    function does initialize these later (after the offending goto's) in
    the function anyway.  So let's move those initializations to top of
    function, thereby also shutting up these warnings.
    
    Signed-off-by: Eric Moore <[EMAIL PROTECTED]>
    Signed-off-by: Satyam Sharma <[EMAIL PROTECTED]>
    Signed-off-by: James Bottomley <[EMAIL PROTECTED]>
---
 drivers/message/fusion/mptctl.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/message/fusion/mptctl.c b/drivers/message/fusion/mptctl.c
index 70178a8..6029509 100644
--- a/drivers/message/fusion/mptctl.c
+++ b/drivers/message/fusion/mptctl.c
@@ -1774,7 +1774,10 @@ mptctl_do_mpt_command (struct mpt_ioctl_command karg, 
void __user *mfPtr)
        ulong           timeout;
        struct scsi_device *sdev;
 
+       /* bufIn and bufOut are used for user to kernel space transfers
+        */
        bufIn.kptr = bufOut.kptr = NULL;
+       bufIn.len = bufOut.len = 0;
 
        if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) ||
            (ioc == NULL)) {
@@ -2108,11 +2111,6 @@ mptctl_do_mpt_command (struct mpt_ioctl_command karg, 
void __user *mfPtr)
        psge = (char *) (((int *) mf) + karg.dataSgeOffset);
        flagsLength = 0;
 
-       /* bufIn and bufOut are used for user to kernel space transfers
-        */
-       bufIn.kptr = bufOut.kptr = NULL;
-       bufIn.len = bufOut.len = 0;
-
        if (karg.dataOutSize > 0)
                sgSize ++;
 
-
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