mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [infiniband-core] question about arguments position
@ 2017-05-04 17:42 Gustavo A. R. Silva
  2017-05-04 21:52 ` Parav Pandit
  0 siblings, 1 reply; 4+ messages in thread
From: Gustavo A. R. Silva @ 2017-05-04 17:42 UTC (permalink / raw)
  To: Doug Ledford, Sean Hefty, Hal Rosenstock, Sagi Grimberg,
	Bart Van Assche, Steve Wise, Leon Romanovsky, Yishai Hadas,
	Moni Shoua
  Cc: linux-rdma, linux-kernel


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-05-05  1:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-04 17:42 [infiniband-core] question about arguments position Gustavo A. R. Silva
2017-05-04 21:52 ` Parav Pandit
2017-05-04 23:49   ` Doug Ledford
2017-05-05  1:38     ` Gustavo A. R. Silva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome