lkml.org 
[lkml]   [2016]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 28/29] staging: lustre: libcfs: use BIT macro in linux-module.c
Date
Use the proper BIT macro for libcfs_ioctl_is_invalid().

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: http://review.whamcloud.com/17643
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
---
.../lustre/lnet/libcfs/linux/linux-module.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-module.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-module.c
index d5b7d3a..cf191ef 100644
--- a/drivers/staging/lustre/lnet/libcfs/linux/linux-module.c
+++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-module.c
@@ -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;
}
--
1.7.1
\
 
 \ /
  Last update: 2016-03-23 00:21    [W:0.118 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site