2012-11-06 21:55:45

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 0/8] warning fixes for v3.7-rc4

Hi everyone,

Here are a few patches for remaining or newly introduced build
warnings in the ARM defconfig builds. The MTD patches have
been around for some time, but I had not submitted them because
I had to redo most of them first.

The only build error in this series is the exynos drm patch,
which is a very recent regression.

Please apply in to the respective maintainer trees.

Arnd

Arnd Bergmann (8):
mtd: diskonchip: don't warn about ARM architecture
mtd: diskonchip: use inline functions for DocRead/DocWrite
mtd: uninitialized variable warning in map.h
sched: warnings in kernel/sched/fair.c
mmc: dw_mmc: fix modular build for exynos back-end
mmc: dw_mmc: constify dw_mci_idmac_ops in exynos back-end
ata: highbank: mark ahci_highbank_probe as __devinit
drm/exynos: don't include plat/gpio-cfg.h

drivers/ata/sata_highbank.c | 2 +-
drivers/gpu/drm/exynos/exynos_hdmi.c | 1 -
drivers/mmc/host/dw_mmc-exynos.c | 8 ++++----
drivers/mmc/host/dw_mmc-pltfm.c | 2 +-
drivers/mmc/host/dw_mmc-pltfm.h | 2 +-
drivers/mmc/host/dw_mmc.c | 2 +-
drivers/mtd/devices/docprobe.c | 2 --
drivers/mtd/nand/diskonchip.c | 2 --
include/linux/mmc/dw_mmc.h | 4 ++--
include/linux/mtd/doc2000.h | 22 ++++++++++++++++++----
include/linux/mtd/map.h | 2 +-
kernel/sched/fair.c | 2 +-
12 files changed, 30 insertions(+), 21 deletions(-)


Cc: Artem Bityutskiy <[email protected]>
Cc: Chris Ball <[email protected]>
Cc: David Woodhouse <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Inki Dae <[email protected]>
Cc: Jeff Garzik <[email protected]>
Cc: Kyungmin Park <[email protected]>
Cc: Mark Langsdorf <[email protected]>
Cc: Paul Turner <[email protected]>
Cc: Peter Boonstoppel <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Rahul Sharma <[email protected]>
Cc: Rob Clark <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Thomas Abraham <[email protected]>
Cc: Will Newton <[email protected]>
Cc: [email protected]
--
1.7.10


2012-11-06 21:55:46

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 3/8] mtd: uninitialized variable warning in map.h

The map_word_load() function initializes exactly
as many words in the buffer as required, but gcc
cannot figure this out and gives a misleading
warning. Marking the local variable as
uninitialized_var shuts up that warning.

Without this patch, building acs5k_defconfig results in:

drivers/mtd/chips/cfi_cmdset_0002.c: In function 'cfi_amdstd_panic_write':
include/linux/mtd/map.h:331:11: warning: 'r.x[0]' may be used uninitialized in this function [-Wuninitialized]
drivers/mtd/chips/cfi_cmdset_0002.c: In function 'cfi_amdstd_write_words':
include/linux/mtd/map.h:331:11: warning: 'r.x[0]' may be used uninitialized in this function [-Wuninitialized]
drivers/mtd/chips/cfi_cmdset_0001.c: In function 'cfi_intelext_write_words':
include/linux/mtd/map.h:331:11: warning: 'r.x[0]' may be used uninitialized in this function [-Wuninitialized]

Signed-off-by: Arnd Bergmann <[email protected]>
Cc: David Woodhouse <[email protected]>
Cc: Artem Bityutskiy <[email protected]>
Cc: [email protected]
---
include/linux/mtd/map.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/mtd/map.h b/include/linux/mtd/map.h
index 3595a02..e3559ba 100644
--- a/include/linux/mtd/map.h
+++ b/include/linux/mtd/map.h
@@ -328,7 +328,7 @@ static inline int map_word_bitsset(struct map_info *map, map_word val1, map_word

static inline map_word map_word_load(struct map_info *map, const void *ptr)
{
- map_word r;
+ map_word uninitialized_var(r);

if (map_bankwidth_is_1(map))
r.x[0] = *(unsigned char *)ptr;
--
1.7.10

2012-11-06 21:55:47

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 6/8] mmc: dw_mmc: constify dw_mci_idmac_ops in exynos back-end

The of_device_id match data is now marked as const and
must not be modified. This changes the dw_mmc to mark
all pointers passing the dw_mci_drv_data or dw_mci_dma_ops
structures as const, and also marks the static definitions
as const.

drivers/mmc/host/dw_mmc-exynos.c: In function 'dw_mci_exynos_probe':
drivers/mmc/host/dw_mmc-exynos.c:234:11: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]

Signed-off-by: Arnd Bergmann <[email protected]>
Cc: Thomas Abraham <[email protected]>
Cc: Will Newton <[email protected]>
Cc: Chris Ball <[email protected]>
---
drivers/mmc/host/dw_mmc-exynos.c | 6 +++---
drivers/mmc/host/dw_mmc-pltfm.c | 2 +-
drivers/mmc/host/dw_mmc-pltfm.h | 2 +-
drivers/mmc/host/dw_mmc.c | 2 +-
include/linux/mmc/dw_mmc.h | 4 ++--
5 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc-exynos.c b/drivers/mmc/host/dw_mmc-exynos.c
index 0147ac3a..4d50da6 100644
--- a/drivers/mmc/host/dw_mmc-exynos.c
+++ b/drivers/mmc/host/dw_mmc-exynos.c
@@ -208,7 +208,7 @@ static unsigned long exynos5250_dwmmc_caps[4] = {
MMC_CAP_CMD23,
};

-static struct dw_mci_drv_data exynos5250_drv_data = {
+static const struct dw_mci_drv_data exynos5250_drv_data = {
.caps = exynos5250_dwmmc_caps,
.init = dw_mci_exynos_priv_init,
.setup_clock = dw_mci_exynos_setup_clock,
@@ -220,14 +220,14 @@ static struct dw_mci_drv_data exynos5250_drv_data = {

static const struct of_device_id dw_mci_exynos_match[] = {
{ .compatible = "samsung,exynos5250-dw-mshc",
- .data = (void *)&exynos5250_drv_data, },
+ .data = &exynos5250_drv_data, },
{},
};
MODULE_DEVICE_TABLE(of, dw_mci_exynos_match);

int dw_mci_exynos_probe(struct platform_device *pdev)
{
- struct dw_mci_drv_data *drv_data;
+ const struct dw_mci_drv_data *drv_data;
const struct of_device_id *match;

match = of_match_node(dw_mci_exynos_match, pdev->dev.of_node);
diff --git a/drivers/mmc/host/dw_mmc-pltfm.c b/drivers/mmc/host/dw_mmc-pltfm.c
index c960ca7..5e33156 100644
--- a/drivers/mmc/host/dw_mmc-pltfm.c
+++ b/drivers/mmc/host/dw_mmc-pltfm.c
@@ -24,7 +24,7 @@
#include "dw_mmc.h"

int dw_mci_pltfm_register(struct platform_device *pdev,
- struct dw_mci_drv_data *drv_data)
+ const struct dw_mci_drv_data *drv_data)
{
struct dw_mci *host;
struct resource *regs;
diff --git a/drivers/mmc/host/dw_mmc-pltfm.h b/drivers/mmc/host/dw_mmc-pltfm.h
index 301f245..2ac37b8 100644
--- a/drivers/mmc/host/dw_mmc-pltfm.h
+++ b/drivers/mmc/host/dw_mmc-pltfm.h
@@ -13,7 +13,7 @@
#define _DW_MMC_PLTFM_H_

extern int dw_mci_pltfm_register(struct platform_device *pdev,
- struct dw_mci_drv_data *drv_data);
+ const struct dw_mci_drv_data *drv_data);
extern int __devexit dw_mci_pltfm_remove(struct platform_device *pdev);
extern const struct dev_pm_ops dw_mci_pltfm_pmops;

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 250aa18..4f01f9f 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -434,7 +434,7 @@ static int dw_mci_idmac_init(struct dw_mci *host)
return 0;
}

-static struct dw_mci_dma_ops dw_mci_idmac_ops = {
+static const struct dw_mci_dma_ops dw_mci_idmac_ops = {
.init = dw_mci_idmac_init,
.start = dw_mci_idmac_start_dma,
.stop = dw_mci_idmac_stop_dma,
diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h
index 7c6a113..b611f32 100644
--- a/include/linux/mmc/dw_mmc.h
+++ b/include/linux/mmc/dw_mmc.h
@@ -137,7 +137,7 @@ struct dw_mci {

dma_addr_t sg_dma;
void *sg_cpu;
- struct dw_mci_dma_ops *dma_ops;
+ const struct dw_mci_dma_ops *dma_ops;
#ifdef CONFIG_MMC_DW_IDMAC
unsigned int ring_size;
#else
@@ -162,7 +162,7 @@ struct dw_mci {
u16 data_offset;
struct device *dev;
struct dw_mci_board *pdata;
- struct dw_mci_drv_data *drv_data;
+ const struct dw_mci_drv_data *drv_data;
void *priv;
struct clk *biu_clk;
struct clk *ciu_clk;
--
1.7.10

2012-11-06 21:55:54

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 5/8] mmc: dw_mmc: fix modular build for exynos back-end

The MODULE_DEVICE_TABLE entry for dw_mci_exynos_match
was incorrectly copied from the platform back-end, which
causes this error when building the driver as a loadable
module:

drivers/mmc/host/dw_mmc-exynos.c: At top level:
drivers/mmc/host/dw_mmc-exynos.c:226:34: error: '__mod_of_device_table' aliased to undefined symbol 'dw_mci_pltfm_match'

This patch fixes the problem by just using the correct
string.

Signed-off-by: Arnd Bergmann <[email protected]>
Cc: Thomas Abraham <[email protected]>
Cc: Will Newton <[email protected]>
Cc: Chris Ball <[email protected]>
---
drivers/mmc/host/dw_mmc-exynos.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/dw_mmc-exynos.c b/drivers/mmc/host/dw_mmc-exynos.c
index 660bbc5..0147ac3a 100644
--- a/drivers/mmc/host/dw_mmc-exynos.c
+++ b/drivers/mmc/host/dw_mmc-exynos.c
@@ -223,7 +223,7 @@ static const struct of_device_id dw_mci_exynos_match[] = {
.data = (void *)&exynos5250_drv_data, },
{},
};
-MODULE_DEVICE_TABLE(of, dw_mci_pltfm_match);
+MODULE_DEVICE_TABLE(of, dw_mci_exynos_match);

int dw_mci_exynos_probe(struct platform_device *pdev)
{
--
1.7.10

2012-11-06 21:55:59

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 8/8] drm/exynos: don't include plat/gpio-cfg.h

Patch 9eb3e9e6f3 "drm/exynos: add support for ARCH_MULTIPLATFORM"
allowed building the exynos hdmi driver on non-samsung platforms,
which unfortunately broke compilation in combination with 22c4f42897
"drm: exynos: hdmi: add support for exynos5 hdmi", which added
an inclusion of the samsung-specific plat/gpio-cfg.h header file.

Fortunately, that header file is not required any more here, so
we can simply revert the inclusion in order to build the ARM
allyesconfig again without getting this error:

drivers/gpu/drm/exynos/exynos_hdmi.c:37:27: fatal error: plat/gpio-cfg.h: No such file or directory

Signed-off-by: Arnd Bergmann <[email protected]>
Cc: Rob Clark <[email protected]>
Cc: Inki Dae <[email protected]>
Cc: Kyungmin Park <[email protected]>
Cc: Rahul Sharma <[email protected]>
---
drivers/gpu/drm/exynos/exynos_hdmi.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index 2c115f8..7f0fc4e 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -34,7 +34,6 @@
#include <linux/regulator/consumer.h>
#include <linux/io.h>
#include <linux/of_gpio.h>
-#include <plat/gpio-cfg.h>

#include <drm/exynos_drm.h>

--
1.7.10

2012-11-06 21:56:15

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 2/8] mtd: diskonchip: use inline functions for DocRead/DocWrite

The diskonchip drivers traditionally use home-grown macros for
doing MMIO accesses, which cause a lot of warnings, at least
on ARM machines:

drivers/mtd/devices/doc2000.c: In function 'doc_write':
drivers/mtd/devices/doc2000.c:854:5: warning: value computed is not used [-Wunused-value]
drivers/mtd/devices/doc2000.c: In function 'doc_erase':
drivers/mtd/devices/doc2000.c:1123:5: warning: value computed is not used [-Wunused-value
drivers/mtd/nand/diskonchip.c: In function 'doc2000_read_byte':
drivers/mtd/nand/diskonchip.c:318:3: warning: value computed is not used [-Wunused-value]

A nicer solution is to use the architecture-defined I/O accessors.
Here, we use the __raw_readl/__raw_writel style, instead of the
proper readl/writel ones, in order to preserve the odd semantics
of the existing macros that have their own barrier implementation
and no byte swap. It would be nice to fix this properly and use
the correct accessors as well as make the word size independent
from the architecture, but I guess the hardware is obsolete
enough that we should better not mess the driver an more than
necessary.

Signed-off-by: Arnd Bergmann <[email protected]>
Cc: David Woodhouse <[email protected]>
Cc: Artem Bityutskiy <[email protected]>
Cc: [email protected]
---
include/linux/mtd/doc2000.h | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/include/linux/mtd/doc2000.h b/include/linux/mtd/doc2000.h
index 0f6fea7..407d1e5 100644
--- a/include/linux/mtd/doc2000.h
+++ b/include/linux/mtd/doc2000.h
@@ -92,12 +92,26 @@
* Others use readb/writeb
*/
#if defined(__arm__)
-#define ReadDOC_(adr, reg) ((unsigned char)(*(volatile __u32 *)(((unsigned long)adr)+((reg)<<2))))
-#define WriteDOC_(d, adr, reg) do{ *(volatile __u32 *)(((unsigned long)adr)+((reg)<<2)) = (__u32)d; wmb();} while(0)
+static inline u8 ReadDOC_(u32 __iomem *addr, unsigned long reg)
+{
+ return __raw_readl(addr + reg);
+}
+static inline void WriteDOC_(u8 data, u32 __iomem *addr, unsigned long reg)
+{
+ __raw_writel(data, addr + reg);
+ wmb();
+}
#define DOC_IOREMAP_LEN 0x8000
#elif defined(__ppc__)
-#define ReadDOC_(adr, reg) ((unsigned char)(*(volatile __u16 *)(((unsigned long)adr)+((reg)<<1))))
-#define WriteDOC_(d, adr, reg) do{ *(volatile __u16 *)(((unsigned long)adr)+((reg)<<1)) = (__u16)d; wmb();} while(0)
+static inline u8 ReadDOC_(u16 __iomem *addr, unsigned long reg)
+{
+ return __raw_readw(addr + reg);
+}
+static inline void WriteDOC_(u8 data, u16 __iomem *addr, unsigned long reg)
+{
+ __raw_writew(data, addr + reg);
+ wmb();
+}
#define DOC_IOREMAP_LEN 0x4000
#else
#define ReadDOC_(adr, reg) readb((void __iomem *)(adr) + (reg))
--
1.7.10

2012-11-06 21:56:49

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 7/8] ata: highbank: mark ahci_highbank_probe as __devinit

The ahci_highbank_probe function is incorrectly marked as __init,
which means it can get discarded at boot time, which might be
a problem if for some reason the device only becomes operational
after loading another module.

Using __devinit instead avoids seeing this warning for every build:

WARNING: vmlinux.o(.data+0xf7b0): Section mismatch in reference from the
variable ahci_highbank_driver to the function .init.text:ahci_highbank_probe()
The variable ahci_highbank_driver references
the function __init ahci_highbank_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

Signed-off-by: Arnd Bergmann <[email protected]>
Cc: Mark Langsdorf <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Jeff Garzik <[email protected]>
---
drivers/ata/sata_highbank.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ata/sata_highbank.c b/drivers/ata/sata_highbank.c
index 0d7c4c2..36a141a 100644
--- a/drivers/ata/sata_highbank.c
+++ b/drivers/ata/sata_highbank.c
@@ -260,7 +260,7 @@ static const struct of_device_id ahci_of_match[] = {
};
MODULE_DEVICE_TABLE(of, ahci_of_match);

-static int __init ahci_highbank_probe(struct platform_device *pdev)
+static int __devinit ahci_highbank_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct ahci_host_priv *hpriv;
--
1.7.10

2012-11-06 21:57:28

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 4/8] sched: warnings in kernel/sched/fair.c

a4c96ae319 "sched: Unthrottle rt runqueues in __disable_runtime()"
turned the unthrottle_offline_cfs_rqs function into a static symbol,
which now triggers a warning about it being potentially unused:

kernel/sched/fair.c:2055:13: warning: 'unthrottle_offline_cfs_rqs' defined but not used [-Wunused-function]

Marking it __maybe_unused shuts up the gcc warning and lets the
compiler safely drop the function body when it's not being used.

To reproduce, build the ARM bcm2835_defconfig.

Signed-off-by: Arnd Bergmann <[email protected]>
Cc: Peter Boonstoppel <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Paul Turner <[email protected]>
Cc: Ingo Molnar <[email protected]>
---
kernel/sched/fair.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 6b800a1..9f52728 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -2052,7 +2052,7 @@ static void destroy_cfs_bandwidth(struct cfs_bandwidth *cfs_b)
hrtimer_cancel(&cfs_b->slack_timer);
}

