diff options
author | Ira Weiny <ira.weiny@intel.com> | 2015-05-08 18:27:22 (GMT) |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2015-05-20 16:34:10 (GMT) |
commit | 96909308542006215980874ce496101ea51aa031 (patch) | |
tree | 8e4a4f7dad711a2f1eceefefeee83bd69046447d /drivers/infiniband/core/user_mad.c | |
parent | 77f60833b8e75c72e133c38a33d12ecf0689206a (diff) | |
download | linux-96909308542006215980874ce496101ea51aa031.tar.xz |
IB/mad: Change ib_response_mad signature arguments
ib_response_mad only needs read access to the MAD header, not write access
to the entire mad struct, so replace struct ib_mad with const struct
ib_mad_hdr
Reviewed-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Reviewed-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/core/user_mad.c')
-rw-r--r-- | drivers/infiniband/core/user_mad.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/infiniband/core/user_mad.c b/drivers/infiniband/core/user_mad.c index 928cdd2..66b5217 100644 --- a/drivers/infiniband/core/user_mad.c +++ b/drivers/infiniband/core/user_mad.c @@ -426,11 +426,11 @@ static int is_duplicate(struct ib_umad_file *file, * the same TID, reject the second as a duplicate. This is more * restrictive than required by the spec. */ - if (!ib_response_mad((struct ib_mad *) hdr)) { - if (!ib_response_mad((struct ib_mad *) sent_hdr)) + if (!ib_response_mad(hdr)) { + if (!ib_response_mad(sent_hdr)) return 1; continue; - } else if (!ib_response_mad((struct ib_mad *) sent_hdr)) + } else if (!ib_response_mad(sent_hdr)) continue; if (same_destination(&packet->mad.hdr, &sent_packet->mad.hdr)) |