diff mbox series

[3/4,v3] arc: fix data type errors in platform headers

Message ID 0d2870ef-ae4c-d9a8-c894-c4f252fae7da@infradead.org
State New
Headers show
Series None | expand

Commit Message

Randy Dunlap July 29, 2018, 6:10 p.m. UTC
On 07/29/2018 12:01 AM, Leon Romanovsky wrote:
> On Thu, Jul 26, 2018 at 08:16:35PM -0700, rd_dunlab wrote:
>> From: Randy Dunlap <rdunlap@infradead.org>
>>
>> Add <asm-generic/types.h> to fix build errors.
>> Both ctop.h and <soc/nps/common.h> use u32 types and cause many
>> errors.
>>
>> Examples:
>> ../include/soc/nps/common.h:71:4: error: unknown type name 'u32'
>>     u32 __reserved:20, cluster:4, core:4, thread:4;
>> ../include/soc/nps/common.h:76:3: error: unknown type name 'u32'
>>    u32 value;
>> ../include/soc/nps/common.h:124:4: error: unknown type name 'u32'
>>     u32 base:8, cl_x:4, cl_y:4,
>> ../include/soc/nps/common.h:127:3: error: unknown type name 'u32'
>>    u32 value;
>>
>> ../arch/arc/plat-eznps/include/plat/ctop.h:83:4: error: unknown type name 'u32'
>>     u32 gen:1, gdis:1, clk_gate_dis:1, asb:1,
>> ../arch/arc/plat-eznps/include/plat/ctop.h:86:3: error: unknown type name 'u32'
>>    u32 value;
>> ../arch/arc/plat-eznps/include/plat/ctop.h:93:4: error: unknown type name 'u32'
>>     u32 csa:22, dmsid:6, __reserved:3, cs:1;
>> ../arch/arc/plat-eznps/include/plat/ctop.h:95:3: error: unknown type name 'u32'
>>    u32 value;
>>
>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>> Cc: Vineet Gupta <vgupta@synopsys.com>
>> Cc: linux-snps-arc@lists.infradead.org
>> Cc: Elad Kanfi <eladkan@mellanox.com>
>> Cc: Leon Romanovsky <leonro@mellanox.com>
>> Cc: Ofer Levi <oferle@mellanox.com>
>> ---
>> v2: no change
>>
>>  arch/arc/plat-eznps/include/plat/ctop.h |    1 +
>>  1 file changed, 1 insertion(+)
>>
>> --- linux-next-20180723.orig/arch/arc/plat-eznps/include/plat/ctop.h
>> +++ linux-next-20180723/arch/arc/plat-eznps/include/plat/ctop.h
>> @@ -21,6 +21,7 @@
>>  #error "Incorrect ctop.h include"
>>  #endif
>>
>> +#include <asm-generic/types.h>
> 
> I'm not familiar with arch/* code, so maybe my question will sound
> naive., but why "asm-generic/types.h" and not "linux/types.h"?

Nope, good question.  That works and should be preferred.

Please use the new patch below.

Comments

Leon Romanovsky July 29, 2018, 8:22 p.m. UTC | #1
On Sun, Jul 29, 2018 at 11:10:51AM -0700, Randy Dunlap wrote:
> On 07/29/2018 12:01 AM, Leon Romanovsky wrote:
> > On Thu, Jul 26, 2018 at 08:16:35PM -0700, rd_dunlab wrote:
> >> From: Randy Dunlap <rdunlap@infradead.org>
> >>
> >> Add <asm-generic/types.h> to fix build errors.
> >> Both ctop.h and <soc/nps/common.h> use u32 types and cause many
> >> errors.
> >>
> >> Examples:
> >> ../include/soc/nps/common.h:71:4: error: unknown type name 'u32'
> >>     u32 __reserved:20, cluster:4, core:4, thread:4;
> >> ../include/soc/nps/common.h:76:3: error: unknown type name 'u32'
> >>    u32 value;
> >> ../include/soc/nps/common.h:124:4: error: unknown type name 'u32'
> >>     u32 base:8, cl_x:4, cl_y:4,
> >> ../include/soc/nps/common.h:127:3: error: unknown type name 'u32'
> >>    u32 value;
> >>
> >> ../arch/arc/plat-eznps/include/plat/ctop.h:83:4: error: unknown type name 'u32'
> >>     u32 gen:1, gdis:1, clk_gate_dis:1, asb:1,
> >> ../arch/arc/plat-eznps/include/plat/ctop.h:86:3: error: unknown type name 'u32'
> >>    u32 value;
> >> ../arch/arc/plat-eznps/include/plat/ctop.h:93:4: error: unknown type name 'u32'
> >>     u32 csa:22, dmsid:6, __reserved:3, cs:1;
> >> ../arch/arc/plat-eznps/include/plat/ctop.h:95:3: error: unknown type name 'u32'
> >>    u32 value;
> >>
> >> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> >> Cc: Vineet Gupta <vgupta@synopsys.com>
> >> Cc: linux-snps-arc@lists.infradead.org
> >> Cc: Elad Kanfi <eladkan@mellanox.com>
> >> Cc: Leon Romanovsky <leonro@mellanox.com>
> >> Cc: Ofer Levi <oferle@mellanox.com>
> >> ---
> >> v2: no change
> >>
> >>  arch/arc/plat-eznps/include/plat/ctop.h |    1 +
> >>  1 file changed, 1 insertion(+)
> >>
> >> --- linux-next-20180723.orig/arch/arc/plat-eznps/include/plat/ctop.h
> >> +++ linux-next-20180723/arch/arc/plat-eznps/include/plat/ctop.h
> >> @@ -21,6 +21,7 @@
> >>  #error "Incorrect ctop.h include"
> >>  #endif
> >>
> >> +#include <asm-generic/types.h>
> >
> > I'm not familiar with arch/* code, so maybe my question will sound
> > naive., but why "asm-generic/types.h" and not "linux/types.h"?
>
> Nope, good question.  That works and should be preferred.
>
> Please use the new patch below.
>
> --
>
> From: Randy Dunlap <rdunlap@infradead.org>
>
> Add <linux/types.h> to fix build errors.
> Both ctop.h and <soc/nps/common.h> use u32 types and cause many
> errors.
>
> Examples:
> ../include/soc/nps/common.h:71:4: error: unknown type name 'u32'
>     u32 __reserved:20, cluster:4, core:4, thread:4;
> ../include/soc/nps/common.h:76:3: error: unknown type name 'u32'
>    u32 value;
> ../include/soc/nps/common.h:124:4: error: unknown type name 'u32'
>     u32 base:8, cl_x:4, cl_y:4,
> ../include/soc/nps/common.h:127:3: error: unknown type name 'u32'
>    u32 value;
>
> ../arch/arc/plat-eznps/include/plat/ctop.h:83:4: error: unknown type name 'u32'
>     u32 gen:1, gdis:1, clk_gate_dis:1, asb:1,
> ../arch/arc/plat-eznps/include/plat/ctop.h:86:3: error: unknown type name 'u32'
>    u32 value;
> ../arch/arc/plat-eznps/include/plat/ctop.h:93:4: error: unknown type name 'u32'
>     u32 csa:22, dmsid:6, __reserved:3, cs:1;
> ../arch/arc/plat-eznps/include/plat/ctop.h:95:3: error: unknown type name 'u32'
>    u32 value;
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Vineet Gupta <vgupta@synopsys.com>
> Cc: linux-snps-arc@lists.infradead.org
> Cc: Elad Kanfi <eladkan@mellanox.com>
> Cc: Leon Romanovsky <leonro@mellanox.com>
> Cc: Ofer Levi <oferle@mellanox.com>
> ---
> v2: no change
> v3: use <linux/types.h> instead of <asm-generic/types.h>
>
>  arch/arc/plat-eznps/include/plat/ctop.h |    1 +
>  1 file changed, 1 insertion(+)
>

Thanks,
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
diff mbox series

Patch

--- linux-next-20180723.orig/arch/arc/plat-eznps/include/plat/ctop.h
+++ linux-next-20180723/arch/arc/plat-eznps/include/plat/ctop.h
@@ -21,6 +21,7 @@ 
 #error "Incorrect ctop.h include"
 #endif
 
+#include <linux/types.h>
 #include <soc/nps/common.h>
 
 /* core auxiliary registers */