All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: re: IB/hfi1: add driver files
Date: Wed, 16 Sep 2015 10:14:42 +0300	[thread overview]
Message-ID: <20150916071442.GA30250@mwanda> (raw)

Hello Mike Marciniszyn,

The patch 7724105686e7: "IB/hfi1: add driver files" from Jul 30,
2015, leads to the following static checker warning:

	drivers/staging/rdma/hfi1/rc.c:2399 hfi1_rc_hdrerr()
	warn: right shift assign to zero

drivers/staging/rdma/hfi1/rc.c
  2376  void hfi1_rc_hdrerr(
  2377          struct hfi1_ctxtdata *rcd,
  2378          struct hfi1_ib_header *hdr,
  2379          u32 rcv_flags,
  2380          struct hfi1_qp *qp)
  2381  {
  2382          int has_grh = rcv_flags & HFI1_HAS_GRH;
  2383          struct hfi1_other_headers *ohdr;
  2384          struct hfi1_ibport *ibp = to_iport(qp->ibqp.device, qp->port_num);
  2385          int diff;
  2386          u8 opcode;
  2387          u32 psn;
  2388  
  2389          /* Check for GRH */
  2390          ohdr = &hdr->u.oth;
  2391          if (has_grh)
  2392                  ohdr = &hdr->u.l.oth;
  2393  
  2394          opcode = be32_to_cpu(ohdr->bth[0]);
  2395          if (hfi1_ruc_check_hdr(ibp, hdr, has_grh, qp, opcode))
  2396                  return;
  2397  
  2398          psn = be32_to_cpu(ohdr->bth[2]);
  2399          opcode >>= 24;
  2400  

opcode should probably be a u32 instead of a u8.

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:[~2015-09-16  7:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-16  7:14 Dan Carpenter [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-06-27 13:19 IB/hfi1: add driver files Dan Carpenter
2016-07-13 16:27 ` Marciniszyn, Mike
2015-09-16  7:13 Dan Carpenter

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=20150916071442.GA30250@mwanda \
    --to=dan.carpenter-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.