linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix allmodconfig build with bare-metal toolchain
@ 2018-08-28 14:24 Sam Protsenko
  2018-08-28 14:24 ` [PATCH 1/2] codafs: Fix build using " Sam Protsenko
  2018-08-28 14:24 ` [PATCH 2/2] scsi: aic7xxx: " Sam Protsenko
  0 siblings, 2 replies; 9+ messages in thread
From: Sam Protsenko @ 2018-08-28 14:24 UTC (permalink / raw)
  To: linux-kernel, linux-scsi, codalist, coda
  Cc: Jan Harkes, James E.J. Bottomley, Martin K. Petersen,
	Praneeth Bajjuri, Paul Sokolovsky, Miklos Szeredi, Sumit Semwal,
	Ruslan Bilovol, Andy Shevchenko

Attempt to build allmodconfig (for ARM platforms) using bare-metal
toolchain fails with errors related to __linux__ definition. It's only
defined on Linux toolchains, but not defined on bare-metal toolchains.
This patch series fixes that.

Some similar patches (for different files) were applied previously:
  - commit 4c82456eeb4d ("fuse: fix type definitions in uapi header")
  - commit b6330548383c ("drm.h: Fix DRM compilation with bare-metal
toolchain.")

Sam Protsenko (2):
  codafs: Fix build using bare-metal toolchain
  scsi: aic7xxx: Fix build using bare-metal toolchain

 drivers/scsi/aic7xxx/aic7770.c                  |  2 +-
 drivers/scsi/aic7xxx/aic79xx.h                  |  4 ++--
 drivers/scsi/aic7xxx/aic79xx_core.c             | 12 ++++++------
 drivers/scsi/aic7xxx/aic79xx_pci.c              |  2 +-
 drivers/scsi/aic7xxx/aic7xxx.h                  |  4 ++--
 drivers/scsi/aic7xxx/aic7xxx_93cx6.c            |  2 +-
 drivers/scsi/aic7xxx/aic7xxx_core.c             | 12 ++++++------
 drivers/scsi/aic7xxx/aic7xxx_pci.c              |  2 +-
 drivers/scsi/aic7xxx/aicasm/aicasm.h            |  2 +-
 drivers/scsi/aic7xxx/aicasm/aicasm_gram.y       |  2 +-
 drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.y |  2 +-
 drivers/scsi/aic7xxx/aicasm/aicasm_macro_scan.l |  2 +-
 drivers/scsi/aic7xxx/aicasm/aicasm_scan.l       |  2 +-
 drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c     |  2 +-
 drivers/scsi/aic7xxx/aicasm/aicasm_symbol.h     |  2 +-
 include/uapi/linux/coda.h                       |  5 +++++
 16 files changed, 32 insertions(+), 27 deletions(-)

-- 
2.18.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/2] codafs: Fix build using bare-metal toolchain
  2018-08-28 14:24 [PATCH 0/2] Fix allmodconfig build with bare-metal toolchain Sam Protsenko
@ 2018-08-28 14:24 ` Sam Protsenko
  2018-08-28 17:03   ` Andy Shevchenko
  2018-08-29  6:33   ` Christoph Hellwig
  2018-08-28 14:24 ` [PATCH 2/2] scsi: aic7xxx: " Sam Protsenko
  1 sibling, 2 replies; 9+ messages in thread
From: Sam Protsenko @ 2018-08-28 14:24 UTC (permalink / raw)
  To: linux-kernel, linux-scsi, codalist, coda
  Cc: Jan Harkes, James E.J. Bottomley, Martin K. Petersen,
	Praneeth Bajjuri, Paul Sokolovsky, Miklos Szeredi, Sumit Semwal,
	Ruslan Bilovol, Andy Shevchenko

The kernel is self-contained project and can be built with bare-metal
toolchain. But bare-metal toolchain doesn't define u_quad_t type.
Because of this codafs build fails when building with bare-metal
toolchain. This patch fixes it by defining u_quad_t type in case when
non-Linux toolchain is used.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
---
 include/uapi/linux/coda.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/uapi/linux/coda.h b/include/uapi/linux/coda.h
index 695fade33c64..098a6c318b0a 100644
--- a/include/uapi/linux/coda.h
+++ b/include/uapi/linux/coda.h
@@ -96,6 +96,11 @@ typedef unsigned long long u_quad_t;
 #endif /* !KERNEL */
 #endif /* !DJGPP */
 
+/* Handle bare-metal toolchain case */
+#if defined(__KERNEL__) && !defined(__linux__) && !defined(_UQUAD_T_) && \
+!defined(__UQUAD_TYPE)
+typedef unsigned long long u_quad_t;
+#endif
 
 #if defined(__linux__)
 #include <linux/time.h>
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/2] scsi: aic7xxx: Fix build using bare-metal toolchain
  2018-08-28 14:24 [PATCH 0/2] Fix allmodconfig build with bare-metal toolchain Sam Protsenko
  2018-08-28 14:24 ` [PATCH 1/2] codafs: Fix build using " Sam Protsenko
@ 2018-08-28 14:24 ` Sam Protsenko
  2018-08-29  6:32   ` Christoph Hellwig
  1 sibling, 1 reply; 9+ messages in thread
From: Sam Protsenko @ 2018-08-28 14:24 UTC (permalink / raw)
  To: linux-kernel, linux-scsi, codalist, coda
  Cc: Jan Harkes, James E.J. Bottomley, Martin K. Petersen,
	Praneeth Bajjuri, Paul Sokolovsky, Miklos Szeredi, Sumit Semwal,
	Ruslan Bilovol, Andy Shevchenko

Bare-metal toolchains don't define __linux__, so aic7xxx build with
bare-metal toolchain is broken. Let's check __KERNEL__ definition
instead of __linux__ (as this code won't be build for user-space anyway)
in order to fix that.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
---
 drivers/scsi/aic7xxx/aic7770.c                  |  2 +-
 drivers/scsi/aic7xxx/aic79xx.h                  |  4 ++--
 drivers/scsi/aic7xxx/aic79xx_core.c             | 12 ++++++------
 drivers/scsi/aic7xxx/aic79xx_pci.c              |  2 +-
 drivers/scsi/aic7xxx/aic7xxx.h                  |  4 ++--
 drivers/scsi/aic7xxx/aic7xxx_93cx6.c            |  2 +-
 drivers/scsi/aic7xxx/aic7xxx_core.c             | 12 ++++++------
 drivers/scsi/aic7xxx/aic7xxx_pci.c              |  2 +-
 drivers/scsi/aic7xxx/aicasm/aicasm.h            |  2 +-
 drivers/scsi/aic7xxx/aicasm/aicasm_gram.y       |  2 +-
 drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.y |  2 +-
 drivers/scsi/aic7xxx/aicasm/aicasm_macro_scan.l |  2 +-
 drivers/scsi/aic7xxx/aicasm/aicasm_scan.l       |  2 +-
 drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c     |  2 +-
 drivers/scsi/aic7xxx/aicasm/aicasm_symbol.h     |  2 +-
 15 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/drivers/scsi/aic7xxx/aic7770.c b/drivers/scsi/aic7xxx/aic7770.c
index 5000bd69c13f..b117992f8c04 100644
--- a/drivers/scsi/aic7xxx/aic7770.c
+++ b/drivers/scsi/aic7xxx/aic7770.c
@@ -42,7 +42,7 @@
  * $FreeBSD$
  */
 
-#ifdef __linux__
+#ifdef __KERNEL__
 #include "aic7xxx_osm.h"
 #include "aic7xxx_inline.h"
 #include "aic7xxx_93cx6.h"
diff --git a/drivers/scsi/aic7xxx/aic79xx.h b/drivers/scsi/aic7xxx/aic79xx.h
index 31f2bb9d7146..6226276770eb 100644
--- a/drivers/scsi/aic7xxx/aic79xx.h
+++ b/drivers/scsi/aic7xxx/aic79xx.h
@@ -607,7 +607,7 @@ struct scb {
 	ahd_io_ctx_t		  io_ctx;
 	struct ahd_softc	 *ahd_softc;
 	scb_flag		  flags;
-#ifndef __linux__
+#ifndef __KERNEL__
 	bus_dmamap_t		  dmamap;
 #endif
 	struct scb_platform_data *platform_data;
@@ -1056,7 +1056,7 @@ struct ahd_completion
 struct ahd_softc {
 	bus_space_tag_t           tags[2];
 	bus_space_handle_t        bshs[2];
-#ifndef __linux__
+#ifndef __KERNEL__
 	bus_dma_tag_t		  buffer_dmat;   /* dmat for buffer I/O */
 #endif
 	struct scb_data		  scb_data;
diff --git a/drivers/scsi/aic7xxx/aic79xx_core.c b/drivers/scsi/aic7xxx/aic79xx_core.c
index 2d82ec85753e..8580cec85902 100644
--- a/drivers/scsi/aic7xxx/aic79xx_core.c
+++ b/drivers/scsi/aic7xxx/aic79xx_core.c
@@ -40,7 +40,7 @@
  * $Id: //depot/aic7xxx/aic7xxx/aic79xx.c#250 $
  */
 
-#ifdef __linux__
+#ifdef __KERNEL__
 #include "aic79xx_osm.h"
 #include "aic79xx_inline.h"
 #include "aicasm/aicasm_insformat.h"
@@ -6172,7 +6172,7 @@ ahd_free(struct ahd_softc *ahd)
 	case 2:
 		ahd_dma_tag_destroy(ahd, ahd->shared_data_dmat);
 	case 1:
-#ifndef __linux__
+#ifndef __KERNEL__
 		ahd_dma_tag_destroy(ahd, ahd->buffer_dmat);
 #endif
 		break;
@@ -6180,7 +6180,7 @@ ahd_free(struct ahd_softc *ahd)
 		break;
 	}
 
-#ifndef __linux__
+#ifndef __KERNEL__
 	ahd_dma_tag_destroy(ahd, ahd->parent_dmat);
 #endif
 	ahd_platform_free(ahd);
@@ -6934,7 +6934,7 @@ ahd_alloc_scbs(struct ahd_softc *ahd)
 	for (i = 0; i < newcount; i++) {
 		struct scb_platform_data *pdata;
 		u_int col_tag;
-#ifndef __linux__
+#ifndef __KERNEL__
 		int error;
 #endif
 
@@ -6970,7 +6970,7 @@ ahd_alloc_scbs(struct ahd_softc *ahd)
 			next_scb->sg_list_busaddr += sizeof(struct ahd_dma_seg);
 		next_scb->ahd_softc = ahd;
 		next_scb->flags = SCB_FLAG_NONE;
-#ifndef __linux__
+#ifndef __KERNEL__
 		error = ahd_dmamap_create(ahd, ahd->buffer_dmat, /*flags*/0,
 					  &next_scb->dmamap);
 		if (error != 0) {
@@ -7091,7 +7091,7 @@ ahd_init(struct ahd_softc *ahd)
 	if ((AHD_TMODE_ENABLE & (0x1 << ahd->unit)) == 0)
 		ahd->features &= ~AHD_TARGETMODE;
 
-#ifndef __linux__
+#ifndef __KERNEL__
 	/* DMA tag for mapping buffers into device visible space. */
 	if (ahd_dma_tag_create(ahd, ahd->parent_dmat, /*alignment*/1,
 			       /*boundary*/BUS_SPACE_MAXADDR_32BIT + 1,
diff --git a/drivers/scsi/aic7xxx/aic79xx_pci.c b/drivers/scsi/aic7xxx/aic79xx_pci.c
index cc9bd26f5d1a..573a9aae51da 100644
--- a/drivers/scsi/aic7xxx/aic79xx_pci.c
+++ b/drivers/scsi/aic7xxx/aic79xx_pci.c
@@ -41,7 +41,7 @@
  * $Id: //depot/aic7xxx/aic7xxx/aic79xx_pci.c#92 $
  */
 
-#ifdef __linux__
+#ifdef __KERNEL__
 #include "aic79xx_osm.h"
 #include "aic79xx_inline.h"
 #else
diff --git a/drivers/scsi/aic7xxx/aic7xxx.h b/drivers/scsi/aic7xxx/aic7xxx.h
index 4ce4e903a759..aa42f3ef79e5 100644
--- a/drivers/scsi/aic7xxx/aic7xxx.h
+++ b/drivers/scsi/aic7xxx/aic7xxx.h
@@ -568,7 +568,7 @@ struct scb {
 	ahc_io_ctx_t		  io_ctx;
 	struct ahc_softc	 *ahc_softc;
 	scb_flag		  flags;
-#ifndef __linux__
+#ifndef __KERNEL__
 	bus_dmamap_t		  dmamap;
 #endif
 	struct scb_platform_data *platform_data;
@@ -906,7 +906,7 @@ typedef void ahc_callback_t (void *);
 struct ahc_softc {
 	bus_space_tag_t           tag;
 	bus_space_handle_t        bsh;
-#ifndef __linux__
+#ifndef __KERNEL__
 	bus_dma_tag_t		  buffer_dmat;   /* dmat for buffer I/O */
 #endif
 	struct scb_data		 *scb_data;
diff --git a/drivers/scsi/aic7xxx/aic7xxx_93cx6.c b/drivers/scsi/aic7xxx/aic7xxx_93cx6.c
index 9e85a7ef9c8e..434a4bfc6309 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_93cx6.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_93cx6.c
@@ -64,7 +64,7 @@
  *   bit to be sent from the chip.
  */
 
-#ifdef __linux__
+#ifdef __KERNEL__
 #include "aic7xxx_osm.h"
 #include "aic7xxx_inline.h"
 #include "aic7xxx_93cx6.h"
diff --git a/drivers/scsi/aic7xxx/aic7xxx_core.c b/drivers/scsi/aic7xxx/aic7xxx_core.c
index 915a34f141e4..67aa18982c7e 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_core.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_core.c
@@ -40,7 +40,7 @@
  * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.c#155 $
  */
 
-#ifdef __linux__
+#ifdef __KERNEL__
 #include "aic7xxx_osm.h"
 #include "aic7xxx_inline.h"
 #include "aicasm/aicasm_insformat.h"
@@ -4509,7 +4509,7 @@ ahc_free(struct ahc_softc *ahc)
 	case 2:
 		ahc_dma_tag_destroy(ahc, ahc->shared_data_dmat);
 	case 1:
-#ifndef __linux__
+#ifndef __KERNEL__
 		ahc_dma_tag_destroy(ahc, ahc->buffer_dmat);
 #endif
 		break;
@@ -4517,7 +4517,7 @@ ahc_free(struct ahc_softc *ahc)
 		break;
 	}
 
-#ifndef __linux__
+#ifndef __KERNEL__
 	ahc_dma_tag_destroy(ahc, ahc->parent_dmat);
 #endif
 	ahc_platform_free(ahc);
@@ -5005,7 +5005,7 @@ ahc_alloc_scbs(struct ahc_softc *ahc)
 	newcount = min(newcount, (AHC_SCB_MAX_ALLOC - scb_data->numscbs));
 	for (i = 0; i < newcount; i++) {
 		struct scb_platform_data *pdata;
-#ifndef __linux__
+#ifndef __KERNEL__
 		int error;
 #endif
 		pdata = kmalloc(sizeof(*pdata), GFP_ATOMIC);
@@ -5021,7 +5021,7 @@ ahc_alloc_scbs(struct ahc_softc *ahc)
 		next_scb->sg_list_phys = physaddr + sizeof(struct ahc_dma_seg);
 		next_scb->ahc_softc = ahc;
 		next_scb->flags = SCB_FREE;
-#ifndef __linux__
+#ifndef __KERNEL__
 		error = ahc_dmamap_create(ahc, ahc->buffer_dmat, /*flags*/0,
 					  &next_scb->dmamap);
 		if (error != 0)
@@ -5325,7 +5325,7 @@ ahc_init(struct ahc_softc *ahc)
 	if ((AHC_TMODE_ENABLE & (0x1 << ahc->unit)) == 0)
 		ahc->features &= ~AHC_TARGETMODE;
 
-#ifndef __linux__
+#ifndef __KERNEL__
 	/* DMA tag for mapping buffers into device visible space. */
 	if (ahc_dma_tag_create(ahc, ahc->parent_dmat, /*alignment*/1,
 			       /*boundary*/BUS_SPACE_MAXADDR_32BIT + 1,
diff --git a/drivers/scsi/aic7xxx/aic7xxx_pci.c b/drivers/scsi/aic7xxx/aic7xxx_pci.c
index 673e826d7adb..83b72efbb6a6 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_pci.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_pci.c
@@ -42,7 +42,7 @@
  * $Id: //depot/aic7xxx/aic7xxx/aic7xxx_pci.c#79 $
  */
 
-#ifdef __linux__
+#ifdef __KERNEL__
 #include "aic7xxx_osm.h"
 #include "aic7xxx_inline.h"
 #include "aic7xxx_93cx6.h"
diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm.h b/drivers/scsi/aic7xxx/aicasm/aicasm.h
index 51678dd46ff7..3465603e41ca 100644
--- a/drivers/scsi/aic7xxx/aicasm/aicasm.h
+++ b/drivers/scsi/aic7xxx/aicasm/aicasm.h
@@ -42,7 +42,7 @@
  * $FreeBSD$
  */
 
-#ifdef __linux__
+#ifdef __KERNEL__
 #include "../queue.h"
 #else
 #include <sys/queue.h>
diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y b/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y
index f1586a437906..403bc9c5d739 100644
--- a/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y
+++ b/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y
@@ -52,7 +52,7 @@
 #include <string.h>
 #include <sysexits.h>
 
-#ifdef __linux__
+#ifdef __KERNEL__
 #include "../queue.h"
 #else
 #include <sys/queue.h>
diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.y b/drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.y
index 708326df0766..695f45e0a995 100644
--- a/drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.y
+++ b/drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.y
@@ -52,7 +52,7 @@
 #include <string.h>
 #include <sysexits.h>
 
-#ifdef __linux__
+#ifdef __KERNEL__
 #include "../queue.h"
 #else
 #include <sys/queue.h>
diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_macro_scan.l b/drivers/scsi/aic7xxx/aicasm/aicasm_macro_scan.l
index c0457b8c3b77..cfff11d80378 100644
--- a/drivers/scsi/aic7xxx/aicasm/aicasm_macro_scan.l
+++ b/drivers/scsi/aic7xxx/aicasm/aicasm_macro_scan.l
@@ -51,7 +51,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <sysexits.h>
-#ifdef __linux__
+#ifdef __KERNEL__
 #include "../queue.h"
 #else
 #include <sys/queue.h>
diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_scan.l b/drivers/scsi/aic7xxx/aicasm/aicasm_scan.l
index 93c8667cd704..e9f6005431b1 100644
--- a/drivers/scsi/aic7xxx/aicasm/aicasm_scan.l
+++ b/drivers/scsi/aic7xxx/aicasm/aicasm_scan.l
@@ -51,7 +51,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <sysexits.h>
-#ifdef __linux__
+#ifdef __KERNEL__
 #include "../queue.h"
 #else
 #include <sys/queue.h>
diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c b/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c
index 232aff1fe784..dad083fa3adb 100644
--- a/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c
+++ b/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c
@@ -44,7 +44,7 @@
 
 #include <sys/types.h>
 
-#ifdef __linux__
+#ifdef __KERNEL__
 #include "aicdb.h"
 #else
 #include <db.h>
diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.h b/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.h
index 34bbcad7f83f..530fb56d1c47 100644
--- a/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.h
+++ b/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.h
@@ -42,7 +42,7 @@
  * $FreeBSD$
  */
 
-#ifdef __linux__
+#ifdef __KERNEL__
 #include "../queue.h"
 #else
 #include <sys/queue.h>
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] codafs: Fix build using bare-metal toolchain
  2018-08-28 14:24 ` [PATCH 1/2] codafs: Fix build using " Sam Protsenko
