ARM: S3C64XX: Fix dev-spi build
Subsystems (3)
PATCH 1/2 ARM: S3C64XX: Fix dev-spi build
The irqs.h usage here got missed in the Samsung platform reorganisation.
--- arch/arm/mach-s3c64xx/dev-spi.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-s3c64xx/dev-spi.c +1 -1
@@ -18,10 +18,10 @@#include <mach/map.h> #include <mach/gpio-bank-c.h> #include <mach/spi-clocks.h> +#include <mach/irqs.h> #include <plat/s3c64xx-spi.h> #include <plat/gpio-cfg.h> -#include <plat/irqs.h> static char *spi_src_clks[] = { [S3C64XX_SPI_SRCCLK_PCLK ] ="pclk" ,
Signature · 1 line
1.7.1
PATCH 2/2 ARM: S3C64XX: Prototype SPI devices
Avoids build warnings due to the undeclared non-statics.
--- arch/arm/mach-s3c64xx/dev-spi.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/mach-s3c64xx/dev-spi.c +1 -0
@@ -22,6 +22,7 @@#include <plat/s3c64xx-spi.h> #include <plat/gpio-cfg.h> +#include <plat/devs.h> static char *spi_src_clks[] = { [S3C64XX_SPI_SRCCLK_PCLK ] ="pclk" ,
Signature · 1 line
1.7.1
PATCH 2/2 ARM: S3C64XX: Prototype SPI devices
Quoted 3 lines · Mark Brown
Avoids build warnings due to the undeclared non-statics.
Could you please let me know what's the build warning?
Review
Quoted 6 lines
Signed-off-by Mark Brown <[email protected]>--- arch/arm/mach-s3c64xx/dev-spi.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)(quoted diff) +0
-0
b/arch/arm/mach-s3c64xx/dev-spi.c
arch/arm/mach-s3c64xx/dev-spi.c
Quoted 12 lines
index bfa3ef7..405e621 100644
arch/arm/mach-s3c64xx/dev-spi.c +1
-1@@ -22,6 +22,7 @@#include <plat/s3c64xx-spi.h> #include <plat/gpio-cfg.h> +#include <plat/devs.h> static char *spi_src_clks[] = { [S3C64XX_SPI_SRCCLK_PCLK ] ="pclk" , --
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 2/2 ARM: S3C64XX: Prototype SPI devices
Quoted 5 lines · Kukjin Kim
Quoted 1 line · Mark Brown
Avoids build warnings due to the undeclared non-statics.
Could you please let me know what's the build warning?
It'll have been something along the lines of:
's3c64xx_device_iis0' not declared; should it be static?
for each device. Possibly generated by sparse rather than GCC - I always build with sparse as well.
PATCH 2/2 ARM: S3C64XX: Prototype SPI devices
Quoted 8 lines · Mark Brown
Quoted 5 lines · Kukjin Kim
Quoted 1 line · Mark Brown
Avoids build warnings due to the undeclared non-statics.
Could you please let me know what's the build warning?
Quoted 7 lines
It'll have been something along the lines of:
'
s3c64xx_device_iis0' not declared; should it be static?for each device. Possibly generated by sparse rather than GCC - I always build with sparse as well.
Hi Mark,
Sorry...I can't understand your comment.
You mean the build warning is 's3c64xx_device_iis0' is not declared..right? Hmm...the 's3c64xx_device_iis0' used only in a mach-s3c64xx/mach-smartq.c file.
And defined it as extern struct in a plat-samsung/include/plat/devs.h file. ...So...why need to modify mach-s3c64xx/dev-spi.c for it?
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 2/2 ARM: S3C64XX: Prototype SPI devices
Quoted 10 lines · Kukjin Kim
Quoted 6 lines · Mark Brown
It'll have been something along the lines of:
'
s3c64xx_device_iis0' not declared; should it be static?for each device. Possibly generated by sparse rather than GCC - I always build with sparse as well.
You mean the build warning is '
s3c64xx_device_iis0' is not declared..right?
Yes, or words to that effect.
Quoted 4 lines
Hmm...the '
s3c64xx_device_iis0' used only in amach-s3c64xx/mach-smartq.cfile.
And defined it as extern struct in aplat-samsung/include/plat/devs.hfile. ...So...why need to modifymach-s3c64xx/dev-spi.cfor it?
The complaint is that the symbol has been defined in the C file with global scope but there's no declaration for it. This means that either the symbol is not supposed to be global scope and should be static instead (which isn't the case here, machines are supposed to be able to reference it) or that there is nothing checking that the declaration that other files use to talk about the symbol matches the defintion. If the users are using a different declaration then the memory layout and alignment may not be correct for them, causing errors at runtime.
In other words the file has:
struct platform_device s3c64xx_device_iis0 = {
...
};and the compiler/sparse is expecting to see:
struct platform_device s3c64xx_device_iis0;
before that, which comes from devs.h.
PATCH 1/2 ARM: S3C64XX: Fix dev-spi build
In reply to Mark BrownQuoted 5 lines · Mark Brown
The
irqs.husage here got missed in the Samsung platform reorganisation.Signed-off-by Mark Brown <[email protected]>Acked-by Jassi Brar <[email protected]>
Maybe Jassi wants to use 'jassi.brar at samsung.com' e-mail...but I'm not sure ;-)
Anyway, this is ok to me...and how about mach-s5pc100/dev-spi.c? And I think, this should be gone to upstream via Ben's tree...
Review
Quoted 5 lines
--- arch/arm/mach-s3c64xx/dev-spi.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)(quoted diff) +0
-0
b/arch/arm/mach-s3c64xx/dev-spi.c
Quoted 6 lines
index a492b98..bfa3ef7 100644
arch/arm/mach-s3c64xx/dev-spi.c +0
-0@@ -18,10 +18,10 @@#include <mach/map.h> #include <mach/gpio-bank-c.h>
arch/arm/mach-s3c64xx/dev-spi.c
Quoted 10 lines
arch/arm/mach-s3c64xx/dev-spi.c +1
-2#include <mach/spi-clocks.h> +#include <mach/irqs.h> #include <plat/s3c64xx-spi.h> #include <plat/gpio-cfg.h> -#include <plat/irqs.h> static char *spi_src_clks[] = { [S3C64XX_SPI_SRCCLK_PCLK ] ="pclk" , --
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 1/2 ARM: S3C64XX: Fix dev-spi build
Quoted 1 line · Kukjin Kim
Anyway, this is ok to me...and how about
mach-s5pc100/dev-spi.c?
I've not looked at S5PC100 since I don't have any boards with that.
Quoted 1 line
And I think, this should be gone to upstream via Ben's tree...
Yup, though the MAINTAINERS pattern matches you both. I'm resending due to lack of any response from Ben.
PATCH 1/2 ARM: S3C64XX: Fix dev-spi build
Quoted 7 lines · Mark Brown
Quoted 1 line · Kukjin Kim
Anyway, this is ok to me...and how about
mach-s5pc100/dev-spi.c?I've not looked at S5PC100 since I don't have any boards with that.
Ok..I will sort out others.
Quoted 4 lines
Quoted 1 line
And I think, this should be gone to upstream via Ben's tree...
Yup, though the
MAINTAINERSpattern matches you both. I'm resending due to lack of any response from Ben.
mm...if he busy, I will/can do it :-)
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 1/2 ARM: S3C64XX: Fix dev-spi build
In reply to Kukjin KimQuoted 10 lines · Kukjin Kim
Quoted 5 lines · Mark Brown
The
irqs.husage here got missed in the Samsung platform reorganisation.Signed-off-by Mark Brown <[email protected]>Acked-by Jassi Brar <[email protected]>Acked-by Kukjin Kim <[email protected]>Maybe Jassi wants to use 'jassi.brar at samsung.com' e-mail...but I'm not sure ;-)
Yes, that would be better.
I have to use personal id because I can't always reply from the official one. Otherwise, I'd prefer my work to be tagged with jassi.brar at samsung.com
Thanks.
PATCH 1/2 ARM: S3C64XX: Fix dev-spi build
Quoted 2 lines · Jassi Brar
I have to use personal id because I can't always reply from the official one. Otherwise, I'd prefer my work to be tagged with jassi.brar at samsung.com
OK, I'll amend it. I just cut'n'pasted from your ack mail IIRC.
PATCH 1/2 ARM: S3C64XX: Fix dev-spi build
Quoted 6 lines · Mark Brown
Quoted 2 lines · Jassi Brar
I have to use personal id because I can't always reply from the official one. Otherwise, I'd prefer my work to be tagged with jassi.brar at samsung.com
OK, I'll amend it. ?I just cut'n'pasted from your ack mail IIRC.
Ya that was my mistake, sorry.
PATCH 1/2 ARM: S3C64XX: Fix dev-spi build
In reply to Mark BrownQuoted 4 lines · Mark Brown
Quoted 1 line · Jassi Brar
I have to use personal id because I can't always reply from the official
one.
Quoted 3 lines
Quoted 1 line
Otherwise, I'd prefer my work to be tagged with jassi.brar at samsung.com
OK, I'll amend it. I just cut'n'pasted from your ack mail IIRC.
May I amend it when apply it into my tree?
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 1/2 ARM: S3C64XX: Fix dev-spi build
Quoted 5 lines · Kukjin Kim
Quoted 1 line · Mark Brown
OK, I'll amend it. I just cut'n'pasted from your ack mail IIRC.
May I amend it when apply it into my tree?
That would seem sensible. I'm talking about the copy I keep locally in a queue to try to make sure things don't get dropped on the floor in case maintainers are unresponsive.