summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_nx2.c
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@sandisk.com>2015-07-09 07:23:46 -0700
committerJames Bottomley <JBottomley@Odin.com>2015-08-26 10:35:35 -0700
commitdf3f4cd0defd5f832a806ca1f0dd6638a2df17a5 (patch)
tree71247576da136aa11c258ffaf9724bc43d86e94b /drivers/scsi/qla2xxx/qla_nx2.c
parent52c82823cc686d4faf9e9bc4feec4bf48c36fded (diff)
downloadlinux-df3f4cd0defd5f832a806ca1f0dd6638a2df17a5.tar.bz2
qla2xxx: Replace two macros with an inline function
Replace the QLA82XX_ADDR_IN_RANGE() and QLA8044_ADDR_IN_RANGE() macros with the inline function addr_in_range(). This avoids that the compiler reports the following warning when building with W=1: comparison of unsigned expression >= 0 is always true. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Acked-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_nx2.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_nx2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_nx2.c b/drivers/scsi/qla2xxx/qla_nx2.c
index 50e36f0348c1..007192d7bad8 100644
--- a/drivers/scsi/qla2xxx/qla_nx2.c
+++ b/drivers/scsi/qla2xxx/qla_nx2.c
@@ -1129,9 +1129,9 @@ qla8044_ms_mem_write_128b(struct scsi_qla_host *vha,
}
for (i = 0; i < count; i++, addr += 16) {
- if (!((QLA8044_ADDR_IN_RANGE(addr, QLA8044_ADDR_QDR_NET,
+ if (!((addr_in_range(addr, QLA8044_ADDR_QDR_NET,
QLA8044_ADDR_QDR_NET_MAX)) ||
- (QLA8044_ADDR_IN_RANGE(addr, QLA8044_ADDR_DDR_NET,
+ (addr_in_range(addr, QLA8044_ADDR_DDR_NET,
QLA8044_ADDR_DDR_NET_MAX)))) {
ret_val = QLA_FUNCTION_FAILED;
goto exit_ms_mem_write_unlock;