@ 2018-08-28 17:03   ` Andy Shevchenko
  2018-08-28 17:07     ` Andy Shevchenko
  2018-08-29  6:33   ` Christoph Hellwig
  1 sibling, 1 reply; 9+ messages in thread
From: Andy Shevchenko @ 2018-08-28 17:03 UTC (permalink / raw)
  To: Sam Protsenko
  Cc: Linux Kernel Mailing List, linux-scsi, codalist, coda, jaharkes,
	James E . J . Bottomley, Martin K. Petersen, Praneeth Bajjuri,
	paul.sokolovsky, mszeredi, sumit.semwal, Ruslan Bilovol

On Tue, Aug 28, 2018 at 5:24 PM Sam Protsenko
<semen.protsenko@linaro.org> wrote:
>
> The kernel is self-contained project and can be built with bare-metal
> toolchain. But bare-metal toolchain doesn't define u_quad_t type.
> Because of this codafs build fails when building with bare-metal
> toolchain. This patch fixes it by defining u_quad_t type in case when
> non-Linux toolchain is used.

>  #endif /* !KERNEL */

I'm wondering what the heck KERNEL is doing in UAPI header.
Looks like this header is split wrongly in the first place.

> +#if defined(__KERNEL__) && !defined(__linux__) && !defined(_UQUAD_T_) && \

P.S. Actually it's the only header which uses KERNEL in UAPI.
Definitely it should be fixed first.

--
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] codafs: Fix build using bare-metal toolchain
  2018-08-28 17:03   ` Andy Shevchenko