-static void unthrottle_offline_cfs_rqs(struct rq *rq)
+static void __maybe_unused unthrottle_offline_cfs_rqs(struct rq *rq)
{
struct cfs_rq *cfs_rq;

--
1.7.10

2012-11-06 21:55:43

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 1/8] mtd: diskonchip: don't warn about ARM architecture

Enabling the diskonchip drivers on most architectures results
in a pointless warning "#warning Unknown architecture for
DiskOnChip. No default probe locations defined". The driver
can in fact handle the default location already through the
CONFIG_MTD_DOCPROBE_ADDRESS, which gets set on the platforms
that need it, and we get a run-time error if this is not
set correctly.

Signed-off-by: Arnd Bergmann <[email protected]>
Cc: David Woodhouse <[email protected]>
Cc: Artem Bityutskiy <[email protected]>
Cc: [email protected]
---
drivers/mtd/devices/docprobe.c | 2 --
drivers/mtd/nand/diskonchip.c | 2 --
2 files changed, 4 deletions(-)

diff --git a/drivers/mtd/devices/docprobe.c b/drivers/mtd/devices/docprobe.c
index 706b847..88b3fd3 100644
--- a/drivers/mtd/devices/docprobe.c
+++ b/drivers/mtd/devices/docprobe.c
@@ -70,8 +70,6 @@ static unsigned long __initdata doc_locations[] = {
0xe0000, 0xe2000, 0xe4000, 0xe6000,
0xe8000, 0xea000, 0xec000, 0xee000,
#endif /* CONFIG_MTD_DOCPROBE_HIGH */
-#else
-#warning Unknown architecture for DiskOnChip. No default probe locations defined
#endif
0xffffffff };

