• Dan Carpenter's avatar
    vhost/scsi: silence uninitialized variable warning · 532e15af
    Dan Carpenter authored
    This is to silence an uninitialized variable warning in debug output.
    The problem is this line:
    
    	pr_debug("vhost_get_vq_desc: head: %d, out: %u in: %u\n",
    		 head, out, in);
    
    If "head == vq->num" is true on the first iteration then "out" and "in"
    aren't initialized.  We handle that a few lines after the printk.  I was
    tempted to just delete the pr_debug() but I decided to just initialize
    them to zero instead.
    
    Also checkpatch.pl complains if variables are declared as just
    "unsigned" without the "int".
    Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
    Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    532e15af
scsi.c 57.2 KB