@ 2018-08-28 17:07     ` Andy Shevchenko
  0 siblings, 0 replies; 9+ messages in thread
From: Andy Shevchenko @ 2018-08-28 17:07 UTC (permalink / raw)
  To: Sam Protsenko
  Cc: Linux Kernel Mailing List, linux-scsi, codalist, coda, jaharkes,
	James E . J . Bottomley, Martin K. Petersen, Praneeth Bajjuri,
	paul.sokolovsky, mszeredi, sumit.semwal, Ruslan Bilovol

On Tue, Aug 28, 2018 at 8:03 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:

> P.S. Actually it's the only header which uses KERNEL in UAPI.
> Definitely it should be fixed first.

Okay, it seems I missed __ parts. So, my statement above is wrong.

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] scsi: aic7xxx: Fix build using bare-metal toolchain
  2018-08-28 14:24 ` [PATCH 2/2] scsi: aic7xxx: " Sam Protsenko
@ 2018-08-29  6:32   ` Christoph Hellwig
  2018-08-29 14:01     ` Sam Protsenko
  0 siblings, 1 reply; 9+ messages in thread
From: Christoph Hellwig @ 2018-08-29  6:32 UTC (permalink / raw)
  To: Sam Protsenko
  Cc: linux-kernel, linux-scsi, codalist, coda, Jan Harkes,
	James E.J. Bottomley, Martin K. Petersen, Praneeth Bajjuri,
	Paul Sokolovsky, Miklos Szeredi, Sumit Semwal, Ruslan Bilovol,
	Andy Shevchenko

