Re: [PATCH v3 1/4] bus: fsl-mc: move fsl_mc_command struct in a uapi header

2018-03-24 Thread kbuild test robot
Hi Ioana,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on staging/staging-testing]
[cannot apply to linus/master v4.16-rc6 next-20180323]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Ioana-Ciornei/bus-fsl-mc-enhance-Management-Complex-userspace-support/20180325-034313
config: i386-tinyconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All warnings (new ones prefixed by >>):

>> ./usr/include/linux/fsl_mc.h:19: found __[us]{8,16,32,64} type without 
>> #include 

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


[PATCH v3 1/4] bus: fsl-mc: move fsl_mc_command struct in a uapi header

2018-03-23 Thread Ioana Ciornei
Define "struct fsl_mc_command" as a structure that can cross the
user/kernel boundary. Also change the variable types used with
the proper ones.

Signed-off-by: Ioana Ciornei 
---
Changes in v2:
  - added the patch itself
Changes in v3:
  - added the correct license for UAPI files

 MAINTAINERS |  1 +
 include/linux/fsl/mc.h  |  8 +---
 include/uapi/linux/fsl_mc.h | 23 +++
 3 files changed, 25 insertions(+), 7 deletions(-)
 create mode 100644 include/uapi/linux/fsl_mc.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 61fd418..861cf1d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -11485,6 +11485,7 @@ S:  Maintained
 F: drivers/bus/fsl-mc/
 F: Documentation/devicetree/bindings/misc/fsl,qoriq-mc.txt
 F: Documentation/networking/dpaa2/overview.rst
+F: include/uapi/linux/fsl_mc.h
 
 QT1010 MEDIA DRIVER
 M: Antti Palosaari 
diff --git a/include/linux/fsl/mc.h b/include/linux/fsl/mc.h
index f27cb14..19a352b 100644
--- a/include/linux/fsl/mc.h
+++ b/include/linux/fsl/mc.h
@@ -12,6 +12,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #define FSL_MC_VENDOR_FREESCALE0x1957
 
@@ -198,8 +199,6 @@ struct fsl_mc_device {
 #define to_fsl_mc_device(_dev) \
container_of(_dev, struct fsl_mc_device, dev)
 
-#define MC_CMD_NUM_OF_PARAMS   7
-
 struct mc_cmd_header {
u8 src_id;
u8 flags_hw;
@@ -209,11 +208,6 @@ struct mc_cmd_header {
__le16 cmd_id;
 };
 
-struct fsl_mc_command {
-   u64 header;
-   u64 params[MC_CMD_NUM_OF_PARAMS];
-};
-
 enum mc_cmd_status {
MC_CMD_STATUS_OK = 0x0, /* Completed successfully */
MC_CMD_STATUS_READY = 0x1, /* Ready to be processed */
diff --git a/include/uapi/linux/fsl_mc.h b/include/uapi/linux/fsl_mc.h
new file mode 100644
index 000..54590a2
--- /dev/null
+++ b/include/uapi/linux/fsl_mc.h
@@ -0,0 +1,23 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+/*
+ * Management Complex (MC) userspace public interface
+ *
+ * Copyright 2018 NXP
+ *
+ */
+#ifndef _UAPI_FSL_MC_H_
+#define _UAPI_FSL_MC_H_
+
+#define MC_CMD_NUM_OF_PARAMS   7
+
+/**
+ * struct fsl_mc_command - Management Complex (MC) command structure
+ * @header: MC command header
+ * @params: MC command parameters
+ */
+struct fsl_mc_command {
+   __u64 header;
+   __u64 params[MC_CMD_NUM_OF_PARAMS];
+};
+
+#endif /* _UAPI_FSL_MC_H_ */
-- 
1.9.1