public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* re: IB/usnic: Add UDP support in usnic_ib_qp_grp.[hc]
@ 2014-01-17 11:19 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2014-01-17 11:19 UTC (permalink / raw)
  To: umalhi-FYB4Gu1CFyUAvxtiuMwx3w; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

Hello Upinder Malhi,

The patch e45e614e4015: "IB/usnic: Add UDP support in
usnic_ib_qp_grp.[hc]" from Jan 9, 2014, leads to the following
static checker warning:

	drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c:638 qp_grp_id_from_flow()
	warn: passing casted pointer 'id' to 'usnic_transport_sock_get_addr()' 32 vs 16.

drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c
   627  static int qp_grp_id_from_flow(struct usnic_ib_qp_grp_flow *qp_flow,
   628                                  uint32_t *id)
   629  {
   630          enum usnic_transport_type trans_type = qp_flow->trans_type;
   631          int err;
   632  
   633          switch (trans_type) {
   634          case USNIC_TRANSPORT_ROCE_CUSTOM:
   635                  *id = qp_flow->usnic_roce.port_num;
   636                  break;
   637          case USNIC_TRANSPORT_IPV4_UDP:
   638                  err = usnic_transport_sock_get_addr(qp_flow->udp.sock,
   639                                                          NULL, NULL,
   640                                                          (uint16_t *) id);
                                                                ^^^^^^^^^^^^^^^
This doesn't work on big endian systems.

   641                  if (err)
   642                          return err;
   643                  break;

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-01-17 11:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-17 11:19 IB/usnic: Add UDP support in usnic_ib_qp_grp.[hc] Dan Carpenter

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