From: "Gustavo A. R. Silva" <garsilva@embeddedor.com>
To: Faisal Latif <faisal.latif@intel.com>,
Shiraz Saleem <shiraz.saleem@intel.com>,
Doug Ledford <dledford@redhat.com>,
Sean Hefty <sean.hefty@intel.com>,
Hal Rosenstock <hal.rosenstock@gmail.com>
Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
Yuval Shaia <yuval.shaia@oracle.com>,
"Gustavo A. R. Silva" <garsilva@embeddedor.com>
Subject: [PATCH] infiniband: hw: i40iw: fix duplicated code for different branches
Date: Thu, 18 May 2017 13:11:17 -0500 [thread overview]
Message-ID: <20170518181117.GA14287@embeddedgus> (raw)
In-Reply-To: <20170518125413.Horde.xnD_6K5mFzkhQLdyz7R3LXt@gator4166.hostgator.com>
Refactor code to avoid identical code for different branches.
Addresses-Coverity-ID: 1357356
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
drivers/infiniband/hw/i40iw/i40iw_virtchnl.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/infiniband/hw/i40iw/i40iw_virtchnl.c b/drivers/infiniband/hw/i40iw/i40iw_virtchnl.c
index f4d1368..48fd327 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_virtchnl.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_virtchnl.c
@@ -443,10 +443,7 @@ enum i40iw_status_code i40iw_vchnl_recv_pf(struct i40iw_sc_dev *dev,
if (!dev->vchnl_up)
return I40IW_ERR_NOT_READY;
if (vchnl_msg->iw_op_code == I40IW_VCHNL_OP_GET_VER) {
- if (vchnl_msg->iw_op_ver != I40IW_VCHNL_OP_GET_VER_V0)
- vchnl_pf_send_get_ver_resp(dev, vf_id, vchnl_msg);
- else
- vchnl_pf_send_get_ver_resp(dev, vf_id, vchnl_msg);
+ vchnl_pf_send_get_ver_resp(dev, vf_id, vchnl_msg);
return I40IW_SUCCESS;
}
for (iw_vf_idx = 0; iw_vf_idx < I40IW_MAX_PE_ENABLED_VF_COUNT; iw_vf_idx++) {
--
2.5.0
next prev parent reply other threads:[~2017-05-18 18:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-17 22:06 [infiniband-hw-i40iw] question about identical code for different branches Gustavo A. R. Silva
[not found] ` <20170517170654.Horde.cfktFjC4G4wPJvJ8X1ZyUvW-fU+oOHjIBR1LoJgMfuPDHBfZZeVsHd8q@public.gmane.org>
2017-05-18 5:00 ` Leon Romanovsky
2017-05-18 5:00 ` Leon Romanovsky
[not found] ` <20170518050029.GY3616-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-05-18 15:03 ` Chien Tin Tung
2017-05-18 15:03 ` Chien Tin Tung
2017-05-18 6:00 ` Yuval Shaia
2017-05-18 6:00 ` Yuval Shaia
2017-05-18 14:35 ` Saleem, Shiraz
2017-05-18 14:35 ` Saleem, Shiraz
2017-05-18 17:54 ` Gustavo A. R. Silva
2017-05-18 18:11 ` Gustavo A. R. Silva [this message]
2017-05-19 16:59 ` [PATCH] infiniband: hw: i40iw: fix duplicated " Shiraz Saleem
2017-06-01 22:27 ` Doug Ledford
2017-06-01 22:27 ` Doug Ledford
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=20170518181117.GA14287@embeddedgus \
--to=garsilva@embeddedor.com \
--cc=dledford@redhat.com \
--cc=faisal.latif@intel.com \
--cc=hal.rosenstock@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=sean.hefty@intel.com \
--cc=shiraz.saleem@intel.com \
--cc=yuval.shaia@oracle.com \
/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.