[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <152261540772.30503.1698627927664620191.stgit@warthog.procyon.org.uk>
Date: Sun, 01 Apr 2018 21:43:27 +0100
From: David Howells <dhowells@...hat.com>
To: linux-kernel@...r.kernel.org
Subject: [PATCH 32/45] C++: __to_fd() needs to reduce the size of v for
struct fd::flags
__to_fd() needs to reduce the size of v before it assigns the computed
value to fd::flags or suffer a warning about reduction of size of integer.
Signed-off-by: David Howells <dhowells@...hat.com>
---
include/linux/file.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/file.h b/include/linux/file.h
index 279720db984a..9807271c850a 100644
--- a/include/linux/file.h
+++ b/include/linux/file.h
@@ -49,7 +49,7 @@ extern void __f_unlock_pos(struct file *);
static inline struct fd __to_fd(unsigned long v)
{
- return (struct fd){(struct file *)(v & ~3),v & 3};
+ return (struct fd){(struct file *)(v & ~3), (unsigned int)v & 3};
}
static inline struct fd fdget(unsigned int fd)
Powered by blists - more mailing lists