Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1467899 > unrolled thread

[PATCH v05 47/72] include/uapi/linux/coda.h: use __kernel_pid_t and add u_short etc definitions for userspace

Started byMikko Rapeli <mikko.rapeli@iki.fi>
First post2016-08-22 20:40 +0200
Last post2016-08-23 23:00 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v05 47/72] include/uapi/linux/coda.h: use __kernel_pid_t and add u_short etc definitions for userspace Mikko Rapeli <mikko.rapeli@iki.fi> - 2016-08-22 20:40 +0200
    Re: [PATCH v05 47/72] include/uapi/linux/coda.h: use __kernel_pid_t  and add u_short etc definitions for userspace kbuild test robot <lkp@intel.com> - 2016-08-23 05:10 +0200
      Re: [PATCH v05 47/72] include/uapi/linux/coda.h: use __kernel_pid_t  and add u_short etc definitions for userspace Mikko Rapeli <mikko.rapeli@iki.fi> - 2016-08-23 23:00 +0200

#1467899 — [PATCH v05 47/72] include/uapi/linux/coda.h: use __kernel_pid_t and add u_short etc definitions for userspace

FromMikko Rapeli <mikko.rapeli@iki.fi>
Date2016-08-22 20:40 +0200
Subject[PATCH v05 47/72] include/uapi/linux/coda.h: use __kernel_pid_t and add u_short etc definitions for userspace
Message-ID<s92iC-1rh-19@gated-at.bofh.it>
Fixes userspace compilation errors about unknown pid_t, u_short etc types.

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/linux/coda.h | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/include/uapi/linux/coda.h b/include/uapi/linux/coda.h
index 695fade..fab3bd0 100644
--- a/include/uapi/linux/coda.h
+++ b/include/uapi/linux/coda.h
@@ -100,7 +100,14 @@ typedef unsigned long long u_quad_t;
 #if defined(__linux__)
 #include <linux/time.h>
 #define cdev_t u_quad_t
+typedef unsigned long u_long;
+typedef unsigned int u_int;
+typedef unsigned short u_short;
+typedef u_long ino_t;
+
 #ifndef __KERNEL__
+typedef u_long dev_t;
+typedef void *caddr_t;
 #if !defined(_UQUAD_T_) && (!defined(__GLIBC__) || __GLIBC__ < 2)
 #define _UQUAD_T_ 1
 typedef unsigned long long u_quad_t;
