staging/rdma/hfi1: Wrong cast breaks desired pointer arithmetic
authorMitko Haralanov <mitko.haralanov@intel.com>
Mon, 26 Oct 2015 14:28:39 +0000 (10:28 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Oct 2015 08:20:41 +0000 (17:20 +0900)
commit3c6c065a510ed59f7fddabac4be2f932ecfe9275
tree2ce906208eea79617eda4f4fc16d233c4704bf8b
parentb9fb6318d0696b481b1e3cd8aa702141a59569c0
staging/rdma/hfi1: Wrong cast breaks desired pointer arithmetic

The address being mapped into a process's memory for notification events was
improperly calculated due to cast that was happening too early. dd->events is a
pointer and should have been casted to unsigned long after the pointer
arithmetic was done, not before.

As a result, processes were looking at the wrong place and not seeing their
notification events.

Signed-off-by: Mitko Haralanov <mitko.haralanov@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rdma/hfi1/file_ops.c