]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[SCSI] qla4xxx: Fix sparse warnings
authorVikas Chaudhary <vikas.chaudhary@qlogic.com>
Mon, 16 Dec 2013 11:49:53 +0000 (06:49 -0500)
committerJames Bottomley <JBottomley@Parallels.com>
Sat, 15 Mar 2014 17:19:16 +0000 (10:19 -0700)
Fix following sparse warnings:-
 drivers/scsi/qla4xxx/ql4_os.c:2109:33: warning: cast truncates bits from constant value (ffff7fff becomes 7fff)
 drivers/scsi/qla4xxx/ql4_os.c:2306:33: warning: cast truncates bits from constant value (ffff7fff becomes 7fff)

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/qla4xxx/ql4_os.c

index 1859f0dfa1f94debf5cbb4f6691e9a730ca5f5aa..459b9f7186fd81804745d618dccb603456c633ae 100644 (file)
@@ -2109,7 +2109,8 @@ static void qla4xxx_set_ipv6(struct scsi_qla_host *ha,
                                cpu_to_le16(IPV6_TCPOPT_DELAYED_ACK_DISABLE);
                else
                        init_fw_cb->ipv6_tcp_opts &=
-                               cpu_to_le16(~IPV6_TCPOPT_DELAYED_ACK_DISABLE);
+                               cpu_to_le16(~IPV6_TCPOPT_DELAYED_ACK_DISABLE &
+                                           0xFFFF);
                break;
        case ISCSI_NET_PARAM_TCP_NAGLE_DISABLE:
                if (iface_param->iface_num & 0x1)
@@ -2306,7 +2307,8 @@ static void qla4xxx_set_ipv4(struct scsi_qla_host *ha,
                                cpu_to_le16(TCPOPT_DELAYED_ACK_DISABLE);
                else
                        init_fw_cb->ipv4_tcp_opts &=
-                               cpu_to_le16(~TCPOPT_DELAYED_ACK_DISABLE);
+                               cpu_to_le16(~TCPOPT_DELAYED_ACK_DISABLE &
+                                           0xFFFF);
                break;
        case ISCSI_NET_PARAM_TCP_NAGLE_DISABLE:
                if (iface_param->iface_num & 0x1)