lkml.org 
[lkml]   [2017]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[infiniband-core] question about arguments position

Hello everybody,

While looking into Coverity ID 1351047 I ran into the following piece
of code at drivers/infiniband/core/verbs.c:496:

ret = rdma_addr_find_l2_eth_by_grh(&dgid, &sgid,
ah_attr->dmac,
wc->wc_flags & IB_WC_WITH_VLAN ?
NULL : &vlan_id,
&if_index, &hoplimit);


The issue here is that the position of arguments in the call to
rdma_addr_find_l2_eth_by_grh() function do not match the order of the
parameters:

&dgid is passed to sgid
&sgid is passed to dgid

This is the function prototype:

int rdma_addr_find_l2_eth_by_grh(const union ib_gid *sgid,
const union ib_gid *dgid,
u8 *dmac, u16 *vlan_id, int *if_index,
int *hoplimit)

My question here is if this is intentional?

In case it is not, I will send a patch to fix it. But first it would
be great to hear any comment about it.

Thank you
--
Gustavo A. R. Silva




\
 
 \ /
  Last update: 2017-05-04 19:43    [W:0.052 / U:0.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site