On Tue, Aug 28, 2018 at 05:24:21PM +0300, Sam Protsenko wrote:
> Bare-metal toolchains don't define __linux__, so aic7xxx build with
> bare-metal toolchain is broken. Let's check __KERNEL__ definition
> instead of __linux__ (as this code won't be build for user-space anyway)
> in order to fix that.

Please just drop the ifdefs entirely.  The codebase used to be partially
shared with at least FreeBSD, but these days there is no point in
keeping the compatibility around.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] codafs: Fix build using bare-metal toolchain
  2018-08-28 14:24 ` [PATCH 1/2] codafs: Fix build using " Sam Protsenko
  2018-08-28 17:03   ` Andy Shevchenko
@ 2018-08-29  6:33   ` Christoph Hellwig
  2018-08-29 14:03     ` Sam Protsenko
  1 sibling, 1 reply; 9+ messages in thread
From: Christoph Hellwig @ 2018-08-29  6:33 UTC (permalink / raw)
  To: Sam Protsenko
  Cc: linux-kernel, linux-scsi, codalist, coda, Jan Harkes,
	James E.J. Bottomley, Martin K. Petersen, Praneeth Bajjuri,
	Paul Sokolovsky, Miklos Szeredi, Sumit Semwal, Ruslan Bilovol,
	Andy Shevchenko

