Skip to contentSkip to conversation

codafs: Fix build using bare-metal toolchain

PATCH Superseded Sam Protsenko 4 participants 10 messages Oct 29, 2018 – Nov 26, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 codafs: Fix build using bare-metal toolchain

The kernel is self-contained project and can be built with bare-metal toolchain. But bare-metal toolchain doesn't define __linux__. Because of this u_quad_t type is not defined when using bare-metal toolchain and codafs build fails. This patch fixes it by defining u_quad_t type unconditionally.

---
 include/linux/coda.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
include/linux/coda.h +1 -2
index d30209b9cef8..0ca0c83fdb1c 100644
@@ -58,8 +58,7 @@ Mellon the rights to redistribute these changes without encumbrance.
 #ifndef _CODA_HEADER_
 #define _CODA_HEADER_
 
-#if defined(__linux__)
 typedef unsigned long long u_quad_t;
-#endif
+
 #include <uapi/linux/coda.h>
 #endif 
Signature · 1 line
2.19.1
#1 lore raw

Hi Greg,

Quoted 8 lines · Sam Protsenko

The kernel is self-contained project and can be built with bare-metal toolchain. But bare-metal toolchain doesn't define __linux__. Because of this u_quad_t type is not defined when using bare-metal toolchain and codafs build fails. This patch fixes it by defining u_quad_t type unconditionally.

---

Can you please pull this one, if this applicable? I sent it a while ago, but I guess it got lost in mailing list. It might be also applicable to stable branch (as it fixes allmodconfig build for ARM with bare-metal toolchain).

Thanks!

Quoted 20 lines
 include/linux/coda.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
include/linux/coda.h +1 -3
index d30209b9cef8..0ca0c83fdb1c 100644
@@ -58,8 +58,7 @@ Mellon the rights to redistribute these changes without encumbrance.
 #ifndef _CODA_HEADER_
 #define _CODA_HEADER_
 
-#if defined(__linux__)
 typedef unsigned long long u_quad_t;
-#endif
+
 #include <uapi/linux/coda.h>
 #endif
--

2.19.1

#2 lore raw
Cc Arnd, I guess it might be useful for kernel-ci activity as well.
Quoted 41 lines · Sam Protsenko

Hi Greg,

Quoted 8 lines · Sam Protsenko

The kernel is self-contained project and can be built with bare-metal toolchain. But bare-metal toolchain doesn't define __linux__. Because of this u_quad_t type is not defined when using bare-metal toolchain and codafs build fails. This patch fixes it by defining u_quad_t type unconditionally.

---

Can you please pull this one, if this applicable? I sent it a while ago, but I guess it got lost in mailing list. It might be also applicable to stable branch (as it fixes allmodconfig build for ARM with bare-metal toolchain).

Thanks!

Quoted 20 lines
 include/linux/coda.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
include/linux/coda.h +1 -3
index d30209b9cef8..0ca0c83fdb1c 100644
@@ -58,8 +58,7 @@ Mellon the rights to redistribute these changes without encumbrance.
 #ifndef _CODA_HEADER_
 #define _CODA_HEADER_
 
-#if defined(__linux__)
 typedef unsigned long long u_quad_t;
-#endif
+
 #include <uapi/linux/coda.h>
 #endif
--

2.19.1

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#3 lore raw
In reply to Sam Protsenko
Quoted 10 lines · Sam Protsenko

Hi Greg,

Quoted 6 lines · Sam Protsenko

The kernel is self-contained project and can be built with bare-metal toolchain. But bare-metal toolchain doesn't define __linux__. Because of this u_quad_t type is not defined when using bare-metal toolchain and codafs build fails. This patch fixes it by defining u_quad_t type unconditionally.

Quoted 7 lines
Quoted 2 lines

---

Can you please pull this one, if this applicable? I sent it a while ago, but I guess it got lost in mailing list. It might be also applicable to stable branch (as it fixes allmodconfig build for ARM with bare-metal toolchain).

Why are you asking me? I'm not the maintainer of this file :(

confused,

greg k-h

#4 lore raw
Quoted 14 lines · Greg KH
Quoted 13 lines · Sam Protsenko

Hi Greg,

Quoted 8 lines · Sam Protsenko

The kernel is self-contained project and can be built with bare-metal toolchain. But bare-metal toolchain doesn't define __linux__. Because of this u_quad_t type is not defined when using bare-metal toolchain and codafs build fails. This patch fixes it by defining u_quad_t type unconditionally.

---

Quoted 9 lines
Quoted 4 lines

Can you please pull this one, if this applicable? I sent it a while ago, but I guess it got lost in mailing list. It might be also applicable to stable branch (as it fixes allmodconfig build for ARM with bare-metal toolchain).

Why are you asking me? I'm not the maintainer of this file :(

confused,

Sorry to bother you. I just thought you might be interested in this one, as it fixes build for "allmodconfig" configuration, hence it can be related to stable branch. Also, maintainers didn't respond to that patch, so I'm kinda dead in the water.

Anyway, will try to ping maintainers one more time.

Quoted 1 line

greg k-h

maintainer
#5 lore raw
Quoted 25 lines · Sam Protsenko
Quoted 14 lines · Greg KH
Quoted 13 lines · Sam Protsenko

Hi Greg,

Quoted 8 lines · Sam Protsenko

The kernel is self-contained project and can be built with bare-metal toolchain. But bare-metal toolchain doesn't define __linux__. Because of this u_quad_t type is not defined when using bare-metal toolchain and codafs build fails. This patch fixes it by defining u_quad_t type unconditionally.

---

Quoted 9 lines
Quoted 4 lines

Can you please pull this one, if this applicable? I sent it a while ago, but I guess it got lost in mailing list. It might be also applicable to stable branch (as it fixes allmodconfig build for ARM with bare-metal toolchain).

Why are you asking me? I'm not the maintainer of this file :(

confused,

Quoted 6 lines

Sorry to bother you. I just thought you might be interested in this one, as it fixes build for "allmodconfig" configuration, hence it can be related to stable branch. Also, maintainers didn't respond to that patch, so I'm kinda dead in the water.

Anyway, will try to ping maintainers one more time.

I thought I had responded, I didn't see a reason why one would want to compile non-userspace kernel headers outside of the context of the kernel and if you do have to do that why not just add -D__linux__.

However, I can also see the point that anything not in uapi/ pretty much by definition will be compiled with __linux__ defined so it actually doesn't make a discernable difference to just drop the ifdef and I'm fine with a patch like this.

These trivial patches typically get picked up through kernel janitors, or maybe an akpm linux-next patch queue. In fact, I'm not even sure if there is a designated person I would be passing updates to, I've sent patches to akpm, viro, hellwig, linus, and gregkh at various times.

Jan

#6 lore raw
Quoted 42 lines · Jan Harkes
Quoted 25 lines · Sam Protsenko
Quoted 14 lines · Greg KH
Quoted 13 lines · Sam Protsenko

Hi Greg,

Quoted 8 lines · Sam Protsenko

The kernel is self-contained project and can be built with bare-metal toolchain. But bare-metal toolchain doesn't define __linux__. Because of this u_quad_t type is not defined when using bare-metal toolchain and codafs build fails. This patch fixes it by defining u_quad_t type unconditionally.

---

Quoted 9 lines
Quoted 4 lines

Can you please pull this one, if this applicable? I sent it a while ago, but I guess it got lost in mailing list. It might be also applicable to stable branch (as it fixes allmodconfig build for ARM with bare-metal toolchain).

Why are you asking me? I'm not the maintainer of this file :(

confused,

Quoted 6 lines

Sorry to bother you. I just thought you might be interested in this one, as it fixes build for "allmodconfig" configuration, hence it can be related to stable branch. Also, maintainers didn't respond to that patch, so I'm kinda dead in the water.

Anyway, will try to ping maintainers one more time.

I thought I had responded, I didn't see a reason why one would want to compile non-userspace kernel headers outside of the context of the kernel and if you do have to do that why not just add -D__linux__.

However, I can also see the point that anything not in uapi/ pretty much by definition will be compiled with __linux__ defined so it actually doesn't make a discernable difference to just drop the ifdef and I'm fine with a patch like this.

Quoted 6 lines

These trivial patches typically get picked up through kernel janitors, or maybe an akpm linux-next patch queue. In fact, I'm not even sure if there is a designated person I would be passing updates to, I've sent patches to akpm, viro, hellwig, linus, and gregkh at various times.

Jan

Hi Jan,

Thank you for the reply. Good point, I will try to re-send this one to Andrew Morton and kernel-janitors.

P.S. We need this patch for fixing LKFT/ci-loops build.

Thanks!

#7 lore raw
Quoted 3 lines · Sam Protsenko
Quoted 1 line · Jan Harkes

I thought I had responded

I don't see your response either previously or now (currently only via Sam's reply), perhaps you have an issue with mail delivery?

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#8 lore raw
In reply to Jan Harkes
Quoted 27 lines · Jan Harkes
Quoted 25 lines · Sam Protsenko
Quoted 23 lines · Greg KH
Quoted 10 lines · Sam Protsenko

Hi Greg,

Quoted 6 lines · Sam Protsenko

