On 10/13/2015 11:41 AM, Oleg Smolsky wrote:
diff --git a/include/uapi/linux/target_core_user.h
b/include/uapi/linux/target_core_user.h
index 95c6521..52ab6fa 100644
--- a/include/uapi/linux/target_core_user.h
+++ b/include/uapi/linux/target_core_user.h
@@ -55,7 +55,11 @@ struct tcmu_mailbox {
} __packed;
-enum tcmu_opcode {
+enum tcmu_opcode
+#if defined(__cplusplus) && __cplusplus >= 201103L
+ : __u32
+#endif
+{
Hello Oleg,
As far as I know the tcmu_opcode enum type is not used anywhere as a
member of a struct. So why is the explicit size specification needed ?
static inline enum tcmu_opcode tcmu_hdr_get_op(__u32 len_op)
{
- return len_op & TCMU_OP_MASK;
+ return (tcmu_opcode)(len_op & TCMU_OP_MASK); // note, an
explicit conversion is needed
+ // in C++11 and higher
}
C compilers will report a syntax error for the above code. Please reread
my previous e-mail.
Bart.
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html