Please just drop the ifdef entirely.  The file is part of the kernel
tree and can't be used for anything non-Linux.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] scsi: aic7xxx: Fix build using bare-metal toolchain
  2018-08-29  6:32   ` Christoph Hellwig
@ 2018-08-29 14:01     ` Sam Protsenko
  0 siblings, 0 replies; 9+ messages in thread
From: Sam Protsenko @ 2018-08-29 14:01 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: linux-kernel, linux-scsi, codalist, coda, Jan Harkes,
	James E.J. Bottomley, Martin K. Petersen, Praneeth Bajjuri,
	Paul Sokolovsky, Miklos Szeredi, Sumit Semwal, Ruslan Bilovol,
	Andy Shevchenko

On Wed, Aug 29, 2018 at 9:32 AM, Christoph Hellwig <hch@infradead.org> wrote:
> On Tue, Aug 28, 2018 at 05:24:21PM +0300, Sam Protsenko wrote:
>> Bare-metal toolchains don't define __linux__, so aic7xxx build with
>> bare-metal toolchain is broken. Let's check __KERNEL__ definition
>> instead of __linux__ (as this code won't be build for user-space anyway)
>> in order to fix that.
>
> Please just drop the ifdefs entirely.  The codebase used to be partially
> shared with at least FreeBSD, but these days there is no point in
> keeping the compatibility around.

Thanks, Christoph. Will do in v2.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] codafs: Fix build using bare-metal toolchain
  2018-08-29  6:33   ` Christoph Hellwig
@ 2018-08-29 14:03     ` Sam Protsenko
  0 siblings, 0 replies; 9+ messages in thread
