All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: [bug report] qed: Add support for memory registeration verbs
Date: Mon, 14 Nov 2016 12:43:34 +0000	[thread overview]
Message-ID: <20161114124334.GA5661@mwanda> (raw)

Hello Ram Amrani,

The patch ee8eaea30b13: "qed: Add support for memory registeration
verbs" from Oct 1, 2016, leads to the following static checker
warning:

	drivers/net/ethernet/qlogic/qed/qed_roce.c:2354 qed_rdma_register_tid()
	error: uninitialized symbol 'fw_return_code'.

drivers/net/ethernet/qlogic/qed/qed_roce.c
  2343          /* DIF */
  2344          if (params->dif_enabled) {
  2345                  SET_FIELD(p_ramrod->flags2,
  2346                            RDMA_REGISTER_TID_RAMROD_DATA_DIF_ON_HOST_FLG, 1);
  2347                  DMA_REGPAIR_LE(p_ramrod->dif_error_addr,
  2348                                 params->dif_error_addr);
  2349                  DMA_REGPAIR_LE(p_ramrod->dif_runt_addr, params->dif_runt_addr);
  2350          }
  2351  
  2352          rc = qed_spq_post(p_hwfn, p_ent, &fw_return_code);
  2353  
  2354          if (fw_return_code != RDMA_RETURN_OK) {

This basically works even when rc is a negative error code and
fw_return_code is uninitialized but hella nasty.

  2355                  DP_NOTICE(p_hwfn, "fw_return_code = %d\n", fw_return_code);
  2356                  return -EINVAL;
  2357          }
  2358  
  2359          DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "Register TID, rc = %d\n", rc);
  2360          return rc;
  2361  }

regards,
dan carpenter

             reply	other threads:[~2016-11-14 12:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-14 12:43 Dan Carpenter [this message]
2016-11-15 12:12 ` [bug report] qed: Add support for memory registeration verbs Amrani, Ram

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=20161114124334.GA5661@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.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.