public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: umalhi-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: re: IB/usnic: Add UDP support in usnic_ib_qp_grp.[hc]
Date: Fri, 17 Jan 2014 14:19:09 +0300	[thread overview]
Message-ID: <20140117111909.GA27461@elgon.mountain> (raw)

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

                 reply	other threads:[~2014-01-17 11:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140117111909.GA27461@elgon.mountain \
    --to=dan.carpenter-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=umalhi-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox