projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d11769f
)
RDMA/hfi1: Delete unreachable code
author
Leon Romanovsky
<leonro@mellanox.com>
Tue, 29 Oct 2019 06:27:36 +0000
(08:27 +0200)
committer
Jason Gunthorpe
<jgg@mellanox.com>
Wed, 13 Nov 2019 00:20:14 +0000
(20:20 -0400)
All callers allocate MAD structures with proper sizes, there is no need to
recheck it.
Link:
https://lore.kernel.org/r/20191029062745.7932-8-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hfi1/mad.c
patch
|
blob
|
history
diff --git
a/drivers/infiniband/hw/hfi1/mad.c
b/drivers/infiniband/hw/hfi1/mad.c
index
d8ff063
..
a54746f
100644
(file)
--- a/
drivers/infiniband/hw/hfi1/mad.c
+++ b/
drivers/infiniband/hw/hfi1/mad.c
@@
-4921,10
+4921,6
@@
int hfi1_process_mad(struct ib_device *ibdev, int mad_flags, u8 port,
{
switch (in_mad->base_version) {
case OPA_MGMT_BASE_VERSION:
- if (unlikely(in_mad_size != sizeof(struct opa_mad))) {
- dev_err(ibdev->dev.parent, "invalid in_mad_size\n");
- return IB_MAD_RESULT_FAILURE;
- }
return hfi1_process_opa_mad(ibdev, mad_flags, port,
in_wc, in_grh,
(struct opa_mad *)in_mad,