@@ -295,8 +302,8 @@ struct coda_statfs {
 struct coda_in_hdr {
     u_int32_t opcode;
     u_int32_t unique;	    /* Keep multiple outstanding msgs distinct */
-    pid_t pid;
-    pid_t pgid;
+    __kernel_pid_t pid;
+    __kernel_pid_t pgid;
     vuid_t uid;
 };
 
-- 
2.8.1

[toc] | [next] | [standalone]


#1468247 — Re: [PATCH v05 47/72] include/uapi/linux/coda.h: use __kernel_pid_t and add u_short etc definitions for userspace

Fromkbuild test robot <lkp@intel.com>
Date2016-08-23 05:10 +0200
SubjectRe: [PATCH v05 47/72] include/uapi/linux/coda.h: use __kernel_pid_t and add u_short etc definitions for userspace
Message-ID<s9ag9-6JY-11@gated-at.bofh.it>
In reply to#1467899

[Multipart message — attachments visible in raw view] — view raw

Hi Mikko,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.8-rc3]
[cannot apply to next-20160822]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on]
[Check https://git-scm.com/docs/git-format-patch for more information]

url:    https://github.com/0day-ci/linux/commits/Mikko-Rapeli/Userspace-compile-test-and-fixes-for-exported-uapi-header-files/20160823-034928
config: x86_64-randconfig-v0-08230740 (attached as .config)
compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   In file included from include/linux/coda.h:64,
                    from fs/coda/psdev.c:45:
>> include/uapi/linux/coda.h:103: error: redefinition of typedef 'u_long'
   include/linux/types.h:86: note: previous declaration of 'u_long' was here
>> include/uapi/linux/coda.h:104: error: redefinition of typedef 'u_int'
   include/linux/types.h:85: note: previous declaration of 'u_int' was here
>> include/uapi/linux/coda.h:105: error: redefinition of typedef 'u_short'
   include/linux/types.h:84: note: previous declaration of 'u_short' was here
>> include/uapi/linux/coda.h:106: error: redefinition of typedef 'ino_t'
   include/linux/types.h:16: note: previous declaration of 'ino_t' was here

vim +/u_long +103 include/uapi/linux/coda.h

    97	#endif /* !DJGPP */
    98	
    99	
   100	#if defined(__linux__)
   101	#include <linux/time.h>
   102	#define cdev_t u_quad_t
 > 103	typedef unsigned long u_long;
 > 104	typedef unsigned int u_int;
 > 105	typedef unsigned short u_short;
 > 106	typedef u_long ino_t;
   107	
   108	#ifndef __KERNEL__
   109	typedef u_long dev_t;

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

[toc] | [prev] | [next] | [standalone]


#1468844 — Re: [PATCH v05 47/72] include/uapi/linux/coda.h: use __kernel_pid_t and add u_short etc definitions for userspace

FromMikko Rapeli <mikko.rapeli@iki.fi>
Date2016-08-23 23:00 +0200
SubjectRe: [PATCH v05 47/72] include/uapi/linux/coda.h: use __kernel_pid_t and add u_short etc definitions for userspace
Message-ID<s9qXE-H7-3@gated-at.bofh.it>
In reply to#1468247
On Tue, Aug 23, 2016 at 11:08:06AM +0800, kbuild test robot wrote:
> Hi Mikko,
> 
> [auto build test ERROR on linus/master]
> [also build test ERROR on v4.8-rc3]
> [cannot apply to next-20160822]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
> [Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on]
> [Check https://git-scm.com/docs/git-format-patch for more information]
> 
> url:    https://github.com/0day-ci/linux/commits/Mikko-Rapeli/Userspace-compile-test-and-fixes-for-exported-uapi-header-files/20160823-034928
> config: x86_64-randconfig-v0-08230740 (attached as .config)
> compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7
> reproduce:
>         # save the attached .config to linux build tree
>         make ARCH=x86_64 
> 
> All errors (new ones prefixed by >>):
> 
>    In file included from include/linux/coda.h:64,
>                     from fs/coda/psdev.c:45:
> >> include/uapi/linux/coda.h:103: error: redefinition of typedef 'u_long'
>    include/linux/types.h:86: note: previous declaration of 'u_long' was here
> >> include/uapi/linux/coda.h:104: error: redefinition of typedef 'u_int'
>    include/linux/types.h:85: note: previous declaration of 'u_int' was here
> >> include/uapi/linux/coda.h:105: error: redefinition of typedef 'u_short'
>    include/linux/types.h:84: note: previous declaration of 'u_short' was here
> >> include/uapi/linux/coda.h:106: error: redefinition of typedef 'ino_t'
>    include/linux/types.h:16: note: previous declaration of 'ino_t' was here
> 
> vim +/u_long +103 include/uapi/linux/coda.h
> 
>     97	#endif /* !DJGPP */
>     98	
>     99	
>    100	#if defined(__linux__)
>    101	#include <linux/time.h>
>    102	#define cdev_t u_quad_t
>  > 103	typedef unsigned long u_long;
>  > 104	typedef unsigned int u_int;
>  > 105	typedef unsigned short u_short;
>  > 106	typedef u_long ino_t;

Thanks! I'll move these to #ifndef __KERNEL__ side and try to detect if
they are already defined by userspace headers.

-Mikko

>    107	
>    108	#ifndef __KERNEL__
>    109	typedef u_long dev_t;
> 
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web