]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
qed: Fix printk option passed when printing ipv6 addresses
authorKalderon, Michal <Michal.Kalderon@cavium.com>
Sun, 9 Jul 2017 10:00:16 +0000 (13:00 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 11 Jul 2017 20:36:05 +0000 (13:36 -0700)
The option "h" (host order ) exists for ipv4 only.
Remove the h when printing ipv6 addresses.

Lead to the following smatch warning:

drivers/net/ethernet/qlogic/qed/qed_iwarp.c:585 qed_iwarp_print_tcp_ramrod()
warn: '%pI6' can only be followed by c
drivers/net/ethernet/qlogic/qed/qed_iwarp.c:1521 qed_iwarp_print_cm_info()
warn: '%pI6' can only be followed by c

Fixes commit 456a584947d5 ("qed: iWARP CM add passive side connect")

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qed/qed_iwarp.c

index b251ebaec4db3b37f4df5536a4124d5ebda4f86c..9d989c96278c08122cc79df9d27ad329ce2baea3 100644 (file)
@@ -575,7 +575,7 @@ qed_iwarp_print_tcp_ramrod(struct qed_hwfn *p_hwfn,
 
        if (p_tcp_ramrod->tcp.ip_version == TCP_IPV4) {
                DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
-                          "local_ip=%pI4h:%x, remote_ip=%pI4h%x, vlan=%x\n",
+                          "local_ip=%pI4h:%x, remote_ip=%pI4h:%x, vlan=%x\n",
                           p_tcp_ramrod->tcp.local_ip,
                           p_tcp_ramrod->tcp.local_port,
                           p_tcp_ramrod->tcp.remote_ip,
@@ -583,7 +583,7 @@ qed_iwarp_print_tcp_ramrod(struct qed_hwfn *p_hwfn,
                           p_tcp_ramrod->tcp.vlan_id);
        } else {
                DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
-                          "local_ip=%pI6h:%x, remote_ip=%pI6h:%x, vlan=%x\n",
+                          "local_ip=%pI6:%x, remote_ip=%pI6:%x, vlan=%x\n",
                           p_tcp_ramrod->tcp.local_ip,
                           p_tcp_ramrod->tcp.local_port,
                           p_tcp_ramrod->tcp.remote_ip,
@@ -1519,7 +1519,7 @@ qed_iwarp_print_cm_info(struct qed_hwfn *p_hwfn,
                           cm_info->vlan);
        else
                DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
-                          "remote_ip %pI6h:%x, local_ip %pI6h:%x vlan=%x\n",
+                          "remote_ip %pI6:%x, local_ip %pI6:%x vlan=%x\n",
                           cm_info->remote_ip, cm_info->remote_port,
                           cm_info->local_ip, cm_info->local_port,
                           cm_info->vlan);