The kernel is self-contained project and can be built with bare-metal toolchain. But bare-metal toolchain doesn't define __linux__. Because of this u_quad_t type is not defined when using bare-metal toolchain and codafs build fails. This patch fixes it by defining u_quad_t type unconditionally.

Quoted 7 lines
Quoted 2 lines

---

Can you please pull this one, if this applicable? I sent it a while ago, but I guess it got lost in mailing list. It might be also applicable to stable branch (as it fixes allmodconfig build for ARM with bare-metal toolchain).

Why are you asking me? I'm not the maintainer of this file :(

confused,

Quoted 8 lines
Quoted 6 lines

Sorry to bother you. I just thought you might be interested in this one, as it fixes build for "allmodconfig" configuration, hence it can be related to stable branch. Also, maintainers didn't respond to that patch, so I'm kinda dead in the water.

Anyway, will try to ping maintainers one more time.

I thought I had responded,

Oh, this one also was in Spam.

Quoted 9 lines

I didn't see a reason why one would want to
compile non-userspace kernel headers outside of the context of the kernel and if you do have to do that why not just add -D__linux__.

However, I can also see the point that anything not in uapi/ pretty much by definition will be compiled with __linux__ defined so it actually doesn't make a discernable difference to just drop the ifdef and I'm fine with a patch like this.

Quoted 4 lines

These trivial patches typically get picked up through kernel janitors, or maybe an akpm linux-next patch queue. In fact, I'm not even sure if there is a designated person I would be passing updates to, I've sent patches to akpm, viro, hellwig, linus, and gregkh at various times.

% scripts/get_maintainer.pl -f include/linux/coda.h Jan Harkes <[email protected]> (maintainer:CODA FILE SYSTEM) [email protected] (maintainer:CODA FILE SYSTEM) [email protected] (open list:CODA FILE SYSTEM) [email protected] (open list)

Aren't you a maintainer?

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#9 lore raw

Andy, btw, I'm observing some strange mail thread behavior here. I'm pretty sure you responded to Jan, but he's not in the recipient list in your last mail. If you check Jan's mail (the one you responded to), you can notice new "reply-to" field (or "Mail-Followup-To:", in raw mail). When you respond to his mail, you respond to that list. But Jan is not in that list. That may be the cause of confusion we're seeing here.

Anyway, mail settings aside, I'm glad this patch has found its way to upstream. Thanks everyone.

Quoted 65 lines · Andy Shevchenko
Quoted 27 lines · Jan Harkes
Quoted 25 lines · Sam Protsenko
Quoted 23 lines · Greg KH
Quoted 10 lines · Sam Protsenko

Hi Greg,

Quoted 6 lines · Sam Protsenko

The kernel is self-contained project and can be built with bare-metal toolchain. But bare-metal toolchain doesn't define __linux__. Because of this u_quad_t type is not defined when using bare-metal toolchain and codafs build fails. This patch fixes it by defining u_quad_t type unconditionally.

Quoted 7 lines
Quoted 2 lines

---

Can you please pull this one, if this applicable? I sent it a while ago, but I guess it got lost in mailing list. It might be also applicable to stable branch (as it fixes allmodconfig build for ARM with bare-metal toolchain).

Why are you asking me? I'm not the maintainer of this file :(

confused,

Quoted 8 lines
Quoted 6 lines

Sorry to bother you. I just thought you might be interested in this one, as it fixes build for "allmodconfig" configuration, hence it can be related to stable branch. Also, maintainers didn't respond to that patch, so I'm kinda dead in the water.

Anyway, will try to ping maintainers one more time.

I thought I had responded,

Oh, this one also was in Spam.

Quoted 9 lines

I didn't see a reason why one would want to
compile non-userspace kernel headers outside of the context of the kernel and if you do have to do that why not just add -D__linux__.

However, I can also see the point that anything not in uapi/ pretty much by definition will be compiled with __linux__ defined so it actually doesn't make a discernable difference to just drop the ifdef and I'm fine with a patch like this.

Quoted 4 lines

These trivial patches typically get picked up through kernel janitors, or maybe an akpm linux-next patch queue. In fact, I'm not even sure if there is a designated person I would be passing updates to, I've sent patches to akpm, viro, hellwig, linus, and gregkh at various times.

% scripts/get_maintainer.pl -f include/linux/coda.h Jan Harkes <[email protected]> (maintainer:CODA FILE SYSTEM) [email protected] (maintainer:CODA FILE SYSTEM) [email protected] (open list:CODA FILE SYSTEM) [email protected] (open list)

Aren't you a maintainer?

--
With Best Regards,
Andy Shevchenko