diff --git a/drivers/mtd/nand/diskonchip.c b/drivers/mtd/nand/diskonchip.c
index 256eb30..81fa578 100644
--- a/drivers/mtd/nand/diskonchip.c
+++ b/drivers/mtd/nand/diskonchip.c
@@ -53,8 +53,6 @@ static unsigned long __initdata doc_locations[] = {
0xe0000, 0xe2000, 0xe4000, 0xe6000,
0xe8000, 0xea000, 0xec000, 0xee000,
#endif /* CONFIG_MTD_DOCPROBE_HIGH */
-#else
-#warning Unknown architecture for DiskOnChip. No default probe locations defined
#endif
0xffffffff };

--
1.7.10

2012-11-06 22:14:26

by Chris Ball

[permalink] [raw]
Subject: Re: [PATCH 5/8] mmc: dw_mmc: fix modular build for exynos back-end

Hi Arnd,

On Tue, Nov 06 2012, Arnd Bergmann wrote:
> The MODULE_DEVICE_TABLE entry for dw_mci_exynos_match
> was incorrectly copied from the platform back-end, which
> causes this error when building the driver as a loadable
> module:
>
> drivers/mmc/host/dw_mmc-exynos.c: At top level:
> drivers/mmc/host/dw_mmc-exynos.c:226:34: error: '__mod_of_device_table' aliased to undefined symbol 'dw_mci_pltfm_match'
>
> This patch fixes the problem by just using the correct
> string.
>
> Signed-off-by: Arnd Bergmann <[email protected]>
> Cc: Thomas Abraham <[email protected]>
> Cc: Will Newton <[email protected]>
> Cc: Chris Ball <[email protected]>
> ---
> drivers/mmc/host/dw_mmc-exynos.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/dw_mmc-exynos.c b/drivers/mmc/host/dw_mmc-exynos.c
> index 660bbc5..0147ac3a 100644
> --- a/drivers/mmc/host/dw_mmc-exynos.c
> +++ b/drivers/mmc/host/dw_mmc-exynos.c
> @@ -223,7 +223,7 @@ static const struct of_device_id dw_mci_exynos_match[] = {
> .data = (void *)&exynos5250_drv_data, },
> {},
> };
> -MODULE_DEVICE_TABLE(of, dw_mci_pltfm_match);
> +MODULE_DEVICE_TABLE(of, dw_mci_exynos_match);
>
> int dw_mci_exynos_probe(struct platform_device *pdev)
> {

Thanks, pushed to mmc-next for 3.7.

- Chris.
--
Chris Ball <[email protected]> <http://printf.net/>
One Laptop Per Child

2012-11-06 22:15:36

by Chris Ball

[permalink] [raw]
Subject: Re: [PATCH 6/8] mmc: dw_mmc: constify dw_mci_idmac_ops in exynos back-end

Hi Arnd,

On Tue, Nov 06 2012, Arnd Bergmann wrote:
> The of_device_id match data is now marked as const and
> must not be modified. This changes the dw_mmc to mark
> all pointers passing the dw_mci_drv_data or dw_mci_dma_ops
> structures as const, and also marks the static definitions
> as const.
>
> drivers/mmc/host/dw_mmc-exynos.c: In function 'dw_mci_exynos_probe':
> drivers/mmc/host/dw_mmc-exynos.c:234:11: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
>
> Signed-off-by: Arnd Bergmann <[email protected]>
> Cc: Thomas Abraham <[email protected]>
> Cc: Will Newton <[email protected]>
> Cc: Chris Ball <[email protected]>

Thanks, pushed to mmc-next for 3.7.

- Chris.
--
Chris Ball <[email protected]> <http://printf.net/>
One Laptop Per Child

2012-11-16 04:45:00

by Jeff Garzik

[permalink] [raw]
Subject: Re: [PATCH 7/8] ata: highbank: mark ahci_highbank_probe as __devinit

On 11/06/2012 04:55 PM, Arnd Bergmann wrote:
> The ahci_highbank_probe function is incorrectly marked as __init,
> which means it can get discarded at boot time, which might be
> a problem if for some reason the device only becomes operational
> after loading another module.
>
> Using __devinit instead avoids seeing this warning for every build:
>
> WARNING: vmlinux.o(.data+0xf7b0): Section mismatch in reference from the
> variable ahci_highbank_driver to the function .init.text:ahci_highbank_probe()
> The variable ahci_highbank_driver references
> the function __init ahci_highbank_probe()
> If the reference is valid then annotate the
> variable with __init* or __refdata (see linux/init.h) or name the variable:
> *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
>
> Signed-off-by: Arnd Bergmann <[email protected]>
> Cc: Mark Langsdorf <[email protected]>
> Cc: Rob Herring <[email protected]>
> Cc: Jeff Garzik <[email protected]>
> ---
> drivers/ata/sata_highbank.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

applied

2012-11-16 06:23:22

by Fabio Estevam

[permalink] [raw]
Subject: Re: [PATCH 7/8] ata: highbank: mark ahci_highbank_probe as __devinit

Hi Jeff,

On Fri, Nov 16, 2012 at 2:44 AM, Jeff Garzik <[email protected]> wrote:
> On 11/06/2012 04:55 PM, Arnd Bergmann wrote:
>>
>> The ahci_highbank_probe function is incorrectly marked as __init,
>> which means it can get discarded at boot time, which might be
>> a problem if for some reason the device only becomes operational
>> after loading another module.
>>
>> Using __devinit instead avoids seeing this warning for every build:
>>
>> WARNING: vmlinux.o(.data+0xf7b0): Section mismatch in reference from the
>> variable ahci_highbank_driver to the function
>> .init.text:ahci_highbank_probe()
>> The variable ahci_highbank_driver references
>> the function __init ahci_highbank_probe()
>> If the reference is valid then annotate the
>> variable with __init* or __refdata (see linux/init.h) or name the
>> variable:
>> *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
>>
>> Signed-off-by: Arnd Bergmann <[email protected]>
>> Cc: Mark Langsdorf <[email protected]>
>> Cc: Rob Herring <[email protected]>
>> Cc: Jeff Garzik <[email protected]>
>> ---
>> drivers/ata/sata_highbank.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>
> applied

I have also sent the same fix:
https://patchwork.kernel.org/patch/1562141/

2012-11-16 08:50:15

by Artem Bityutskiy

[permalink] [raw]
Subject: Re: [PATCH 1/8] mtd: diskonchip: don't warn about ARM architecture

On Tue, 2012-11-06 at 22:55 +0100, Arnd Bergmann wrote:
> Enabling the diskonchip drivers on most architectures results
> in a pointless warning "#warning Unknown architecture for
> DiskOnChip. No default probe locations defined". The driver
> can in fact handle the default location already through the
> CONFIG_MTD_DOCPROBE_ADDRESS, which gets set on the platforms
> that need it, and we get a run-time error if this is not
> set correctly.

Pushed patches 1, 2, and 3 to l2-mtd.git, thanks!

--
Best Regards,
Artem Bityutskiy


Attachments:
signature.asc (836.00 B)
This is a digitally signed message part