* [PATCH 00/15] Linux-3.10 ARM randconfig fixes
@ 2013-05-31 22:22 Arnd Bergmann
2013-05-31 22:22 ` [PATCH 01/15] irqdomain: export irq_domain_add_simple Arnd Bergmann
` (14 more replies)
0 siblings, 15 replies; 37+ messages in thread
From: Arnd Bergmann @ 2013-05-31 22:22 UTC (permalink / raw)
To: linux-kernel
Cc: patches, linux-arm-kernel, Arnd Bergmann, James E.J. Bottomley,
Artem Bityutskiy, Dave Airlie, David Woodhouse, Herbert Xu,
John W. Linville, Laurent Pinchart, Mauro Carvalho Chehab,
Rafael J. Wysocki, Rob Clark, Rob Herring, Russell King,
Stephen Warren, Thomas Gleixner, Viresh Kumar, cpufreq,
dri-devel, linux-media, linux-mtd, linux-pm, linux-rpi-kernel,
linux-scsi
Hi subsystem maintainers,
These are a few patches left over from doing randconfig tests
a couple of weeks ago. Please apply them directly into your
trees unless you see problems. All patches can theoretically
be seen as bug fixes for 3.10, but they are not critical,
so applying them for 3.11 is fine as well.
Arnd
Arnd Bergmann (15):
irqdomain: export irq_domain_add_simple
mtd: omap2: allow bulding as a module
drm/nouveau: use mdelay instead of large udelay constants
[SCSI] nsp32: use mdelay instead of large udelay constants
hwrng: bcm2835: fix MODULE_LICENSE tag
cpuidle: calxeda: select ARM_CPU_SUSPEND
cpufreq: spear needs cpufreq table
thermal: cpu_cooling: fix stub function
drm: always provide debugfs function prototypes
drm/tilcd: select BACKLIGHT_LCD_SUPPORT
iwlegacy: il_pm_ops is only provided for PM_SLEEP
[media] davinci: vpfe_capture needs i2c
[media] omap3isp: include linux/mm_types.h
clk: tegra: provide tegra_periph_reset_assert alternative
OF: remove #ifdef from linux/of_platform.h
drivers/char/hw_random/bcm2835-rng.c | 2 +-
drivers/cpufreq/Kconfig.arm | 1 +
drivers/cpuidle/Kconfig | 1 +
drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c | 3 ++-
drivers/gpu/drm/tilcdc/Kconfig | 1 +
drivers/media/platform/davinci/Kconfig | 3 +++
drivers/media/platform/omap3isp/ispqueue.h | 1 +
drivers/mtd/nand/Kconfig | 2 +-
drivers/net/wireless/iwlegacy/common.h | 6 +++---
drivers/scsi/nsp32.c | 2 +-
include/drm/drmP.h | 3 +--
include/linux/clk/tegra.h | 5 +++++
include/linux/cpu_cooling.h | 4 ++--
include/linux/of_platform.h | 14 +++-----------
kernel/irq/irqdomain.c | 1 +
15 files changed, 27 insertions(+), 22 deletions(-)
Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
Cc: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: John W. Linville <linville@tuxdriver.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: cpufreq@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-media@vger.kernel.org
Cc: linux-mtd@lists.infradead.org
Cc: linux-pm@vger.kernel.org
Cc: linux-rpi-kernel@lists.infradead.org
Cc: linux-scsi@vger.kernel.org
--
1.8.1.2
^ permalink raw reply [flat|nested] 37+ messages in thread
* [PATCH 01/15] irqdomain: export irq_domain_add_simple
2013-05-31 22:22 [PATCH 00/15] Linux-3.10 ARM randconfig fixes Arnd Bergmann
@ 2013-05-31 22:22 ` Arnd Bergmann
2013-05-31 22:22 ` [PATCH 02/15] mtd: omap2: allow bulding as a module Arnd Bergmann
` (13 subsequent siblings)
14 siblings, 0 replies; 37+ messages in thread
From: Arnd Bergmann @ 2013-05-31 22:22 UTC (permalink / raw)
To: linux-kernel
Cc: patches, linux-arm-kernel, Arnd Bergmann, Benjamin Herrenschmidt,
Grant Likely, Thomas Gleixner, Laurent Pinchart, Magnus Damm
All other irq_domain_add_* functions are exported already, and apparently
this one got left out by mistake, which causes build errors for ARM
allmodconfig kernels:
ERROR: "irq_domain_add_simple" [drivers/gpio/gpio-rcar.ko] undefined!
ERROR: "irq_domain_add_simple" [drivers/gpio/gpio-em.ko] undefined!
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Cc: Magnus Damm <damm@opensource.se>
---
kernel/irq/irqdomain.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index af804b5..47d0564 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -194,6 +194,7 @@ struct irq_domain *irq_domain_add_simple(struct device_node *of_node,
/* A linear domain is the default */
return irq_domain_add_linear(of_node, size, ops, host_data);
}
+EXPORT_SYMBOL_GPL(irq_domain_add_simple);
/**
* irq_domain_add_legacy() - Allocate and register a legacy revmap irq_domain.
--
1.8.1.2
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 02/15] mtd: omap2: allow bulding as a module
2013-05-31 22:22 [PATCH 00/15] Linux-3.10 ARM randconfig fixes Arnd Bergmann
2013-05-31 22:22 ` [PATCH 01/15] irqdomain: export irq_domain_add_simple Arnd Bergmann
@ 2013-05-31 22:22 ` Arnd Bergmann
2013-05-31 22:22 ` [PATCH 03/15] drm/nouveau: use mdelay instead of large udelay constants Arnd Bergmann
` (12 subsequent siblings)
14 siblings, 0 replies; 37+ messages in thread
From: Arnd Bergmann @ 2013-05-31 22:22 UTC (permalink / raw)
To: linux-kernel
Cc: patches, linux-arm-kernel, Arnd Bergmann, David Woodhouse,
Artem Bityutskiy, Afzal Mohammed, Russell King, linux-mtd
The omap2 nand device driver calls into the the elm code, which can
be a loadable module, and in that case it cannot be built-in itself.
I can see no reason why the omap2 driver cannot also be a module,
so let's make the option "tristate" in Kconfig to fix this allmodconfig
build error:
ERROR: "elm_config" [drivers/mtd/nand/omap2.ko] undefined!
ERROR: "elm_decode_bch_error_page" [drivers/mtd/nand/omap2.ko] undefined!
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Tony Lindgren <tony@atomide.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Cc: Afzal Mohammed <afzal@ti.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: linux-mtd@lists.infradead.org
---
drivers/mtd/nand/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index 3ae9105..5ef8f5e 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -95,7 +95,7 @@ config MTD_NAND_OMAP2
config MTD_NAND_OMAP_BCH
depends on MTD_NAND && MTD_NAND_OMAP2 && ARCH_OMAP3
- bool "Enable support for hardware BCH error correction"
+ tristate "Enable support for hardware BCH error correction"
default n
select BCH
select BCH_CONST_PARAMS
--
1.8.1.2
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 03/15] drm/nouveau: use mdelay instead of large udelay constants
2013-05-31 22:22 [PATCH 00/15] Linux-3.10 ARM randconfig fixes Arnd Bergmann
2013-05-31 22:22 ` [PATCH 01/15] irqdomain: export irq_domain_add_simple Arnd Bergmann
2013-05-31 22:22 ` [PATCH 02/15] mtd: omap2: allow bulding as a module Arnd Bergmann
@ 2013-05-31 22:22 ` Arnd Bergmann
2013-05-31 23:34 ` Aaro Koskinen
2013-05-31 22:22 ` [PATCH 04/15] [SCSI] nsp32: " Arnd Bergmann
` (11 subsequent siblings)
14 siblings, 1 reply; 37+ messages in thread
From: Arnd Bergmann @ 2013-05-31 22:22 UTC (permalink / raw)
To: linux-kernel
Cc: patches, linux-arm-kernel, Arnd Bergmann, David Airlie,
Ben Skeggs, dri-devel
ARM cannot handle udelay for more than 2 miliseconds, so we
should use mdelay instead for those.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: David Airlie <airlied@linux.ie>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: dri-devel@lists.freedesktop.org
---
drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c b/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c
index d0817d9..ed7415e 100644
--- a/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c
+++ b/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c
@@ -51,7 +51,8 @@ nv50_dac_sense(struct nv50_disp_priv *priv, int or, u32 loadval)
const u32 doff = (or * 0x800);
int load = -EINVAL;
nv_wr32(priv, 0x61a00c + doff, 0x00100000 | loadval);
- udelay(9500);
+ mdelay(9);
+ udelay(500);
nv_wr32(priv, 0x61a00c + doff, 0x80000000);
load = (nv_rd32(priv, 0x61a00c + doff) & 0x38000000) >> 27;
nv_wr32(priv, 0x61a00c + doff, 0x00000000);
--
1.8.1.2
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 04/15] [SCSI] nsp32: use mdelay instead of large udelay constants
2013-05-31 22:22 [PATCH 00/15] Linux-3.10 ARM randconfig fixes Arnd Bergmann
` (2 preceding siblings ...)
2013-05-31 22:22 ` [PATCH 03/15] drm/nouveau: use mdelay instead of large udelay constants Arnd Bergmann
@ 2013-05-31 22:22 ` Arnd Bergmann
2013-05-31 22:22 ` [PATCH 05/15] hwrng: bcm2835: fix MODULE_LICENSE tag Arnd Bergmann
` (10 subsequent siblings)
14 siblings, 0 replies; 37+ messages in thread
From: Arnd Bergmann @ 2013-05-31 22:22 UTC (permalink / raw)
To: linux-kernel
Cc: patches, linux-arm-kernel, Arnd Bergmann, YOKOTA Hiroshi,
James E.J. Bottomley, linux-scsi
ARM cannot handle udelay for more than 2 miliseconds, so we
should use mdelay instead for those.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: GOTO Masanori <gotom@debian.or.jp>
Cc: YOKOTA Hiroshi <yokota@netlab.is.tsukuba.ac.jp>
Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
Cc: linux-scsi@vger.kernel.org
---
drivers/scsi/nsp32.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c
index 1e3879d..0665f9c 100644
--- a/drivers/scsi/nsp32.c
+++ b/drivers/scsi/nsp32.c
@@ -2899,7 +2899,7 @@ static void nsp32_do_bus_reset(nsp32_hw_data *data)
* reset SCSI bus
*/
nsp32_write1(base, SCSI_BUS_CONTROL, BUSCTL_RST);
- udelay(RESET_HOLD_TIME);
+ mdelay(RESET_HOLD_TIME / 1000);
nsp32_write1(base, SCSI_BUS_CONTROL, 0);
for(i = 0; i < 5; i++) {
intrdat = nsp32_read2(base, IRQ_STATUS); /* dummy read */
--
1.8.1.2
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 05/15] hwrng: bcm2835: fix MODULE_LICENSE tag
2013-05-31 22:22 [PATCH 00/15] Linux-3.10 ARM randconfig fixes Arnd Bergmann
` (3 preceding siblings ...)
2013-05-31 22:22 ` [PATCH 04/15] [SCSI] nsp32: " Arnd Bergmann
@ 2013-05-31 22:22 ` Arnd Bergmann
2013-06-21 7:16 ` Herbert Xu
2013-05-31 22:22 ` [PATCH 06/15] cpuidle: calxeda: select ARM_CPU_SUSPEND Arnd Bergmann
` (9 subsequent siblings)
14 siblings, 1 reply; 37+ messages in thread
From: Arnd Bergmann @ 2013-05-31 22:22 UTC (permalink / raw)
To: linux-kernel
Cc: patches, linux-arm-kernel, Arnd Bergmann, Dom Cobley,
Lubomir Rintel, Stephen Warren, Matt Mackall, linux-rpi-kernel,
Herbert Xu
The MODULE_LICENSE macro invocation must use either "GPL" or "GPL v2",
but not "GPLv2" in order to be detected by the module loader.
This fixes the allmodconfig build error:
FATAL: modpost: GPL-incompatible module bcm2835-rng.ko uses GPL-only symbol 'platform_driver_unregister'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Dom Cobley <popcornmix@gmail.com>
Cc: Lubomir Rintel <lkundrak@v3.sk>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Matt Mackall <mpm@selenic.com>
Cc: linux-rpi-kernel@lists.infradead.org
Cc: Herbert Xu <herbert@gondor.apana.org.au>
---
drivers/char/hw_random/bcm2835-rng.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/char/hw_random/bcm2835-rng.c b/drivers/char/hw_random/bcm2835-rng.c
index eb7f147..43577ca 100644
--- a/drivers/char/hw_random/bcm2835-rng.c
+++ b/drivers/char/hw_random/bcm2835-rng.c
@@ -110,4 +110,4 @@ module_platform_driver(bcm2835_rng_driver);
MODULE_AUTHOR("Lubomir Rintel <lkundrak@v3.sk>");
MODULE_DESCRIPTION("BCM2835 Random Number Generator (RNG) driver");
-MODULE_LICENSE("GPLv2");
+MODULE_LICENSE("GPL v2");
--
1.8.1.2
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 06/15] cpuidle: calxeda: select ARM_CPU_SUSPEND
2013-05-31 22:22 [PATCH 00/15] Linux-3.10 ARM randconfig fixes Arnd Bergmann
` (4 preceding siblings ...)
2013-05-31 22:22 ` [PATCH 05/15] hwrng: bcm2835: fix MODULE_LICENSE tag Arnd Bergmann
@ 2013-05-31 22:22 ` Arnd Bergmann
2013-05-31 22:22 ` [PATCH 07/15] cpufreq: spear needs cpufreq table Arnd Bergmann
` (8 subsequent siblings)
14 siblings, 0 replies; 37+ messages in thread
From: Arnd Bergmann @ 2013-05-31 22:22 UTC (permalink / raw)
To: linux-kernel; +Cc: patches, linux-arm-kernel, Arnd Bergmann, linux-pm
Like other ARM specific drivers, this one requires ARM_CPU_SUSPEND,
as shown by this linker error:
drivers/built-in.o: In function `calxeda_pwrdown_idle':
drivers/cpuidle/cpuidle-calxeda.c:84: undefined reference to `cpu_suspend'
drivers/cpuidle/cpuidle-calxeda.c:86: undefined reference to `cpu_resume'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: linux-pm@vger.kernel.org
---
drivers/cpuidle/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/cpuidle/Kconfig b/drivers/cpuidle/Kconfig
index c4cc27e..e21cdfa 100644
--- a/drivers/cpuidle/Kconfig
+++ b/drivers/cpuidle/Kconfig
@@ -36,6 +36,7 @@ if CPU_IDLE
config CPU_IDLE_CALXEDA
bool "CPU Idle Driver for Calxeda processors"
depends on ARCH_HIGHBANK
+ select ARM_CPU_SUSPEND
help
Select this to enable cpuidle on Calxeda processors.
--
1.8.1.2
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 07/15] cpufreq: spear needs cpufreq table
2013-05-31 22:22 [PATCH 00/15] Linux-3.10 ARM randconfig fixes Arnd Bergmann
` (5 preceding siblings ...)
2013-05-31 22:22 ` [PATCH 06/15] cpuidle: calxeda: select ARM_CPU_SUSPEND Arnd Bergmann
@ 2013-05-31 22:22 ` Arnd Bergmann
2013-06-01 1:58 ` Viresh Kumar
2013-05-31 22:22 ` [PATCH 08/15] thermal: cpu_cooling: fix stub function Arnd Bergmann
` (7 subsequent siblings)
14 siblings, 1 reply; 37+ messages in thread
From: Arnd Bergmann @ 2013-05-31 22:22 UTC (permalink / raw)
To: linux-kernel
Cc: patches, linux-arm-kernel, Arnd Bergmann, Rafael J. Wysocki,
Viresh Kumar, cpufreq, linux-pm
Like a lot of the other cpufreq drivers, this one needs to
select CONFIG_CPU_FREQ_TABLE to avoid a build error like
drivers/built-in.o: In function `spear_cpufreq_exit':
spear-cpufreq.c:198: undefined reference to `cpufreq_frequency_table_put_attr'
drivers/built-in.o: In function `spear_cpufreq_verify':
spear-cpufreq.c:35: undefined reference to `cpufreq_frequency_table_verify'
drivers/built-in.o: In function `spear_cpufreq_init':
spear-cpufreq.c:181: undefined reference to `cpufreq_frequency_table_cpuinfo'
spear-cpufreq.c:187: undefined reference to `cpufreq_frequency_table_get_attr'
drivers/built-in.o: In function `spear_cpufreq_target':
spear-cpufreq.c:120: undefined reference to `cpufreq_frequency_table_target'
drivers/built-in.o:(.data+0x5e63c): undefined reference to `cpufreq_freq_attr_scaling_available_freqs'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: cpufreq@vger.kernel.org
Cc: linux-pm@vger.kernel.org
---
drivers/cpufreq/Kconfig.arm | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
index a924408..d3f2c6b 100644
--- a/drivers/cpufreq/Kconfig.arm
+++ b/drivers/cpufreq/Kconfig.arm
@@ -205,6 +205,7 @@ config ARM_SA1110_CPUFREQ
config ARM_SPEAR_CPUFREQ
bool "SPEAr CPUFreq support"
depends on PLAT_SPEAR
+ select CPU_FREQ_TABLE
default y
help
This adds the CPUFreq driver support for SPEAr SOCs.
--
1.8.1.2
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 08/15] thermal: cpu_cooling: fix stub function
2013-05-31 22:22 [PATCH 00/15] Linux-3.10 ARM randconfig fixes Arnd Bergmann
` (6 preceding siblings ...)
2013-05-31 22:22 ` [PATCH 07/15] cpufreq: spear needs cpufreq table Arnd Bergmann
@ 2013-05-31 22:22 ` Arnd Bergmann
2013-06-19 17:25 ` Eduardo Valentin
2013-05-31 22:22 ` [PATCH 09/15] drm: always provide debugfs function prototypes Arnd Bergmann
` (6 subsequent siblings)
14 siblings, 1 reply; 37+ messages in thread
From: Arnd Bergmann @ 2013-05-31 22:22 UTC (permalink / raw)
To: linux-kernel
Cc: patches, linux-arm-kernel, Arnd Bergmann, Eduardo Valentin,
Zhang Rui, Amit Daniel kachhap
The function stub for cpufreq_cooling_get_level introduced
in 57df81069 "Thermal: exynos: fix cooling state translation"
is not syntactically correct C and needs to be fixed to avoid
this error:
In file included from drivers/thermal/db8500_thermal.c:20:0:
include/linux/cpu_cooling.h: In function 'cpufreq_cooling_get_level':
include/linux/cpu_cooling.h:57:1:
error: parameter name omitted unsigned long cpufreq_cooling_get_level(unsigned int, unsigned int) ^
include/linux/cpu_cooling.h:57:1: error: parameter name omitted
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Eduardo Valentin <eduardo.valentin@ti.com>
Cc: Eduardo Valentin <eduardo.valentin@ti.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Amit Daniel kachhap <amit.daniel@samsung.com>
---
include/linux/cpu_cooling.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/cpu_cooling.h b/include/linux/cpu_cooling.h
index 282e270..a5d52ee 100644
--- a/include/linux/cpu_cooling.h
+++ b/include/linux/cpu_cooling.h
@@ -41,7 +41,7 @@ cpufreq_cooling_register(const struct cpumask *clip_cpus);
*/
void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev);
-unsigned long cpufreq_cooling_get_level(unsigned int, unsigned int);
+unsigned long cpufreq_cooling_get_level(unsigned int cpu, unsigned int freq);
#else /* !CONFIG_CPU_THERMAL */
static inline struct thermal_cooling_device *
cpufreq_cooling_register(const struct cpumask *clip_cpus)
@@ -54,7 +54,7 @@ void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev)
return;
}
static inline
-unsigned long cpufreq_cooling_get_level(unsigned int, unsigned int)
+unsigned long cpufreq_cooling_get_level(unsigned int cpu, unsigned int freq)
{
return THERMAL_CSTATE_INVALID;
}
--
1.8.1.2
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 09/15] drm: always provide debugfs function prototypes
2013-05-31 22:22 [PATCH 00/15] Linux-3.10 ARM randconfig fixes Arnd Bergmann
` (7 preceding siblings ...)
2013-05-31 22:22 ` [PATCH 08/15] thermal: cpu_cooling: fix stub function Arnd Bergmann
@ 2013-05-31 22:22 ` Arnd Bergmann
2013-05-31 22:22 ` [PATCH 10/15] drm/tilcd: select BACKLIGHT_LCD_SUPPORT Arnd Bergmann
` (5 subsequent siblings)
14 siblings, 0 replies; 37+ messages in thread
From: Arnd Bergmann @ 2013-05-31 22:22 UTC (permalink / raw)
To: linux-kernel
Cc: patches, linux-arm-kernel, Arnd Bergmann, Ben Gamari, Dave Airlie
It is generally considered bad style to enclose function prototypes
in header files in #ifdef. This case illustrates why that is:
The tegra host1x driver calls into the debugfs functions if
CONFIG_DEBUG_FS is enabled, but that code is otherwise already
discarded by the compiler, so leaving the prototype in place
actually makes everything work.
drivers/gpu/host1x/drm/dc.c: In function 'tegra_dc_debugfs_init':
drivers/gpu/host1x/drm/dc.c:1004:2: error: implicit declaration of function 'drm_debugfs_create_files' [-Werror=implicit-function-declaration]
drivers/gpu/host1x/drm/dc.c: In function 'tegra_dc_debugfs_exit': drivers/gpu/host1x/drm/dc.c:1026:2: error: implicit declaration of function 'drm_debugfs_remove_files' [-Werror=implicit-function-declaration]
Cc: Ben Gamari <bgamari@gmail.com>
Cc: Dave Airlie <airlied@redhat.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
include/drm/drmP.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 63d17ee..8bc105e 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -1551,7 +1551,7 @@ extern int drm_proc_init(struct drm_minor *minor, struct proc_dir_entry *root);
extern int drm_proc_cleanup(struct drm_minor *minor, struct proc_dir_entry *root);
/* Debugfs support */
-#if defined(CONFIG_DEBUG_FS)
+
extern int drm_debugfs_init(struct drm_minor *minor, int minor_id,
struct dentry *root);
extern int drm_debugfs_create_files(struct drm_info_list *files, int count,
@@ -1559,7 +1559,6 @@ extern int drm_debugfs_create_files(struct drm_info_list *files, int count,
extern int drm_debugfs_remove_files(struct drm_info_list *files, int count,
struct drm_minor *minor);
extern int drm_debugfs_cleanup(struct drm_minor *minor);
-#endif
/* Info file support */
extern int drm_name_info(struct seq_file *m, void *data);
--
1.8.1.2
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 10/15] drm/tilcd: select BACKLIGHT_LCD_SUPPORT
2013-05-31 22:22 [PATCH 00/15] Linux-3.10 ARM randconfig fixes Arnd Bergmann
` (8 preceding siblings ...)
2013-05-31 22:22 ` [PATCH 09/15] drm: always provide debugfs function prototypes Arnd Bergmann
@ 2013-05-31 22:22 ` Arnd Bergmann
2013-05-31 22:22 ` [PATCH 11/15] iwlegacy: il_pm_ops is only provided for PM_SLEEP Arnd Bergmann
` (4 subsequent siblings)
14 siblings, 0 replies; 37+ messages in thread
From: Arnd Bergmann @ 2013-05-31 22:22 UTC (permalink / raw)
To: linux-kernel
Cc: patches, linux-arm-kernel, Arnd Bergmann, Rob Clark, dri-devel,
Dave Airlie
The dependecies for BACKLIGHT_CLASS_DEVICE are defined a bit
strange, but it seems one has to always select both BACKLIGHT_CLASS_DEVICE
and BACKLIGHT_LCD_SUPPORT to avoid this error:
drivers/gpu/drm/tilcdc/tilcdc_panel.c:396:
undefined reference to `of_find_backlight_by_node'
Cc: Rob Clark <robdclark@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Cc: Dave Airlie <airlied@redhat.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/gpu/drm/tilcdc/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/tilcdc/Kconfig b/drivers/gpu/drm/tilcdc/Kconfig
index e461e99..7a4d101 100644
--- a/drivers/gpu/drm/tilcdc/Kconfig
+++ b/drivers/gpu/drm/tilcdc/Kconfig
@@ -6,6 +6,7 @@ config DRM_TILCDC
select DRM_GEM_CMA_HELPER
select VIDEOMODE_HELPERS
select BACKLIGHT_CLASS_DEVICE
+ select BACKLIGHT_LCD_SUPPORT
help
Choose this option if you have an TI SoC with LCDC display
controller, for example AM33xx in beagle-bone, DA8xx, or
--
1.8.1.2
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 11/15] iwlegacy: il_pm_ops is only provided for PM_SLEEP
2013-05-31 22:22 [PATCH 00/15] Linux-3.10 ARM randconfig fixes Arnd Bergmann
` (9 preceding siblings ...)
2013-05-31 22:22 ` [PATCH 10/15] drm/tilcd: select BACKLIGHT_LCD_SUPPORT Arnd Bergmann
@ 2013-05-31 22:22 ` Arnd Bergmann
2013-06-01 5:43 ` Brian Norris
2013-05-31 22:22 ` [PATCH 12/15] [media] davinci: vpfe_capture needs i2c Arnd Bergmann
` (3 subsequent siblings)
14 siblings, 1 reply; 37+ messages in thread
From: Arnd Bergmann @ 2013-05-31 22:22 UTC (permalink / raw)
To: linux-kernel
Cc: patches, linux-arm-kernel, Arnd Bergmann, Johannes Berg,
John W. Linville, Borislav Petkov
This makes sure the conditionals for the declaration match the
definition, so we provide the alternative
#else
#define IL_LEGACY_PM_OPS NULL
#endif
in the correct cases. As suggested by Borislav Petkov, this removes
the comments for the #else and #endif lines.
drivers/built-in.o:(.data+0x57974): undefined reference to `il_pm_ops'
Cc: Johannes Berg <johannes.berg@intel.com>
Cc: John W. Linville <linville@tuxdriver.com>
Cc: Borislav Petkov <bp@alien8.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/net/wireless/iwlegacy/common.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/iwlegacy/common.h b/drivers/net/wireless/iwlegacy/common.h
index f8246f2..30dda98 100644
--- a/drivers/net/wireless/iwlegacy/common.h
+++ b/drivers/net/wireless/iwlegacy/common.h
@@ -1832,14 +1832,14 @@ u32 il_usecs_to_beacons(struct il_priv *il, u32 usec, u32 beacon_interval);
__le32 il_add_beacon_time(struct il_priv *il, u32 base, u32 addon,
u32 beacon_interval);
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
extern const struct dev_pm_ops il_pm_ops;
#define IL_LEGACY_PM_OPS (&il_pm_ops)
-#else /* !CONFIG_PM */
+#else
-#define IL_LEGACY_PM_OPS NULL
+#define
#endif /* !CONFIG_PM */
--
1.8.1.2
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 12/15] [media] davinci: vpfe_capture needs i2c
2013-05-31 22:22 [PATCH 00/15] Linux-3.10 ARM randconfig fixes Arnd Bergmann
` (10 preceding siblings ...)
2013-05-31 22:22 ` [PATCH 11/15] iwlegacy: il_pm_ops is only provided for PM_SLEEP Arnd Bergmann
@ 2013-05-31 22:22 ` Arnd Bergmann
2013-05-31 22:22 ` [PATCH 13/15] [media] omap3isp: include linux/mm_types.h Arnd Bergmann
` (2 subsequent siblings)
14 siblings, 0 replies; 37+ messages in thread
From: Arnd Bergmann @ 2013-05-31 22:22 UTC (permalink / raw)
To: linux-kernel
Cc: patches, linux-arm-kernel, Arnd Bergmann, Hans Verkuil,
Mauro Carvalho Chehab
The vpfe_capture driver is implicitly built for three of the davinci
capture drivers but depends on i2c, so we need to add the dependency
in Kconfig for each driver using this.
drivers/media/platform/davinci/vpfe_capture.c: In function 'vpfe_probe':
drivers/media/platform/davinci/vpfe_capture.c:1934:2: error: implicit declaration of function 'i2c_get_adapter' [-Werror=implicit-function-declaration]
drivers/media/platform/davinci/vpfe_capture.c:1934:11: warning: assignment makes pointer from integer without a cast [enabled by default]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
---
drivers/media/platform/davinci/Kconfig | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/media/platform/davinci/Kconfig b/drivers/media/platform/davinci/Kconfig
index afb3aec..02da88b 100644
--- a/drivers/media/platform/davinci/Kconfig
+++ b/drivers/media/platform/davinci/Kconfig
@@ -27,6 +27,7 @@ config VIDEO_DAVINCI_VPIF_CAPTURE
config VIDEO_DM6446_CCDC
tristate "TI DM6446 CCDC video capture driver"
depends on VIDEO_V4L2 && (ARCH_DAVINCI || ARCH_OMAP3)
+ depends on I2C
select VIDEOBUF_DMA_CONTIG
help
Enables DaVinci CCD hw module. DaVinci CCDC hw interfaces
@@ -41,6 +42,7 @@ config VIDEO_DM6446_CCDC
config VIDEO_DM355_CCDC
tristate "TI DM355 CCDC video capture driver"
depends on VIDEO_V4L2 && ARCH_DAVINCI
+ depends on I2C
select VIDEOBUF_DMA_CONTIG
help
Enables DM355 CCD hw module. DM355 CCDC hw interfaces
@@ -55,6 +57,7 @@ config VIDEO_DM355_CCDC
config VIDEO_DM365_ISIF
tristate "TI DM365 ISIF video capture driver"
depends on VIDEO_V4L2 && ARCH_DAVINCI
+ depends on I2C
select VIDEOBUF_DMA_CONTIG
help
Enables ISIF hw module. This is the hardware module for
--
1.8.1.2
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 13/15] [media] omap3isp: include linux/mm_types.h
2013-05-31 22:22 [PATCH 00/15] Linux-3.10 ARM randconfig fixes Arnd Bergmann
` (11 preceding siblings ...)
2013-05-31 22:22 ` [PATCH 12/15] [media] davinci: vpfe_capture needs i2c Arnd Bergmann
@ 2013-05-31 22:22 ` Arnd Bergmann
2013-06-01 15:30 ` Laurent Pinchart
2013-05-31 22:22 ` [PATCH 14/15] clk: tegra: provide tegra_periph_reset_assert alternative Arnd Bergmann
2013-05-31 22:22 ` [PATCH 15/15] OF: remove #ifdef from linux/of_platform.h Arnd Bergmann
14 siblings, 1 reply; 37+ messages in thread
From: Arnd Bergmann @ 2013-05-31 22:22 UTC (permalink / raw)
To: linux-kernel
Cc: patches, linux-arm-kernel, Arnd Bergmann, Mauro Carvalho Chehab,
linux-media, Konstantin Khlebnikov, Laurent Pinchart
The ispqueue.h file uses vm_flags_t, which is defined in
linux/mm_types.h, so we must include that header in order
to build in all configurations.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: linux-media@vger.kernel.org
Cc: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
drivers/media/platform/omap3isp/ispqueue.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/platform/omap3isp/ispqueue.h b/drivers/media/platform/omap3isp/ispqueue.h
index 908dfd7..e6e720c 100644
--- a/drivers/media/platform/omap3isp/ispqueue.h
+++ b/drivers/media/platform/omap3isp/ispqueue.h
@@ -31,6 +31,7 @@
#include <linux/mutex.h>
#include <linux/videodev2.h>
#include <linux/wait.h>
+#include <linux/mm_types.h>
struct isp_video_queue;
struct page;
--
1.8.1.2
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 14/15] clk: tegra: provide tegra_periph_reset_assert alternative
2013-05-31 22:22 [PATCH 00/15] Linux-3.10 ARM randconfig fixes Arnd Bergmann
` (12 preceding siblings ...)
2013-05-31 22:22 ` [PATCH 13/15] [media] omap3isp: include linux/mm_types.h Arnd Bergmann
@ 2013-05-31 22:22 ` Arnd Bergmann
2013-05-31 22:22 ` [PATCH 15/15] OF: remove #ifdef from linux/of_platform.h Arnd Bergmann
14 siblings, 0 replies; 37+ messages in thread
From: Arnd Bergmann @ 2013-05-31 22:22 UTC (permalink / raw)
To: linux-kernel; +Cc: patches, linux-arm-kernel, Arnd Bergmann
We have some tegra device drivers that are written to be platform
independent but still use the tegra specific tegra_periph_reset_assert
function. In order to build and link them without errors,
this provides a static inline version of these functions that
does nothing when Tegra support is disabled.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
include/linux/clk/tegra.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/linux/clk/tegra.h b/include/linux/clk/tegra.h
index 642789b..1397190 100644
--- a/include/linux/clk/tegra.h
+++ b/include/linux/clk/tegra.h
@@ -120,8 +120,13 @@ static inline void tegra_cpu_clock_resume(void)
}
#endif
+#ifdef ARCH_TEGRA
void tegra_periph_reset_deassert(struct clk *c);
void tegra_periph_reset_assert(struct clk *c);
+#else
+static inline void tegra_periph_reset_deassert(struct clk *c) {}
+static inline void tegra_periph_reset_assert(struct clk *c) {}
+#endif
void tegra_clocks_init(void);
void tegra_clocks_apply_init_table(void);
--
1.8.1.2
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 15/15] OF: remove #ifdef from linux/of_platform.h
2013-05-31 22:22 [PATCH 00/15] Linux-3.10 ARM randconfig fixes Arnd Bergmann
` (13 preceding siblings ...)
2013-05-31 22:22 ` [PATCH 14/15] clk: tegra: provide tegra_periph_reset_assert alternative Arnd Bergmann
@ 2013-05-31 22:22 ` Arnd Bergmann
2013-06-01 14:01 ` Rob Herring
14 siblings, 1 reply; 37+ messages in thread
From: Arnd Bergmann @ 2013-05-31 22:22 UTC (permalink / raw)
To: linux-kernel
Cc: patches, linux-arm-kernel, Arnd Bergmann, Grant Likely, Rob Herring
A lot of code uses the functions from of_platform.h when built for
devicetree-enabled platforms but can also be built without them.
In order to avoid using #ifdef everywhere in drivers, this
makes all the function declarations visible, which means we
can use "if (IS_ENABLED(CONFIG_OF))" in driver code and get build
coverage over the code but let the compiler drop the reference
in the object code.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rob Herring <rob.herring@calxeda.com>
---
include/linux/of_platform.h | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h
index 2a93b64..7747ad0 100644
--- a/include/linux/of_platform.h
+++ b/include/linux/of_platform.h
@@ -13,8 +13,6 @@
#include <linux/device.h>
#include <linux/mod_devicetable.h>
-
-#ifdef CONFIG_OF_DEVICE
#include <linux/pm.h>
#include <linux/of_device.h>
#include <linux/platform_device.h>
@@ -82,7 +80,6 @@ extern struct platform_device *of_device_alloc(struct device_node *np,
struct device *parent);
extern struct platform_device *of_find_device_by_node(struct device_node *np);
-#ifdef CONFIG_OF_ADDRESS /* device reg helpers depend on OF_ADDRESS */
/* Platform devices and busses creation */
extern struct platform_device *of_platform_device_create(struct device_node *np,
const char *bus_id,
@@ -91,17 +88,12 @@ extern struct platform_device *of_platform_device_create(struct device_node *np,
extern int of_platform_bus_probe(struct device_node *root,
const struct of_device_id *matches,
struct device *parent);
+#ifdef CONFIG_OF_ADDRESS
extern int of_platform_populate(struct device_node *root,
const struct of_device_id *matches,
const struct of_dev_auxdata *lookup,
struct device *parent);
-#endif /* CONFIG_OF_ADDRESS */
-
-#endif /* CONFIG_OF_DEVICE */
-
-#if !defined(CONFIG_OF_ADDRESS)
-struct of_dev_auxdata;
-struct device_node;
+#else
static inline int of_platform_populate(struct device_node *root,
const struct of_device_id *matches,
const struct of_dev_auxdata *lookup,
@@ -109,6 +101,6 @@ static inline int of_platform_populate(struct device_node *root,
{
return -ENODEV;
}
-#endif /* !CONFIG_OF_ADDRESS */
+#endif
#endif /* _LINUX_OF_PLATFORM_H */
--
1.8.1.2
^ permalink raw reply related [flat|nested] 37+ messages in thread
* Re: [PATCH 03/15] drm/nouveau: use mdelay instead of large udelay constants
2013-05-31 22:22 ` [PATCH 03/15] drm/nouveau: use mdelay instead of large udelay constants Arnd Bergmann
@ 2013-05-31 23:34 ` Aaro Koskinen
0 siblings, 0 replies; 37+ messages in thread
From: Aaro Koskinen @ 2013-05-31 23:34 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-kernel, David Airlie, dri-devel, Ben Skeggs, patches,
linux-arm-kernel
Hi,
On Sat, Jun 01, 2013 at 12:22:40AM +0200, Arnd Bergmann wrote:
> ARM cannot handle udelay for more than 2 miliseconds, so we
^^^^
There's l missing here.
> should use mdelay instead for those.
Could this be handled inside ARM udelay() instead? Probably most of the
delay values are compile-time constants.
A.
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 07/15] cpufreq: spear needs cpufreq table
2013-05-31 22:22 ` [PATCH 07/15] cpufreq: spear needs cpufreq table Arnd Bergmann
@ 2013-06-01 1:58 ` Viresh Kumar
2013-06-01 9:03 ` Arnd Bergmann
0 siblings, 1 reply; 37+ messages in thread
From: Viresh Kumar @ 2013-06-01 1:58 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-kernel, patches, linux-arm-kernel, Rafael J. Wysocki,
cpufreq, linux-pm
On 1 June 2013 03:52, Arnd Bergmann <arnd@arndb.de> wrote:
> Like a lot of the other cpufreq drivers, this one needs to
> select CONFIG_CPU_FREQ_TABLE to avoid a build error like
>
> drivers/built-in.o: In function `spear_cpufreq_exit':
> spear-cpufreq.c:198: undefined reference to `cpufreq_frequency_table_put_attr'
> drivers/built-in.o: In function `spear_cpufreq_verify':
> spear-cpufreq.c:35: undefined reference to `cpufreq_frequency_table_verify'
> drivers/built-in.o: In function `spear_cpufreq_init':
> spear-cpufreq.c:181: undefined reference to `cpufreq_frequency_table_cpuinfo'
> spear-cpufreq.c:187: undefined reference to `cpufreq_frequency_table_get_attr'
> drivers/built-in.o: In function `spear_cpufreq_target':
> spear-cpufreq.c:120: undefined reference to `cpufreq_frequency_table_target'
> drivers/built-in.o:(.data+0x5e63c): undefined reference to `cpufreq_freq_attr_scaling_available_freqs'
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: Rafael J. Wysocki <rjw@sisk.pl>
> Cc: Viresh Kumar <viresh.kumar@linaro.org>
> Cc: cpufreq@vger.kernel.org
> Cc: linux-pm@vger.kernel.org
> ---
> drivers/cpufreq/Kconfig.arm | 1 +
> 1 file changed, 1 insertion(+)
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
BTW, you want me to apply this one or take it through arm-soc tree?
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 11/15] iwlegacy: il_pm_ops is only provided for PM_SLEEP
2013-05-31 22:22 ` [PATCH 11/15] iwlegacy: il_pm_ops is only provided for PM_SLEEP Arnd Bergmann
@ 2013-06-01 5:43 ` Brian Norris
2013-06-01 9:03 ` Arnd Bergmann
2013-06-01 9:12 ` [PATCH v2] " Arnd Bergmann
0 siblings, 2 replies; 37+ messages in thread
From: Brian Norris @ 2013-06-01 5:43 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-kernel, patches, linux-arm-kernel, Johannes Berg,
John W. Linville, Borislav Petkov
Hi Arnd,
On Fri, May 31, 2013 at 3:22 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> This makes sure the conditionals for the declaration match the
> definition, so we provide the alternative
>
> #else
> #define IL_LEGACY_PM_OPS NULL
> #endif
>
> in the correct cases. As suggested by Borislav Petkov, this removes
> the comments for the #else and #endif lines.
You seem to have missed the #endif line.
> drivers/built-in.o:(.data+0x57974): undefined reference to `il_pm_ops'
>
> Cc: Johannes Berg <johannes.berg@intel.com>
> Cc: John W. Linville <linville@tuxdriver.com>
> Cc: Borislav Petkov <bp@alien8.de>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/net/wireless/iwlegacy/common.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/iwlegacy/common.h b/drivers/net/wireless/iwlegacy/common.h
> index f8246f2..30dda98 100644
> --- a/drivers/net/wireless/iwlegacy/common.h
> +++ b/drivers/net/wireless/iwlegacy/common.h
> @@ -1832,14 +1832,14 @@ u32 il_usecs_to_beacons(struct il_priv *il, u32 usec, u32 beacon_interval);
> __le32 il_add_beacon_time(struct il_priv *il, u32 base, u32 addon,
> u32 beacon_interval);
>
> -#ifdef CONFIG_PM
> +#ifdef CONFIG_PM_SLEEP
> extern const struct dev_pm_ops il_pm_ops;
>
> #define IL_LEGACY_PM_OPS (&il_pm_ops)
>
> -#else /* !CONFIG_PM */
> +#else
>
> -#define IL_LEGACY_PM_OPS NULL
> +#define
>
> #endif /* !CONFIG_PM */
This should not be "!CONFIG_PM" any more.
Brian
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 07/15] cpufreq: spear needs cpufreq table
2013-06-01 1:58 ` Viresh Kumar
@ 2013-06-01 9:03 ` Arnd Bergmann
2013-06-01 9:45 ` Viresh Kumar
0 siblings, 1 reply; 37+ messages in thread
From: Arnd Bergmann @ 2013-06-01 9:03 UTC (permalink / raw)
To: Viresh Kumar
Cc: linux-kernel, patches, linux-arm-kernel, Rafael J. Wysocki,
cpufreq, linux-pm
On Saturday 01 June 2013 07:28:01 Viresh Kumar wrote:
> On 1 June 2013 03:52, Arnd Bergmann <arnd@arndb.de> wrote:
> > Like a lot of the other cpufreq drivers, this one needs to
> > select CONFIG_CPU_FREQ_TABLE to avoid a build error like
> >
> > drivers/built-in.o: In function `spear_cpufreq_exit':
> > spear-cpufreq.c:198: undefined reference to `cpufreq_frequency_table_put_attr'
> > drivers/built-in.o: In function `spear_cpufreq_verify':
> > spear-cpufreq.c:35: undefined reference to `cpufreq_frequency_table_verify'
> > drivers/built-in.o: In function `spear_cpufreq_init':
> > spear-cpufreq.c:181: undefined reference to `cpufreq_frequency_table_cpuinfo'
> > spear-cpufreq.c:187: undefined reference to `cpufreq_frequency_table_get_attr'
> > drivers/built-in.o: In function `spear_cpufreq_target':
> > spear-cpufreq.c:120: undefined reference to `cpufreq_frequency_table_target'
> > drivers/built-in.o:(.data+0x5e63c): undefined reference to `cpufreq_freq_attr_scaling_available_freqs'
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > Cc: Rafael J. Wysocki <rjw@sisk.pl>
> > Cc: Viresh Kumar <viresh.kumar@linaro.org>
> > Cc: cpufreq@vger.kernel.org
> > Cc: linux-pm@vger.kernel.org
> > ---
> > drivers/cpufreq/Kconfig.arm | 1 +
> > 1 file changed, 1 insertion(+)
>
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
>
> BTW, you want me to apply this one or take it through arm-soc tree?
As I said in the introductory mail, I would prefer it if you
can pick it up. Thanks!
Arnd
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 11/15] iwlegacy: il_pm_ops is only provided for PM_SLEEP
2013-06-01 5:43 ` Brian Norris
@ 2013-06-01 9:03 ` Arnd Bergmann
2013-06-01 9:12 ` [PATCH v2] " Arnd Bergmann
1 sibling, 0 replies; 37+ messages in thread
From: Arnd Bergmann @ 2013-06-01 9:03 UTC (permalink / raw)
To: Brian Norris
Cc: linux-kernel, patches, linux-arm-kernel, Johannes Berg,
John W. Linville, Borislav Petkov
On Friday 31 May 2013 22:43:23 Brian Norris wrote:
> On Fri, May 31, 2013 at 3:22 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> > This makes sure the conditionals for the declaration match the
> > definition, so we provide the alternative
> >
> > #else
> > #define IL_LEGACY_PM_OPS NULL
> > #endif
> >
> > in the correct cases. As suggested by Borislav Petkov, this removes
> > the comments for the #else and #endif lines.
>
> You seem to have missed the #endif line.
Yes, I screwed it up with a last minute change, sorry about this.
Will follow up with a new one.
Arnd
^ permalink raw reply [flat|nested] 37+ messages in thread
* [PATCH v2] iwlegacy: il_pm_ops is only provided for PM_SLEEP
2013-06-01 5:43 ` Brian Norris
2013-06-01 9:03 ` Arnd Bergmann
@ 2013-06-01 9:12 ` Arnd Bergmann
1 sibling, 0 replies; 37+ messages in thread
From: Arnd Bergmann @ 2013-06-01 9:12 UTC (permalink / raw)
To: Brian Norris
Cc: linux-kernel, patches, linux-arm-kernel, Johannes Berg,
John W. Linville, Borislav Petkov
This makes sure the conditionals for the declaration match the
definition, so we provide the alternative
#else
#define IL_LEGACY_PM_OPS NULL
#endif
in the correct cases. As suggested by Borislav Petkov, this removes
the comments for the #else and #endif lines.
drivers/built-in.o:(.data+0x57974): undefined reference to `il_pm_ops'
Cc: Johannes Berg <johannes.berg@intel.com>
Cc: John W. Linville <linville@tuxdriver.com>
Cc: Borislav Petkov <bp@alien8.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
v2: Fixed the obvious bug pointed out by Brian Norris, and actually
build-tested the new version.
diff --git a/drivers/net/wireless/iwlegacy/common.h b/drivers/net/wireless/iwlegacy/common.h
index f8246f2..f043092 100644
--- a/drivers/net/wireless/iwlegacy/common.h
+++ b/drivers/net/wireless/iwlegacy/common.h
@@ -1832,16 +1832,16 @@ u32 il_usecs_to_beacons(struct il_priv *il, u32 usec, u32 beacon_interval);
__le32 il_add_beacon_time(struct il_priv *il, u32 base, u32 addon,
u32 beacon_interval);
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
extern const struct dev_pm_ops il_pm_ops;
#define IL_LEGACY_PM_OPS (&il_pm_ops)
-#else /* !CONFIG_PM */
+#else
#define IL_LEGACY_PM_OPS NULL
-#endif /* !CONFIG_PM */
+#endif
/*****************************************************
* Error Handling Debugging
^ permalink raw reply related [flat|nested] 37+ messages in thread
* Re: [PATCH 07/15] cpufreq: spear needs cpufreq table
2013-06-01 9:03 ` Arnd Bergmann
@ 2013-06-01 9:45 ` Viresh Kumar
0 siblings, 0 replies; 37+ messages in thread
From: Viresh Kumar @ 2013-06-01 9:45 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-kernel, patches, linux-arm-kernel, Rafael J. Wysocki,
cpufreq, linux-pm
On 1 June 2013 14:33, Arnd Bergmann <arnd@arndb.de> wrote:
> On Saturday 01 June 2013 07:28:01 Viresh Kumar wrote:
>> On 1 June 2013 03:52, Arnd Bergmann <arnd@arndb.de> wrote:
>> > Like a lot of the other cpufreq drivers, this one needs to
>> > select CONFIG_CPU_FREQ_TABLE to avoid a build error like
>> >
>> > drivers/built-in.o: In function `spear_cpufreq_exit':
>> > spear-cpufreq.c:198: undefined reference to `cpufreq_frequency_table_put_attr'
>> > drivers/built-in.o: In function `spear_cpufreq_verify':
>> > spear-cpufreq.c:35: undefined reference to `cpufreq_frequency_table_verify'
>> > drivers/built-in.o: In function `spear_cpufreq_init':
>> > spear-cpufreq.c:181: undefined reference to `cpufreq_frequency_table_cpuinfo'
>> > spear-cpufreq.c:187: undefined reference to `cpufreq_frequency_table_get_attr'
>> > drivers/built-in.o: In function `spear_cpufreq_target':
>> > spear-cpufreq.c:120: undefined reference to `cpufreq_frequency_table_target'
>> > drivers/built-in.o:(.data+0x5e63c): undefined reference to `cpufreq_freq_attr_scaling_available_freqs'
>> >
>> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> > Cc: Rafael J. Wysocki <rjw@sisk.pl>
>> > Cc: Viresh Kumar <viresh.kumar@linaro.org>
>> > Cc: cpufreq@vger.kernel.org
>> > Cc: linux-pm@vger.kernel.org
>> > ---
>> > drivers/cpufreq/Kconfig.arm | 1 +
>> > 1 file changed, 1 insertion(+)
>>
>> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
>>
>> BTW, you want me to apply this one or take it through arm-soc tree?
>
> As I said in the introductory mail, I would prefer it if you
> can pick it up. Thanks!
I saw that mail later :(
Applied to cpufreq-next. Thanks.
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 15/15] OF: remove #ifdef from linux/of_platform.h
2013-05-31 22:22 ` [PATCH 15/15] OF: remove #ifdef from linux/of_platform.h Arnd Bergmann
@ 2013-06-01 14:01 ` Rob Herring
2013-06-01 20:03 ` Arnd Bergmann
0 siblings, 1 reply; 37+ messages in thread
From: Rob Herring @ 2013-06-01 14:01 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-kernel, Grant Likely, patches, Rob Herring,
linux-arm-kernel, Benjamin Herrenschmidt
On Fri, May 31, 2013 at 5:22 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> A lot of code uses the functions from of_platform.h when built for
> devicetree-enabled platforms but can also be built without them.
> In order to avoid using #ifdef everywhere in drivers, this
> makes all the function declarations visible, which means we
> can use "if (IS_ENABLED(CONFIG_OF))" in driver code and get build
> coverage over the code but let the compiler drop the reference
> in the object code.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: Grant Likely <grant.likely@linaro.org>
> Cc: Rob Herring <rob.herring@calxeda.com>
I've got a more complete series for 3.11 that removes OF_DEVICE and
of_platform_driver completely. I'm waiting on ack from Ben H.
Rob
> ---
> include/linux/of_platform.h | 14 +++-----------
> 1 file changed, 3 insertions(+), 11 deletions(-)
>
> diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h
> index 2a93b64..7747ad0 100644
> --- a/include/linux/of_platform.h
> +++ b/include/linux/of_platform.h
> @@ -13,8 +13,6 @@
>
> #include <linux/device.h>
> #include <linux/mod_devicetable.h>
> -
> -#ifdef CONFIG_OF_DEVICE
> #include <linux/pm.h>
> #include <linux/of_device.h>
> #include <linux/platform_device.h>
> @@ -82,7 +80,6 @@ extern struct platform_device *of_device_alloc(struct device_node *np,
> struct device *parent);
> extern struct platform_device *of_find_device_by_node(struct device_node *np);
>
> -#ifdef CONFIG_OF_ADDRESS /* device reg helpers depend on OF_ADDRESS */
> /* Platform devices and busses creation */
> extern struct platform_device *of_platform_device_create(struct device_node *np,
> const char *bus_id,
> @@ -91,17 +88,12 @@ extern struct platform_device *of_platform_device_create(struct device_node *np,
> extern int of_platform_bus_probe(struct device_node *root,
> const struct of_device_id *matches,
> struct device *parent);
> +#ifdef CONFIG_OF_ADDRESS
> extern int of_platform_populate(struct device_node *root,
> const struct of_device_id *matches,
> const struct of_dev_auxdata *lookup,
> struct device *parent);
> -#endif /* CONFIG_OF_ADDRESS */
> -
> -#endif /* CONFIG_OF_DEVICE */
> -
> -#if !defined(CONFIG_OF_ADDRESS)
> -struct of_dev_auxdata;
> -struct device_node;
> +#else
> static inline int of_platform_populate(struct device_node *root,
> const struct of_device_id *matches,
> const struct of_dev_auxdata *lookup,
> @@ -109,6 +101,6 @@ static inline int of_platform_populate(struct device_node *root,
> {
> return -ENODEV;
> }
> -#endif /* !CONFIG_OF_ADDRESS */
> +#endif
>
> #endif /* _LINUX_OF_PLATFORM_H */
> --
> 1.8.1.2
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 13/15] [media] omap3isp: include linux/mm_types.h
2013-05-31 22:22 ` [PATCH 13/15] [media] omap3isp: include linux/mm_types.h Arnd Bergmann
@ 2013-06-01 15:30 ` Laurent Pinchart
2013-06-01 20:04 ` Arnd Bergmann
0 siblings, 1 reply; 37+ messages in thread
From: Laurent Pinchart @ 2013-06-01 15:30 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-kernel, patches, linux-arm-kernel, Mauro Carvalho Chehab,
linux-media, Konstantin Khlebnikov
Hi Arnd,
Thank you for the patch.
On Saturday 01 June 2013 00:22:50 Arnd Bergmann wrote:
> The ispqueue.h file uses vm_flags_t, which is defined in
> linux/mm_types.h, so we must include that header in order
> to build in all configurations.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
> Cc: linux-media@vger.kernel.org
> Cc: Konstantin Khlebnikov <khlebnikov@openvz.org>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
(with a minor nitpick below)
> ---
> drivers/media/platform/omap3isp/ispqueue.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/media/platform/omap3isp/ispqueue.h
> b/drivers/media/platform/omap3isp/ispqueue.h index 908dfd7..e6e720c 100644
> --- a/drivers/media/platform/omap3isp/ispqueue.h
> +++ b/drivers/media/platform/omap3isp/ispqueue.h
> @@ -31,6 +31,7 @@
> #include <linux/mutex.h>
> #include <linux/videodev2.h>
> #include <linux/wait.h>
> +#include <linux/mm_types.h>
Could you please make sure the headers are sorted alphabetically ?
Would you like me to take the patch in my tree ? If so I'll sort the headers
myself.
> struct isp_video_queue;
> struct page;
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 15/15] OF: remove #ifdef from linux/of_platform.h
2013-06-01 14:01 ` Rob Herring
@ 2013-06-01 20:03 ` Arnd Bergmann
2013-06-01 20:30 ` Rob Herring
0 siblings, 1 reply; 37+ messages in thread
From: Arnd Bergmann @ 2013-06-01 20:03 UTC (permalink / raw)
To: Rob Herring
Cc: linux-kernel, Grant Likely, patches, Rob Herring,
linux-arm-kernel, Benjamin Herrenschmidt
On Saturday 01 June 2013, Rob Herring wrote:
> On Fri, May 31, 2013 at 5:22 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> > A lot of code uses the functions from of_platform.h when built for
> > devicetree-enabled platforms but can also be built without them.
> > In order to avoid using #ifdef everywhere in drivers, this
> > makes all the function declarations visible, which means we
> > can use "if (IS_ENABLED(CONFIG_OF))" in driver code and get build
> > coverage over the code but let the compiler drop the reference
> > in the object code.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > Cc: Grant Likely <grant.likely@linaro.org>
> > Cc: Rob Herring <rob.herring@calxeda.com>
>
> I've got a more complete series for 3.11 that removes OF_DEVICE and
> of_platform_driver completely. I'm waiting on ack from Ben H.
Ok. Does your series also remove the #ifdef CONFIG_OF part from this
header?
Arnd
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 13/15] [media] omap3isp: include linux/mm_types.h
2013-06-01 15:30 ` Laurent Pinchart
@ 2013-06-01 20:04 ` Arnd Bergmann
0 siblings, 0 replies; 37+ messages in thread
From: Arnd Bergmann @ 2013-06-01 20:04 UTC (permalink / raw)
To: Laurent Pinchart
Cc: linux-kernel, patches, linux-arm-kernel, Mauro Carvalho Chehab,
linux-media, Konstantin Khlebnikov
On Saturday 01 June 2013, Laurent Pinchart wrote:
> > diff --git a/drivers/media/platform/omap3isp/ispqueue.h
> > b/drivers/media/platform/omap3isp/ispqueue.h index 908dfd7..e6e720c 100644
> > --- a/drivers/media/platform/omap3isp/ispqueue.h
> > +++ b/drivers/media/platform/omap3isp/ispqueue.h
> > @@ -31,6 +31,7 @@
> > #include <linux/mutex.h>
> > #include <linux/videodev2.h>
> > #include <linux/wait.h>
> > +#include <linux/mm_types.h>
>
> Could you please make sure the headers are sorted alphabetically ?
I normally do. Sorry for missing it this time.
> Would you like me to take the patch in my tree ? If so I'll sort the headers
> myself.
Yes, that would be nice, thanks!
Arnd
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 15/15] OF: remove #ifdef from linux/of_platform.h
2013-06-01 20:03 ` Arnd Bergmann
@ 2013-06-01 20:30 ` Rob Herring
2013-06-01 20:57 ` Arnd Bergmann
0 siblings, 1 reply; 37+ messages in thread
From: Rob Herring @ 2013-06-01 20:30 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-kernel, Grant Likely, patches, Rob Herring,
linux-arm-kernel, Benjamin Herrenschmidt
On 06/01/2013 03:03 PM, Arnd Bergmann wrote:
> On Saturday 01 June 2013, Rob Herring wrote:
>> On Fri, May 31, 2013 at 5:22 PM, Arnd Bergmann <arnd@arndb.de> wrote:
>>> A lot of code uses the functions from of_platform.h when built for
>>> devicetree-enabled platforms but can also be built without them.
>>> In order to avoid using #ifdef everywhere in drivers, this
>>> makes all the function declarations visible, which means we
>>> can use "if (IS_ENABLED(CONFIG_OF))" in driver code and get build
>>> coverage over the code but let the compiler drop the reference
>>> in the object code.
>>>
>>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>>> Cc: Grant Likely <grant.likely@linaro.org>
>>> Cc: Rob Herring <rob.herring@calxeda.com>
>>
>> I've got a more complete series for 3.11 that removes OF_DEVICE and
>> of_platform_driver completely. I'm waiting on ack from Ben H.
>
> Ok. Does your series also remove the #ifdef CONFIG_OF part from this
> header?
No, we still need empty functions. Here is what of_device.h looks like:
http://tinyurl.com/l2azz5m
BTW, it has your ack.
Rob
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 15/15] OF: remove #ifdef from linux/of_platform.h
2013-06-01 20:30 ` Rob Herring
@ 2013-06-01 20:57 ` Arnd Bergmann
2013-06-04 13:01 ` Rob Herring
0 siblings, 1 reply; 37+ messages in thread
From: Arnd Bergmann @ 2013-06-01 20:57 UTC (permalink / raw)
To: Rob Herring
Cc: linux-kernel, Grant Likely, patches, Rob Herring,
linux-arm-kernel, Benjamin Herrenschmidt
On Saturday 01 June 2013, Rob Herring wrote:
> No, we still need empty functions. Here is what of_device.h looks like:
>
> http://tinyurl.com/l2azz5m
>
> BTW, it has your ack.
>
Could you add a patch on top that only puts the function declarations
inside of #ifdef that don't have an inline wrapper?
It's really annoying to have to change the header file every time one
needs to call a function from a driver in the DT-only case.
Arnd
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 15/15] OF: remove #ifdef from linux/of_platform.h
2013-06-01 20:57 ` Arnd Bergmann
@ 2013-06-04 13:01 ` Rob Herring
2013-06-04 17:51 ` Arnd Bergmann
0 siblings, 1 reply; 37+ messages in thread
From: Rob Herring @ 2013-06-04 13:01 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-kernel, Grant Likely, patches, Rob Herring,
linux-arm-kernel, Benjamin Herrenschmidt
On Sat, Jun 1, 2013 at 3:57 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Saturday 01 June 2013, Rob Herring wrote:
>> No, we still need empty functions. Here is what of_device.h looks like:
>>
>> http://tinyurl.com/l2azz5m
>>
>> BTW, it has your ack.
>>
>
> Could you add a patch on top that only puts the function declarations
> inside of #ifdef that don't have an inline wrapper?
I'm confused. You mean that DO have an inline? Like this:
void foo(void);
#ifdef CONFIG_OF
void bar(void);
#else
static inline void bar(void) {}
#endif
> It's really annoying to have to change the header file every time one
> needs to call a function from a driver in the DT-only case.
The functions without inlines are ones that drivers should not call
and should only be called from OF enabled code. That's why we have not
done a complete pass of adding inlines for everything.
Rob
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 15/15] OF: remove #ifdef from linux/of_platform.h
2013-06-04 13:01 ` Rob Herring
@ 2013-06-04 17:51 ` Arnd Bergmann
2013-06-04 22:24 ` Rob Herring
0 siblings, 1 reply; 37+ messages in thread
From: Arnd Bergmann @ 2013-06-04 17:51 UTC (permalink / raw)
To: Rob Herring
Cc: linux-kernel, Grant Likely, patches, Rob Herring,
linux-arm-kernel, Benjamin Herrenschmidt
On Tuesday 04 June 2013, Rob Herring wrote:
> On Sat, Jun 1, 2013 at 3:57 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> > On Saturday 01 June 2013, Rob Herring wrote:
> >> No, we still need empty functions. Here is what of_device.h looks like:
> >>
> >> http://tinyurl.com/l2azz5m
> >>
> >> BTW, it has your ack.
> >>
> >
> > Could you add a patch on top that only puts the function declarations
> > inside of #ifdef that don't have an inline wrapper?
>
> I'm confused. You mean that DO have an inline? Like this:
>
> void foo(void);
>
> #ifdef CONFIG_OF
> void bar(void);
> #else
> static inline void bar(void) {}
> #endif
Yes, sorry. That's what I meant.
> > It's really annoying to have to change the header file every time one
> > needs to call a function from a driver in the DT-only case.
>
> The functions without inlines are ones that drivers should not call
> and should only be called from OF enabled code. That's why we have not
> done a complete pass of adding inlines for everything.
The problem is that it's a bad default. The convention in kernel code
is not to hide declarations in #ifdef, for multiple reasons:
* It avoids unnecessary code rebuilds when the symbol changes between
two 'make' runs.
* It lets drivers and platform code call the function from dead code
without causing a build error, thus improving compile coverage.
* It's much nicer to read when can write your code like
void __init exynos_init_io(struct map_desc *mach_desc, int size)
{
if (IS_ENABLED_(CONFIG_OF) && initial_boot_params)
of_scan_flat_dt(exynos_fdt_map_chipid, NULL);
else
iotable_init(exynos_iodesc, ARRAY_SIZE(exynos_iodesc));
...
}
instead of
void __init exynos_init_io(struct map_desc *mach_desc, int size)
{
#ifdef CONFIG_OF
if (initial_boot_params)
of_scan_flat_dt(exynos_fdt_map_chipid, NULL);
else
#endif
iotable_init(exynos_iodesc, ARRAY_SIZE(exynos_iodesc));
...
}
The first one looks like actual C code, the second is really ugly,
and an inline wrapper wouldn't even do the right thing here.
Arnd
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 15/15] OF: remove #ifdef from linux/of_platform.h
2013-06-04 17:51 ` Arnd Bergmann
@ 2013-06-04 22:24 ` Rob Herring
2013-06-05 12:13 ` Arnd Bergmann
2013-06-05 21:48 ` Grant Likely
0 siblings, 2 replies; 37+ messages in thread
From: Rob Herring @ 2013-06-04 22:24 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-kernel, Grant Likely, patches, Rob Herring,
linux-arm-kernel, Benjamin Herrenschmidt
On Tue, Jun 4, 2013 at 12:51 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Tuesday 04 June 2013, Rob Herring wrote:
>> On Sat, Jun 1, 2013 at 3:57 PM, Arnd Bergmann <arnd@arndb.de> wrote:
>> > On Saturday 01 June 2013, Rob Herring wrote:
>> >> No, we still need empty functions. Here is what of_device.h looks like:
>> >>
>> >> http://tinyurl.com/l2azz5m
>> >>
>> >> BTW, it has your ack.
>> >>
>> >
>> > Could you add a patch on top that only puts the function declarations
>> > inside of #ifdef that don't have an inline wrapper?
>>
>> I'm confused. You mean that DO have an inline? Like this:
>>
>> void foo(void);
>>
>> #ifdef CONFIG_OF
>> void bar(void);
>> #else
>> static inline void bar(void) {}
>> #endif
>
> Yes, sorry. That's what I meant.
>
>> > It's really annoying to have to change the header file every time one
>> > needs to call a function from a driver in the DT-only case.
>>
>> The functions without inlines are ones that drivers should not call
>> and should only be called from OF enabled code. That's why we have not
>> done a complete pass of adding inlines for everything.
>
> The problem is that it's a bad default. The convention in kernel code
> is not to hide declarations in #ifdef, for multiple reasons:
>
> * It avoids unnecessary code rebuilds when the symbol changes between
> two 'make' runs.
>
> * It lets drivers and platform code call the function from dead code
> without causing a build error, thus improving compile coverage.
>
> * It's much nicer to read when can write your code like
>
> void __init exynos_init_io(struct map_desc *mach_desc, int size)
> {
> if (IS_ENABLED_(CONFIG_OF) && initial_boot_params)
> of_scan_flat_dt(exynos_fdt_map_chipid, NULL);
> else
> iotable_init(exynos_iodesc, ARRAY_SIZE(exynos_iodesc));
> ...
> }
>
> instead of
>
> void __init exynos_init_io(struct map_desc *mach_desc, int size)
> {
> #ifdef CONFIG_OF
> if (initial_boot_params)
> of_scan_flat_dt(exynos_fdt_map_chipid, NULL);
> else
> #endif
> iotable_init(exynos_iodesc, ARRAY_SIZE(exynos_iodesc));
> ...
> }
>
> The first one looks like actual C code, the second is really ugly,
> and an inline wrapper wouldn't even do the right thing here.
Right. I get all that. You still have to go add inlines if you want to make:
if (IS_ENABLED(CONFIG_OF))
of_foo();
just be:
of_foo();
There are situations for both and only inlines cover both cases. I
don't see a reason we would want to allow the first case and not allow
the second case. I am tired of taking patches adding the inlines 1 by
1, so perhaps we need to refactor the OF headers to better separate
core infrastructure includes vs. driver only includes if that is
really a concern.
Rob
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 15/15] OF: remove #ifdef from linux/of_platform.h
2013-06-04 22:24 ` Rob Herring
@ 2013-06-05 12:13 ` Arnd Bergmann
2013-06-05 21:48 ` Grant Likely
1 sibling, 0 replies; 37+ messages in thread
From: Arnd Bergmann @ 2013-06-05 12:13 UTC (permalink / raw)
To: Rob Herring
Cc: linux-kernel, Grant Likely, patches, Rob Herring,
linux-arm-kernel, Benjamin Herrenschmidt
On Tuesday 04 June 2013 17:24:51 Rob Herring wrote:
>
> Right. I get all that. You still have to go add inlines if you want to make:
>
> if (IS_ENABLED(CONFIG_OF))
> of_foo();
>
> just be:
>
> of_foo();
>
> There are situations for both and only inlines cover both cases. I
> don't see a reason we would want to allow the first case and not allow
> the second case. I am tired of taking patches adding the inlines 1 by
> 1, so perhaps we need to refactor the OF headers to better separate
> core infrastructure includes vs. driver only includes if that is
> really a concern.
Ok, fair enough. Putting internal declarations into a local header
file would be best of course.
Arnd
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 15/15] OF: remove #ifdef from linux/of_platform.h
2013-06-04 22:24 ` Rob Herring
2013-06-05 12:13 ` Arnd Bergmann
@ 2013-06-05 21:48 ` Grant Likely
1 sibling, 0 replies; 37+ messages in thread
From: Grant Likely @ 2013-06-05 21:48 UTC (permalink / raw)
To: Rob Herring, Arnd Bergmann
Cc: linux-kernel, patches, Rob Herring, linux-arm-kernel,
Benjamin Herrenschmidt
On Tue, 4 Jun 2013 17:24:51 -0500, Rob Herring <robherring2@gmail.com> wrote:
> On Tue, Jun 4, 2013 at 12:51 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> > On Tuesday 04 June 2013, Rob Herring wrote:
> >> On Sat, Jun 1, 2013 at 3:57 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> >> > On Saturday 01 June 2013, Rob Herring wrote:
> >> >> No, we still need empty functions. Here is what of_device.h looks like:
> >> >>
> >> >> http://tinyurl.com/l2azz5m
> >> >>
> >> >> BTW, it has your ack.
> >> >>
> >> >
> >> > Could you add a patch on top that only puts the function declarations
> >> > inside of #ifdef that don't have an inline wrapper?
> >>
> >> I'm confused. You mean that DO have an inline? Like this:
> >>
> >> void foo(void);
> >>
> >> #ifdef CONFIG_OF
> >> void bar(void);
> >> #else
> >> static inline void bar(void) {}
> >> #endif
> >
> > Yes, sorry. That's what I meant.
> >
> >> > It's really annoying to have to change the header file every time one
> >> > needs to call a function from a driver in the DT-only case.
> >>
> >> The functions without inlines are ones that drivers should not call
> >> and should only be called from OF enabled code. That's why we have not
> >> done a complete pass of adding inlines for everything.
> >
> > The problem is that it's a bad default. The convention in kernel code
> > is not to hide declarations in #ifdef, for multiple reasons:
> >
> > * It avoids unnecessary code rebuilds when the symbol changes between
> > two 'make' runs.
> >
> > * It lets drivers and platform code call the function from dead code
> > without causing a build error, thus improving compile coverage.
> >
> > * It's much nicer to read when can write your code like
> >
> > void __init exynos_init_io(struct map_desc *mach_desc, int size)
> > {
> > if (IS_ENABLED_(CONFIG_OF) && initial_boot_params)
> > of_scan_flat_dt(exynos_fdt_map_chipid, NULL);
> > else
> > iotable_init(exynos_iodesc, ARRAY_SIZE(exynos_iodesc));
> > ...
> > }
> >
> > instead of
> >
> > void __init exynos_init_io(struct map_desc *mach_desc, int size)
> > {
> > #ifdef CONFIG_OF
> > if (initial_boot_params)
> > of_scan_flat_dt(exynos_fdt_map_chipid, NULL);
> > else
> > #endif
> > iotable_init(exynos_iodesc, ARRAY_SIZE(exynos_iodesc));
> > ...
> > }
A big part of the reason for not having the headers was to discourage
code like the above; so instead of having a whole bunch of DT functions
inline in a drivers probe hook, they would be collected off in a DT
parse function that can all get compiled away as a block.
However, that's the first time I've thought about the code coverage
issue and it is a good point.
> >
> > The first one looks like actual C code, the second is really ugly,
> > and an inline wrapper wouldn't even do the right thing here.
>
> Right. I get all that. You still have to go add inlines if you want to make:
>
> if (IS_ENABLED(CONFIG_OF))
> of_foo();
>
> just be:
>
> of_foo();
>
> There are situations for both and only inlines cover both cases. I
> don't see a reason we would want to allow the first case and not allow
> the second case. I am tired of taking patches adding the inlines 1 by
> 1, so perhaps we need to refactor the OF headers to better separate
> core infrastructure includes vs. driver only includes if that is
> really a concern.
I'm fine with that. Attitudes have changed quite a bit in the last few
years about DT code in device drivers so it isn't as important to make a
hard distinction about when DT functions can be called.
g.
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 08/15] thermal: cpu_cooling: fix stub function
2013-05-31 22:22 ` [PATCH 08/15] thermal: cpu_cooling: fix stub function Arnd Bergmann
@ 2013-06-19 17:25 ` Eduardo Valentin
2013-06-19 18:18 ` Arnd Bergmann
0 siblings, 1 reply; 37+ messages in thread
From: Eduardo Valentin @ 2013-06-19 17:25 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-kernel, patches, linux-arm-kernel, Eduardo Valentin,
Zhang Rui, Amit Daniel kachhap
[-- Attachment #1: Type: text/plain, Size: 2144 bytes --]
Arnd,
On 31-05-2013 18:22, Arnd Bergmann wrote:
> The function stub for cpufreq_cooling_get_level introduced
> in 57df81069 "Thermal: exynos: fix cooling state translation"
> is not syntactically correct C and needs to be fixed to avoid
> this error:
>
> In file included from drivers/thermal/db8500_thermal.c:20:0:
> include/linux/cpu_cooling.h: In function 'cpufreq_cooling_get_level':
> include/linux/cpu_cooling.h:57:1:
> error: parameter name omitted unsigned long cpufreq_cooling_get_level(unsigned int, unsigned int) ^
> include/linux/cpu_cooling.h:57:1: error: parameter name omitted
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Acked-by: Eduardo Valentin <eduardo.valentin@ti.com>
What is the status of this patch?
I believe Rui is supposed to queue this one right?
> Cc: Eduardo Valentin <eduardo.valentin@ti.com>
> Cc: Zhang Rui <rui.zhang@intel.com>
> Cc: Amit Daniel kachhap <amit.daniel@samsung.com>
> ---
> include/linux/cpu_cooling.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/cpu_cooling.h b/include/linux/cpu_cooling.h
> index 282e270..a5d52ee 100644
> --- a/include/linux/cpu_cooling.h
> +++ b/include/linux/cpu_cooling.h
> @@ -41,7 +41,7 @@ cpufreq_cooling_register(const struct cpumask *clip_cpus);
> */
> void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev);
>
> -unsigned long cpufreq_cooling_get_level(unsigned int, unsigned int);
> +unsigned long cpufreq_cooling_get_level(unsigned int cpu, unsigned int freq);
> #else /* !CONFIG_CPU_THERMAL */
> static inline struct thermal_cooling_device *
> cpufreq_cooling_register(const struct cpumask *clip_cpus)
> @@ -54,7 +54,7 @@ void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev)
> return;
> }
> static inline
> -unsigned long cpufreq_cooling_get_level(unsigned int, unsigned int)
> +unsigned long cpufreq_cooling_get_level(unsigned int cpu, unsigned int freq)
> {
> return THERMAL_CSTATE_INVALID;
> }
>
--
You have got to be excited about what you are doing. (L. Lamport)
Eduardo Valentin
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 295 bytes --]
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 08/15] thermal: cpu_cooling: fix stub function
2013-06-19 17:25 ` Eduardo Valentin
@ 2013-06-19 18:18 ` Arnd Bergmann
0 siblings, 0 replies; 37+ messages in thread
From: Arnd Bergmann @ 2013-06-19 18:18 UTC (permalink / raw)
To: Eduardo Valentin
Cc: linux-kernel, patches, linux-arm-kernel, Zhang Rui, Amit Daniel kachhap
On Wednesday 19 June 2013, Eduardo Valentin wrote:
> On 31-05-2013 18:22, Arnd Bergmann wrote:
> > The function stub for cpufreq_cooling_get_level introduced
> > in 57df81069 "Thermal: exynos: fix cooling state translation"
> > is not syntactically correct C and needs to be fixed to avoid
> > this error:
> >
> > In file included from drivers/thermal/db8500_thermal.c:20:0:
> > include/linux/cpu_cooling.h: In function 'cpufreq_cooling_get_level':
> > include/linux/cpu_cooling.h:57:1:
> > error: parameter name omitted unsigned long cpufreq_cooling_get_level(unsigned int, unsigned int) ^
> > include/linux/cpu_cooling.h:57:1: error: parameter name omitted
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > Acked-by: Eduardo Valentin <eduardo.valentin@ti.com>
>
>
> What is the status of this patch?
>
> I believe Rui is supposed to queue this one right?
>
Yes, that would be good. 3.10 is broken without the patch.
Arnd
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 05/15] hwrng: bcm2835: fix MODULE_LICENSE tag
2013-05-31 22:22 ` [PATCH 05/15] hwrng: bcm2835: fix MODULE_LICENSE tag Arnd Bergmann
@ 2013-06-21 7:16 ` Herbert Xu
0 siblings, 0 replies; 37+ messages in thread
From: Herbert Xu @ 2013-06-21 7:16 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-kernel, patches, linux-arm-kernel, Dom Cobley,
Lubomir Rintel, Stephen Warren, Matt Mackall, linux-rpi-kernel
On Sat, Jun 01, 2013 at 12:22:42AM +0200, Arnd Bergmann wrote:
> The MODULE_LICENSE macro invocation must use either "GPL" or "GPL v2",
> but not "GPLv2" in order to be detected by the module loader.
>
> This fixes the allmodconfig build error:
>
> FATAL: modpost: GPL-incompatible module bcm2835-rng.ko uses GPL-only symbol 'platform_driver_unregister'
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: Dom Cobley <popcornmix@gmail.com>
> Cc: Lubomir Rintel <lkundrak@v3.sk>
> Cc: Stephen Warren <swarren@wwwdotorg.org>
> Cc: Matt Mackall <mpm@selenic.com>
> Cc: linux-rpi-kernel@lists.infradead.org
> Cc: Herbert Xu <herbert@gondor.apana.org.au>
> ---
> drivers/char/hw_random/bcm2835-rng.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/char/hw_random/bcm2835-rng.c b/drivers/char/hw_random/bcm2835-rng.c
> index eb7f147..43577ca 100644
> --- a/drivers/char/hw_random/bcm2835-rng.c
> +++ b/drivers/char/hw_random/bcm2835-rng.c
> @@ -110,4 +110,4 @@ module_platform_driver(bcm2835_rng_driver);
>
> MODULE_AUTHOR("Lubomir Rintel <lkundrak@v3.sk>");
> MODULE_DESCRIPTION("BCM2835 Random Number Generator (RNG) driver");
> -MODULE_LICENSE("GPLv2");
> +MODULE_LICENSE("GPL v2");
Patch applied. Thanks!
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 37+ messages in thread
end of thread, other threads:[~2013-06-21 7:16 UTC | newest]
Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-31 22:22 [PATCH 00/15] Linux-3.10 ARM randconfig fixes Arnd Bergmann
2013-05-31 22:22 ` [PATCH 01/15] irqdomain: export irq_domain_add_simple Arnd Bergmann
2013-05-31 22:22 ` [PATCH 02/15] mtd: omap2: allow bulding as a module Arnd Bergmann
2013-05-31 22:22 ` [PATCH 03/15] drm/nouveau: use mdelay instead of large udelay constants Arnd Bergmann
2013-05-31 23:34 ` Aaro Koskinen
2013-05-31 22:22 ` [PATCH 04/15] [SCSI] nsp32: " Arnd Bergmann
2013-05-31 22:22 ` [PATCH 05/15] hwrng: bcm2835: fix MODULE_LICENSE tag Arnd Bergmann
2013-06-21 7:16 ` Herbert Xu
2013-05-31 22:22 ` [PATCH 06/15] cpuidle: calxeda: select ARM_CPU_SUSPEND Arnd Bergmann
2013-05-31 22:22 ` [PATCH 07/15] cpufreq: spear needs cpufreq table Arnd Bergmann
2013-06-01 1:58 ` Viresh Kumar
2013-06-01 9:03 ` Arnd Bergmann
2013-06-01 9:45 ` Viresh Kumar
2013-05-31 22:22 ` [PATCH 08/15] thermal: cpu_cooling: fix stub function Arnd Bergmann
2013-06-19 17:25 ` Eduardo Valentin
2013-06-19 18:18 ` Arnd Bergmann
2013-05-31 22:22 ` [PATCH 09/15] drm: always provide debugfs function prototypes Arnd Bergmann
2013-05-31 22:22 ` [PATCH 10/15] drm/tilcd: select BACKLIGHT_LCD_SUPPORT Arnd Bergmann
2013-05-31 22:22 ` [PATCH 11/15] iwlegacy: il_pm_ops is only provided for PM_SLEEP Arnd Bergmann
2013-06-01 5:43 ` Brian Norris
2013-06-01 9:03 ` Arnd Bergmann
2013-06-01 9:12 ` [PATCH v2] " Arnd Bergmann
2013-05-31 22:22 ` [PATCH 12/15] [media] davinci: vpfe_capture needs i2c Arnd Bergmann
2013-05-31 22:22 ` [PATCH 13/15] [media] omap3isp: include linux/mm_types.h Arnd Bergmann
2013-06-01 15:30 ` Laurent Pinchart
2013-06-01 20:04 ` Arnd Bergmann
2013-05-31 22:22 ` [PATCH 14/15] clk: tegra: provide tegra_periph_reset_assert alternative Arnd Bergmann
2013-05-31 22:22 ` [PATCH 15/15] OF: remove #ifdef from linux/of_platform.h Arnd Bergmann
2013-06-01 14:01 ` Rob Herring
2013-06-01 20:03 ` Arnd Bergmann
2013-06-01 20:30 ` Rob Herring
2013-06-01 20:57 ` Arnd Bergmann
2013-06-04 13:01 ` Rob Herring
2013-06-04 17:51 ` Arnd Bergmann
2013-06-04 22:24 ` Rob Herring
2013-06-05 12:13 ` Arnd Bergmann
2013-06-05 21:48 ` Grant Likely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).