* [PATCH 0/4 v2] arc: some allmodconfig build fixes
@ 2018-07-27 3:16 rd_dunlab
2018-07-27 3:16 ` [PATCH 1/4 v2] arc: fix build errors in arc/include/asm/delay.h rd_dunlab
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: rd_dunlab @ 2018-07-27 3:16 UTC (permalink / raw)
To: linux-snps-arc
From: Randy Dunlap <rdunlap@infradead.org>
Hi,
Here are a few patches that fix build errors or warnings that
I encountered while doing arc "allmodconfig" builds.
These patches do not fix all of the build issues.
arch/arc/include/asm/delay.h | 3 +++
arch/arc/mm/cache.c | 7 ++++---
arch/arc/plat-eznps/include/plat/ctop.h | 1 +
arch/arc/plat-eznps/mtm.c | 6 ++++--
4 files changed, 12 insertions(+), 5 deletions(-)
--
^ permalink raw reply [flat|nested] 9+ messages in thread* [PATCH 1/4 v2] arc: fix build errors in arc/include/asm/delay.h 2018-07-27 3:16 [PATCH 0/4 v2] arc: some allmodconfig build fixes rd_dunlab @ 2018-07-27 3:16 ` rd_dunlab 2018-07-27 3:16 ` [PATCH 3/4 v2] arc: fix data type errors in platform headers rd_dunlab ` (2 subsequent siblings) 3 siblings, 0 replies; 9+ messages in thread From: rd_dunlab @ 2018-07-27 3:16 UTC (permalink / raw) To: linux-snps-arc From: Randy Dunlap <rdunlap@infradead.org> Fix build errors in arch/arc/'s delay.h: - add "extern unsigned long loops_per_jiffy;" - add <asm-generic/types.h> for "u64" In file included from ../drivers/infiniband/hw/cxgb3/cxio_hal.c:32: ../arch/arc/include/asm/delay.h: In function '__udelay': ../arch/arc/include/asm/delay.h:61:12: error: 'u64' undeclared (first use in this function) loops = ((u64) usecs * 4295 * HZ * loops_per_jiffy) >> 32; ^~~ In file included from ../drivers/infiniband/hw/cxgb3/cxio_hal.c:32: ../arch/arc/include/asm/delay.h: In function '__udelay': ../arch/arc/include/asm/delay.h:63:37: error: 'loops_per_jiffy' undeclared (first use in this function) loops = ((u64) usecs * 4295 * HZ * loops_per_jiffy) >> 32; ^~~~~~~~~~~~~~~ Signed-off-by: Randy Dunlap <rdunlap at infradead.org> Cc: Vineet Gupta <vgupta at synopsys.com> Cc: linux-snps-arc at lists.infradead.org Cc: Elad Kanfi <eladkan at mellanox.com> Cc: Leon Romanovsky <leonro at mellanox.com> Cc: Ofer Levi <oferle at mellanox.com> --- v2: add extern for loops_per_jiffy instead of including <linux/delay.h> for it arch/arc/include/asm/delay.h | 3 +++ 1 file changed, 3 insertions(+) --- linux-next-20180723.orig/arch/arc/include/asm/delay.h +++ linux-next-20180723/arch/arc/include/asm/delay.h @@ -17,8 +17,11 @@ #ifndef __ASM_ARC_UDELAY_H #define __ASM_ARC_UDELAY_H +#include <asm-generic/types.h> #include <asm/param.h> /* HZ */ +extern unsigned long loops_per_jiffy; + static inline void __delay(unsigned long loops) { __asm__ __volatile__( -- ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 3/4 v2] arc: fix data type errors in platform headers 2018-07-27 3:16 [PATCH 0/4 v2] arc: some allmodconfig build fixes rd_dunlab 2018-07-27 3:16 ` [PATCH 1/4 v2] arc: fix build errors in arc/include/asm/delay.h rd_dunlab @ 2018-07-27 3:16 ` rd_dunlab 2018-07-29 7:01 ` Leon Romanovsky 2018-07-27 3:16 ` [PATCH 4/4 v2] arc: fix printk warning in arc/plat-eznps/mtm.c rd_dunlab 2018-07-27 3:16 ` [PATCH 2/4 v2] arc: fix type warnings in arc/mm/cache.c rd_dunlab 3 siblings, 1 reply; 9+ messages in thread From: rd_dunlab @ 2018-07-27 3:16 UTC (permalink / raw) To: linux-snps-arc 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 at infradead.org> Cc: Vineet Gupta <vgupta at synopsys.com> Cc: linux-snps-arc at lists.infradead.org Cc: Elad Kanfi <eladkan at mellanox.com> Cc: Leon Romanovsky <leonro at mellanox.com> Cc: Ofer Levi <oferle at 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> #include <soc/nps/common.h> /* core auxiliary registers */ -- ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 3/4 v2] arc: fix data type errors in platform headers 2018-07-27 3:16 ` [PATCH 3/4 v2] arc: fix data type errors in platform headers rd_dunlab @ 2018-07-29 7:01 ` Leon Romanovsky 2018-07-29 18:10 ` [PATCH 3/4 v3] " Randy Dunlap 0 siblings, 1 reply; 9+ messages in thread From: Leon Romanovsky @ 2018-07-29 7:01 UTC (permalink / raw) To: linux-snps-arc On Thu, Jul 26, 2018@08:16:35PM -0700, rd_dunlab wrote: > From: Randy Dunlap <rdunlap at 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 at infradead.org> > Cc: Vineet Gupta <vgupta at synopsys.com> > Cc: linux-snps-arc at lists.infradead.org > Cc: Elad Kanfi <eladkan at mellanox.com> > Cc: Leon Romanovsky <leonro at mellanox.com> > Cc: Ofer Levi <oferle at 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"? Thanks for fixing build. > #include <soc/nps/common.h> > > /* core auxiliary registers */ > > > -- > ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 3/4 v3] arc: fix data type errors in platform headers 2018-07-29 7:01 ` Leon Romanovsky @ 2018-07-29 18:10 ` Randy Dunlap 2018-07-29 20:22 ` Leon Romanovsky 0 siblings, 1 reply; 9+ messages in thread From: Randy Dunlap @ 2018-07-29 18:10 UTC (permalink / raw) To: linux-snps-arc On 07/29/2018 12:01 AM, Leon Romanovsky wrote: > On Thu, Jul 26, 2018@08:16:35PM -0700, rd_dunlab wrote: >> From: Randy Dunlap <rdunlap at 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 at infradead.org> >> Cc: Vineet Gupta <vgupta at synopsys.com> >> Cc: linux-snps-arc at lists.infradead.org >> Cc: Elad Kanfi <eladkan at mellanox.com> >> Cc: Leon Romanovsky <leonro at mellanox.com> >> Cc: Ofer Levi <oferle at 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 at infradead.org> Cc: Vineet Gupta <vgupta at synopsys.com> Cc: linux-snps-arc at lists.infradead.org Cc: Elad Kanfi <eladkan at mellanox.com> Cc: Leon Romanovsky <leonro at mellanox.com> Cc: Ofer Levi <oferle at 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(+) --- 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 */ ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 3/4 v3] arc: fix data type errors in platform headers 2018-07-29 18:10 ` [PATCH 3/4 v3] " Randy Dunlap @ 2018-07-29 20:22 ` Leon Romanovsky 0 siblings, 0 replies; 9+ messages in thread From: Leon Romanovsky @ 2018-07-29 20:22 UTC (permalink / raw) To: linux-snps-arc On Sun, Jul 29, 2018@11:10:51AM -0700, Randy Dunlap wrote: > On 07/29/2018 12:01 AM, Leon Romanovsky wrote: > > On Thu, Jul 26, 2018@08:16:35PM -0700, rd_dunlab wrote: > >> From: Randy Dunlap <rdunlap at 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 at infradead.org> > >> Cc: Vineet Gupta <vgupta at synopsys.com> > >> Cc: linux-snps-arc at lists.infradead.org > >> Cc: Elad Kanfi <eladkan at mellanox.com> > >> Cc: Leon Romanovsky <leonro at mellanox.com> > >> Cc: Ofer Levi <oferle at 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 at 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 at infradead.org> > Cc: Vineet Gupta <vgupta at synopsys.com> > Cc: linux-snps-arc at lists.infradead.org > Cc: Elad Kanfi <eladkan at mellanox.com> > Cc: Leon Romanovsky <leonro at mellanox.com> > Cc: Ofer Levi <oferle at 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 at mellanox.com> ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 4/4 v2] arc: fix printk warning in arc/plat-eznps/mtm.c 2018-07-27 3:16 [PATCH 0/4 v2] arc: some allmodconfig build fixes rd_dunlab 2018-07-27 3:16 ` [PATCH 1/4 v2] arc: fix build errors in arc/include/asm/delay.h rd_dunlab 2018-07-27 3:16 ` [PATCH 3/4 v2] arc: fix data type errors in platform headers rd_dunlab @ 2018-07-27 3:16 ` rd_dunlab 2018-07-29 7:03 ` Leon Romanovsky 2018-07-27 3:16 ` [PATCH 2/4 v2] arc: fix type warnings in arc/mm/cache.c rd_dunlab 3 siblings, 1 reply; 9+ messages in thread From: rd_dunlab @ 2018-07-27 3:16 UTC (permalink / raw) To: linux-snps-arc From: Randy Dunlap <rdunlap@infradead.org> Fix printk format warning in arch/arc/plat-eznps/mtm.c: In file included from ../include/linux/printk.h:7, from ../include/linux/kernel.h:14, from ../include/linux/list.h:9, from ../include/linux/smp.h:12, from ../arch/arc/plat-eznps/mtm.c:17: ../arch/arc/plat-eznps/mtm.c: In function 'set_mtm_hs_ctr': ../include/linux/kern_levels.h:5:18: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long int' [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^~~~~~ ../include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH' #define KERN_ERR KERN_SOH "3" /* error conditions */ ^~~~~~~~ ../include/linux/printk.h:308:9: note: in expansion of macro 'KERN_ERR' printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~ ../arch/arc/plat-eznps/mtm.c:166:3: note: in expansion of macro 'pr_err' pr_err("** Invalid @nps_mtm_hs_ctr [%d] needs to be [%d:%d] (incl)\n", ^~~~~~ ../arch/arc/plat-eznps/mtm.c:166:40: note: format string is defined here pr_err("** Invalid @nps_mtm_hs_ctr [%d] needs to be [%d:%d] (incl)\n", ~^ %ld The hs_ctr variable can just be int instead of long, so also change kstrtol() to kstrtoint() and leave the format string as %d. Also add 2 header files since they are used in mtm.c and we prefer not to depend on accidental/indirect #includes. Signed-off-by: Randy Dunlap <rdunlap at infradead.org> Cc: Vineet Gupta <vgupta at synopsys.com> Cc: linux-snps-arc at lists.infradead.org Cc: Elad Kanfi <eladkan at mellanox.com> Cc: Leon Romanovsky <leonro at mellanox.com> Cc: Ofer Levi <oferle at mellanox.com> --- v2: no change arch/arc/plat-eznps/mtm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- linux-next-20180723.orig/arch/arc/plat-eznps/mtm.c +++ linux-next-20180723/arch/arc/plat-eznps/mtm.c @@ -15,6 +15,8 @@ */ #include <linux/smp.h> +#include <linux/init.h> +#include <linux/kernel.h> #include <linux/io.h> #include <linux/log2.h> #include <asm/arcregs.h> @@ -157,10 +159,10 @@ void mtm_enable_core(unsigned int cpu) /* Verify and set the value of the mtm hs counter */ static int __init set_mtm_hs_ctr(char *ctr_str) { - long hs_ctr; + int hs_ctr; int ret; - ret = kstrtol(ctr_str, 0, &hs_ctr); + ret = kstrtoint(ctr_str, 0, &hs_ctr); if (ret || hs_ctr > MT_HS_CNT_MAX || hs_ctr < MT_HS_CNT_MIN) { pr_err("** Invalid @nps_mtm_hs_ctr [%d] needs to be [%d:%d] (incl)\n", -- ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 4/4 v2] arc: fix printk warning in arc/plat-eznps/mtm.c 2018-07-27 3:16 ` [PATCH 4/4 v2] arc: fix printk warning in arc/plat-eznps/mtm.c rd_dunlab @ 2018-07-29 7:03 ` Leon Romanovsky 0 siblings, 0 replies; 9+ messages in thread From: Leon Romanovsky @ 2018-07-29 7:03 UTC (permalink / raw) To: linux-snps-arc On Thu, Jul 26, 2018@08:16:35PM -0700, rd_dunlab wrote: > From: Randy Dunlap <rdunlap at infradead.org> > > Fix printk format warning in arch/arc/plat-eznps/mtm.c: > > In file included from ../include/linux/printk.h:7, > from ../include/linux/kernel.h:14, > from ../include/linux/list.h:9, > from ../include/linux/smp.h:12, > from ../arch/arc/plat-eznps/mtm.c:17: > ../arch/arc/plat-eznps/mtm.c: In function 'set_mtm_hs_ctr': > ../include/linux/kern_levels.h:5:18: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long int' [-Wformat=] > #define KERN_SOH "\001" /* ASCII Start Of Header */ > ^~~~~~ > ../include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH' > #define KERN_ERR KERN_SOH "3" /* error conditions */ > ^~~~~~~~ > ../include/linux/printk.h:308:9: note: in expansion of macro 'KERN_ERR' > printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) > ^~~~~~~~ > ../arch/arc/plat-eznps/mtm.c:166:3: note: in expansion of macro 'pr_err' > pr_err("** Invalid @nps_mtm_hs_ctr [%d] needs to be [%d:%d] (incl)\n", > ^~~~~~ > ../arch/arc/plat-eznps/mtm.c:166:40: note: format string is defined here > pr_err("** Invalid @nps_mtm_hs_ctr [%d] needs to be [%d:%d] (incl)\n", > ~^ > %ld > The hs_ctr variable can just be int instead of long, so also change > kstrtol() to kstrtoint() and leave the format string as %d. > > Also add 2 header files since they are used in mtm.c and we prefer > not to depend on accidental/indirect #includes. > > Signed-off-by: Randy Dunlap <rdunlap at infradead.org> > Cc: Vineet Gupta <vgupta at synopsys.com> > Cc: linux-snps-arc at lists.infradead.org > Cc: Elad Kanfi <eladkan at mellanox.com> > Cc: Leon Romanovsky <leonro at mellanox.com> > Cc: Ofer Levi <oferle at mellanox.com> > --- > v2: no change > > arch/arc/plat-eznps/mtm.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > Thanks, Reviewed-by: Leon Romanovsky <leonro at mellanox.com> ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/4 v2] arc: fix type warnings in arc/mm/cache.c 2018-07-27 3:16 [PATCH 0/4 v2] arc: some allmodconfig build fixes rd_dunlab ` (2 preceding siblings ...) 2018-07-27 3:16 ` [PATCH 4/4 v2] arc: fix printk warning in arc/plat-eznps/mtm.c rd_dunlab @ 2018-07-27 3:16 ` rd_dunlab 3 siblings, 0 replies; 9+ messages in thread From: rd_dunlab @ 2018-07-27 3:16 UTC (permalink / raw) To: linux-snps-arc From: Randy Dunlap <rdunlap@infradead.org> Fix type warnings in arch/arc/mm/cache.c. ../arch/arc/mm/cache.c: In function 'flush_anon_page': ../arch/arc/mm/cache.c:1062:55: warning: passing argument 2 of '__flush_dcache_page' makes integer from pointer without a cast [-Wint-conversion] __flush_dcache_page((phys_addr_t)page_address(page), page_address(page)); ^~~~~~~~~~~~~~~~~~ ../arch/arc/mm/cache.c:1013:59: note: expected 'long unsigned int' but argument is of type 'void *' void __flush_dcache_page(phys_addr_t paddr, unsigned long vaddr) ~~~~~~~~~~~~~~^~~~~ Signed-off-by: Randy Dunlap <rdunlap at infradead.org> Cc: Vineet Gupta <vgupta at synopsys.com> Cc: linux-snps-arc at lists.infradead.org Cc: Elad Kanfi <eladkan at mellanox.com> Cc: Leon Romanovsky <leonro at mellanox.com> Cc: Ofer Levi <oferle at mellanox.com> --- v2: drop some spurious (accidental) patch lines arch/arc/mm/cache.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) --- linux-next-20180723.orig/arch/arc/mm/cache.c +++ linux-next-20180723/arch/arc/mm/cache.c @@ -1038,7 +1038,7 @@ void flush_cache_mm(struct mm_struct *mm void flush_cache_page(struct vm_area_struct *vma, unsigned long u_vaddr, unsigned long pfn) { - unsigned int paddr = pfn << PAGE_SHIFT; + phys_addr_t paddr = pfn << PAGE_SHIFT; u_vaddr &= PAGE_MASK; @@ -1058,8 +1058,9 @@ void flush_anon_page(struct vm_area_stru unsigned long u_vaddr) { /* TBD: do we really need to clear the kernel mapping */ - __flush_dcache_page(page_address(page), u_vaddr); - __flush_dcache_page(page_address(page), page_address(page)); + __flush_dcache_page((phys_addr_t)page_address(page), u_vaddr); + __flush_dcache_page((phys_addr_t)page_address(page), + (phys_addr_t)page_address(page)); } -- ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2018-07-29 20:22 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-07-27 3:16 [PATCH 0/4 v2] arc: some allmodconfig build fixes rd_dunlab 2018-07-27 3:16 ` [PATCH 1/4 v2] arc: fix build errors in arc/include/asm/delay.h rd_dunlab 2018-07-27 3:16 ` [PATCH 3/4 v2] arc: fix data type errors in platform headers rd_dunlab 2018-07-29 7:01 ` Leon Romanovsky 2018-07-29 18:10 ` [PATCH 3/4 v3] " Randy Dunlap 2018-07-29 20:22 ` Leon Romanovsky 2018-07-27 3:16 ` [PATCH 4/4 v2] arc: fix printk warning in arc/plat-eznps/mtm.c rd_dunlab 2018-07-29 7:03 ` Leon Romanovsky 2018-07-27 3:16 ` [PATCH 2/4 v2] arc: fix type warnings in arc/mm/cache.c rd_dunlab
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox