]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
scsi: fix compiler warning with DEBUG and 48bit LBAs
authorAndre Przywara <osp@andrep.de>
Thu, 2 Jul 2015 00:04:23 +0000 (01:04 +0100)
committerLothar Waßmann <LW@KARO-electronics.de>
Wed, 9 Sep 2015 11:29:21 +0000 (13:29 +0200)
commitd9d15df27f23c83a8b1528d9f740decc3d253d6f
tree2540975be40eb97334600015fbb78bc053aeecb8
parent28283f69cc64511f6df9850909b59d7f63afb67a
scsi: fix compiler warning with DEBUG and 48bit LBAs

Commit 2b42c9317db ("ahci: support LBA48 data reads for 2+TB drives")
introduced conditional code which triggers a warning when compiled
with DEBUG enabled:

In file included from common/cmd_scsi.c:12:0:
common/cmd_scsi.c: In function 'scsi_read':
include/common.h:109:4: warning: 'smallblks' may be used uninitialized in this function [-Wmaybe-uninitialized]
...

Since this is for debug only, take the easy way and initialize the
variable explicitly on declaration to avoid the warning.
(Fix a nearby whitespace error on the way.)

Tested-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Andre Przywara <osp@andrep.de>
common/cmd_scsi.c