diff options
author | Jason Gunthorpe <jgg@mellanox.com> | 2018-08-01 23:25:39 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-08-08 17:47:26 +0200 |
commit | 0c66847793d1982d1083dc6f7adad60fa265ce9c (patch) | |
tree | 47e7adc83361508e8826065f344453ee5216f704 /lib/test_overflow.c | |
parent | IB/ucm: Initialize sgid request GID attribute pointer (diff) | |
download | linux-0c66847793d1982d1083dc6f7adad60fa265ce9c.tar.xz linux-0c66847793d1982d1083dc6f7adad60fa265ce9c.zip |
overflow.h: Add arithmetic shift helper
Add shift_overflow() helper to assist driver authors in ensuring that
shift operations don't cause overflows or other odd conditions.
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
[kees: tweaked comments and commit log, dropped unneeded assignment]
Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'lib/test_overflow.c')
0 files changed, 0 insertions, 0 deletions