From: Sam Protsenko @ 2018-08-29 14:03 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: linux-kernel, linux-scsi, codalist, coda, Jan Harkes,
	James E.J. Bottomley, Martin K. Petersen, Praneeth Bajjuri,
	Paul Sokolovsky, Miklos Szeredi, Sumit Semwal, Ruslan Bilovol,
	Andy Shevchenko

On Wed, Aug 29, 2018 at 9:33 AM, Christoph Hellwig <hch@infradead.org> wrote:
> Please just drop the ifdef entirely.  The file is part of the kernel
> tree and can't be used for anything non-Linux.

I have better idea :) We can modify include/linux/coda.h instead, by
checking for __KERNEL__ (along with existing check for __linux__).
This way we can leave user-space API header alone. Don't know how come
I didn't notice that in the first place... Anyway, will send v2
shortly. Thanks for the review.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-08-29 14:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-28 14:24 [PATCH 0/2] Fix allmodconfig build with bare-metal toolchain Sam Protsenko
2018-08-28 14:24 ` [PATCH 1/2] codafs: Fix build using " Sam Protsenko
2018-08-28 17:03   ` Andy Shevchenko
2018-08-28 17:07     ` Andy Shevchenko
2018-08-29  6:33   ` Christoph Hellwig
2018-08-29 14:03     ` Sam Protsenko
2018-08-28 14:24 ` [PATCH 2/2] scsi: aic7xxx: " Sam Protsenko
2018-08-29  6:32   ` Christoph Hellwig
2018-08-29 14:01     ` Sam Protsenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).