@@ -906,59 +906,59 @@ static void mlx4_err_rule(struct mlx4_dev *dev, char *str,
906
906
int len = 0 ;
907
907
908
908
mlx4_err (dev , "%s" , str );
909
- len += snprintf (buf + len , BUF_SIZE - len ,
910
- "port = %d prio = 0x%x qp = 0x%x " ,
911
- rule -> port , rule -> priority , rule -> qpn );
909
+ len += scnprintf (buf + len , BUF_SIZE - len ,
910
+ "port = %d prio = 0x%x qp = 0x%x " ,
911
+ rule -> port , rule -> priority , rule -> qpn );
912
912
913
913
list_for_each_entry (cur , & rule -> list , list ) {
914
914
switch (cur -> id ) {
915
915
case MLX4_NET_TRANS_RULE_ID_ETH :
916
- len += snprintf (buf + len , BUF_SIZE - len ,
917
- "dmac = %pM " , & cur -> eth .dst_mac );
916
+ len += scnprintf (buf + len , BUF_SIZE - len ,
917
+ "dmac = %pM " , & cur -> eth .dst_mac );
918
918
if (cur -> eth .ether_type )
919
- len += snprintf (buf + len , BUF_SIZE - len ,
920
- "ethertype = 0x%x " ,
921
- be16_to_cpu (cur -> eth .ether_type ));
919
+ len += scnprintf (buf + len , BUF_SIZE - len ,
920
+ "ethertype = 0x%x " ,
921
+ be16_to_cpu (cur -> eth .ether_type ));
922
922
if (cur -> eth .vlan_id )
923
- len += snprintf (buf + len , BUF_SIZE - len ,
924
- "vlan-id = %d " ,
925
- be16_to_cpu (cur -> eth .vlan_id ));
923
+ len += scnprintf (buf + len , BUF_SIZE - len ,
924
+ "vlan-id = %d " ,
925
+ be16_to_cpu (cur -> eth .vlan_id ));
926
926
break ;
927
927
928
928
case MLX4_NET_TRANS_RULE_ID_IPV4 :
929
929
if (cur -> ipv4 .src_ip )
930
- len += snprintf (buf + len , BUF_SIZE - len ,
931
- "src-ip = %pI4 " ,
932
- & cur -> ipv4 .src_ip );
930
+ len += scnprintf (buf + len , BUF_SIZE - len ,
931
+ "src-ip = %pI4 " ,
932
+ & cur -> ipv4 .src_ip );
933
933
if (cur -> ipv4 .dst_ip )
934
- len += snprintf (buf + len , BUF_SIZE - len ,
935
- "dst-ip = %pI4 " ,
936
- & cur -> ipv4 .dst_ip );
934
+ len += scnprintf (buf + len , BUF_SIZE - len ,
935
+ "dst-ip = %pI4 " ,
936
+ & cur -> ipv4 .dst_ip );
937
937
break ;
938
938
939
939
case MLX4_NET_TRANS_RULE_ID_TCP :
940
940
case MLX4_NET_TRANS_RULE_ID_UDP :
941
941
if (cur -> tcp_udp .src_port )
942
- len += snprintf (buf + len , BUF_SIZE - len ,
943
- "src-port = %d " ,
944
- be16_to_cpu (cur -> tcp_udp .src_port ));
942
+ len += scnprintf (buf + len , BUF_SIZE - len ,
943
+ "src-port = %d " ,
944
+ be16_to_cpu (cur -> tcp_udp .src_port ));
945
945
if (cur -> tcp_udp .dst_port )
946
- len += snprintf (buf + len , BUF_SIZE - len ,
947
- "dst-port = %d " ,
948
- be16_to_cpu (cur -> tcp_udp .dst_port ));
946
+ len += scnprintf (buf + len , BUF_SIZE - len ,
947
+ "dst-port = %d " ,
948
+ be16_to_cpu (cur -> tcp_udp .dst_port ));
949
949
break ;
950
950
951
951
case MLX4_NET_TRANS_RULE_ID_IB :
952
- len += snprintf (buf + len , BUF_SIZE - len ,
953
- "dst-gid = %pI6\n" , cur -> ib .dst_gid );
954
- len += snprintf (buf + len , BUF_SIZE - len ,
955
- "dst-gid-mask = %pI6\n" ,
956
- cur -> ib .dst_gid_msk );
952
+ len += scnprintf (buf + len , BUF_SIZE - len ,
953
+ "dst-gid = %pI6\n" , cur -> ib .dst_gid );
954
+ len += scnprintf (buf + len , BUF_SIZE - len ,
955
+ "dst-gid-mask = %pI6\n" ,
956
+ cur -> ib .dst_gid_msk );
957
957
break ;
958
958
959
959
case MLX4_NET_TRANS_RULE_ID_VXLAN :
960
- len += snprintf (buf + len , BUF_SIZE - len ,
961
- "VNID = %d " , be32_to_cpu (cur -> vxlan .vni ));
960
+ len += scnprintf (buf + len , BUF_SIZE - len ,
961
+ "VNID = %d " , be32_to_cpu (cur -> vxlan .vni ));
962
962
break ;
963
963
case MLX4_NET_TRANS_RULE_ID_IPV6 :
964
964
break ;
@@ -967,7 +967,7 @@ static void mlx4_err_rule(struct mlx4_dev *dev, char *str,
967
967
break ;
968
968
}
969
969
}
970
- len += snprintf (buf + len , BUF_SIZE - len , "\n" );
970
+ len += scnprintf (buf + len , BUF_SIZE - len , "\n" );
971
971
mlx4_err (dev , "%s" , buf );
972
972
973
973
if (len >= BUF_SIZE )
0 commit comments