Commit 243fddea authored by James Simmons's avatar James Simmons Committed by Greg Kroah-Hartman

staging: lustre: libcfs: use BIT macro in linux-module.c

Use the proper BIT macro for libcfs_ioctl_is_invalid().
Signed-off-by: default avatarJames Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: http://review.whamcloud.com/17643Reviewed-by: default avatarBob Glossman <bob.glossman@intel.com>
Reviewed-by: default avatarJohn L. Hammond <john.hammond@intel.com>
Reviewed-by: default avatarDmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 460a222d
......@@ -51,15 +51,15 @@ static inline int libcfs_ioctl_packlen(struct libcfs_ioctl_data *data)
static inline bool libcfs_ioctl_is_invalid(struct libcfs_ioctl_data *data)
{
if (data->ioc_hdr.ioc_len > (1 << 30)) {
if (data->ioc_hdr.ioc_len > BIT(30)) {
CERROR("LIBCFS ioctl: ioc_len larger than 1<<30\n");
return true;
}
if (data->ioc_inllen1 > (1<<30)) {
if (data->ioc_inllen1 > BIT(30)) {
CERROR("LIBCFS ioctl: ioc_inllen1 larger than 1<<30\n");
return true;
}
if (data->ioc_inllen2 > (1<<30)) {
if (data->ioc_inllen2 > BIT(30)) {
CERROR("LIBCFS ioctl: ioc_inllen2 larger than 1<<30\n");
return true;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment