All of lore.kernel.org
 help / color / mirror / Atom feed
From: broonie@opensource.wolfsonmicro.com (Mark Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] ARM: S3C64XX: Prototype SPI devices
Date: Thu, 9 Sep 2010 12:33:09 +0100	[thread overview]
Message-ID: <20100909113309.GA25855@rakim.wolfsonmicro.main> (raw)
In-Reply-To: <011001cb5010$b2848840$178d98c0$%kim@samsung.com>

On Thu, Sep 09, 2010 at 08:18:10PM +0900, Kukjin Kim wrote:
> Mark Brown wrote:

> > 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.

> 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?

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.

  reply	other threads:[~2010-09-09 11:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-08 10:25 [PATCH 1/2] ARM: S3C64XX: Fix dev-spi build Mark Brown
2010-09-08 10:25 ` [PATCH 2/2] ARM: S3C64XX: Prototype SPI devices Mark Brown
2010-09-08 12:39   ` Kukjin Kim
2010-09-08 12:46     ` Mark Brown
2010-09-09 11:18       ` Kukjin Kim
2010-09-09 11:33         ` Mark Brown [this message]
2010-09-08 11:52 ` [PATCH 1/2] ARM: S3C64XX: Fix dev-spi build Kukjin Kim
2010-09-08 12:12   ` Mark Brown
2010-09-08 12:21     ` Kukjin Kim
2010-09-08 14:17   ` Jassi Brar
2010-09-08 16:01     ` Mark Brown
2010-09-09  1:17       ` Jassi Brar
2010-09-09 11:11       ` Kukjin Kim
2010-09-09 11:34         ` Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2010-08-20 15:38 Mark Brown
2010-08-20 15:39 ` [PATCH 2/2] ARM: S3C64XX: Prototype SPI devices Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100909113309.GA25855@rakim.wolfsonmicro.main \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.