* [PATCH 1/3] staging/ad7606: Actually build the interface modules
@ 2015-10-28 13:25 Michal Marek
2015-10-28 13:25 ` [PATCH 2/3] kbuild: Allow to specify composite modules with modname-m Michal Marek
2015-10-28 13:25 ` [PATCH 3/3] Revert "drm: Hack around CONFIG_AGP=m build failures" Michal Marek
0 siblings, 2 replies; 7+ messages in thread
From: Michal Marek @ 2015-10-28 13:25 UTC (permalink / raw)
To: linux-kbuild
Cc: linux-kernel, daniel.vetter, Michal Marek, Michael Hennerich,
Lars-Peter Clausen
From: Michal Marek <mmarek@suse.com>
The ad7606_par and ad7606_spi drivers are not built if CONFIG_AD7606=m,
because kbuild does not currently support <objname>-m syntax. Even if we
add kbuild support, ad7606 fails to link, because of duplicate
module_init definitions. Make the two drivers separate modules, as the
Kconfig help text already suggests.
Also, CONFIG_IIO_BUFFER is a dependency of CONFIG_AD7606, so there is no
need to test for it in the Makefile.
Cc: Michael Hennerich <Michael.Hennerich@analog.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Michal Marek <mmarek@suse.com>
---
drivers/staging/iio/adc/Kconfig | 4 ++--
drivers/staging/iio/adc/Makefile | 7 +++----
drivers/staging/iio/adc/ad7606_core.c | 4 ++++
3 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/iio/adc/Kconfig b/drivers/staging/iio/adc/Kconfig
index 94ae423..58d4517 100644
--- a/drivers/staging/iio/adc/Kconfig
+++ b/drivers/staging/iio/adc/Kconfig
@@ -23,7 +23,7 @@ config AD7606_IFACE_PARALLEL
ADC driver.
To compile this driver as a module, choose M here: the
- module will be called ad7606_iface_parallel.
+ module will be called ad7606_parallel.
config AD7606_IFACE_SPI
tristate "spi interface support"
@@ -34,7 +34,7 @@ config AD7606_IFACE_SPI
ADC driver.
To compile this driver as a module, choose M here: the
- module will be called ad7606_iface_spi.
+ module will be called ad7606_spi.
config AD7780
tristate "Analog Devices AD7780 and similar ADCs driver"
diff --git a/drivers/staging/iio/adc/Makefile b/drivers/staging/iio/adc/Makefile
index 1c4277d..0c87ce3 100644
--- a/drivers/staging/iio/adc/Makefile
+++ b/drivers/staging/iio/adc/Makefile
@@ -2,10 +2,9 @@
# Makefile for industrial I/O ADC drivers
#
-ad7606-y := ad7606_core.o
-ad7606-$(CONFIG_IIO_BUFFER) += ad7606_ring.o
-ad7606-$(CONFIG_AD7606_IFACE_PARALLEL) += ad7606_par.o
-ad7606-$(CONFIG_AD7606_IFACE_SPI) += ad7606_spi.o
+ad7606-y := ad7606_core.o ad7606_ring.o
+obj-$(CONFIG_AD7606_IFACE_PARALLEL) += ad7606_par.o
+obj-$(CONFIG_AD7606_IFACE_SPI) += ad7606_spi.o
obj-$(CONFIG_AD7606) += ad7606.o
obj-$(CONFIG_AD7780) += ad7780.o
diff --git a/drivers/staging/iio/adc/ad7606_core.c b/drivers/staging/iio/adc/ad7606_core.c
index 5796ed2..2c9d8b7 100644
--- a/drivers/staging/iio/adc/ad7606_core.c
+++ b/drivers/staging/iio/adc/ad7606_core.c
@@ -559,6 +559,7 @@ error_disable_reg:
regulator_disable(st->reg);
return ERR_PTR(ret);
}
+EXPORT_SYMBOL_GPL(ad7606_probe);
int ad7606_remove(struct iio_dev *indio_dev, int irq)
{
@@ -575,6 +576,7 @@ int ad7606_remove(struct iio_dev *indio_dev, int irq)
return 0;
}
+EXPORT_SYMBOL_GPL(ad7606_remove);
void ad7606_suspend(struct iio_dev *indio_dev)
{
@@ -586,6 +588,7 @@ void ad7606_suspend(struct iio_dev *indio_dev)
gpio_set_value(st->pdata->gpio_stby, 0);
}
}
+EXPORT_SYMBOL_GPL(ad7606_suspend);
void ad7606_resume(struct iio_dev *indio_dev)
{
@@ -600,6 +603,7 @@ void ad7606_resume(struct iio_dev *indio_dev)
ad7606_reset(st);
}
}
+EXPORT_SYMBOL_GPL(ad7606_resume);
MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");
MODULE_DESCRIPTION("Analog Devices AD7606 ADC");
--
1.9.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] kbuild: Allow to specify composite modules with modname-m
2015-10-28 13:25 [PATCH 1/3] staging/ad7606: Actually build the interface modules Michal Marek
@ 2015-10-28 13:25 ` Michal Marek
2015-10-29 6:34 ` Peter Chen
2015-11-25 12:30 ` Michal Marek
2015-10-28 13:25 ` [PATCH 3/3] Revert "drm: Hack around CONFIG_AGP=m build failures" Michal Marek
1 sibling, 2 replies; 7+ messages in thread
From: Michal Marek @ 2015-10-28 13:25 UTC (permalink / raw)
To: linux-kbuild
Cc: linux-kernel, daniel.vetter, Michal Marek, Peter Chen, linux-usb,
Joern Engel, Prasad Joshi, logfs
From: Michal Marek <mmarek@suse.com>
This allows to write
drm-$(CONFIG_AGP) += drm_agpsupport.o
without having to handle CONFIG_AGP=y vs. CONFIG_AGP=m. Only support
this syntax for modules, since built-in code depending on something
modular cannot work and init/Makefile actually relies on the current
semantics. There are a few drivers which adapted to the current
semantics out of necessity; these are fixed to also work when the
respective subsystem is modular.
Cc: Peter Chen <Peter.Chen@freescale.com>
Cc: linux-usb@vger.kernel.org
Cc: Joern Engel <joern@logfs.org>
Cc: Prasad Joshi <prasadjoshi.linux@gmail.com>
Cc: logfs@logfs.org
Signed-off-by: Michal Marek <mmarek@suse.com>
---
drivers/misc/ibmasm/ibmasm.h | 2 +-
drivers/usb/chipidea/otg_fsm.h | 2 +-
fs/logfs/logfs.h | 2 +-
scripts/Makefile.build | 8 ++++++--
scripts/Makefile.lib | 4 ++--
5 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/drivers/misc/ibmasm/ibmasm.h b/drivers/misc/ibmasm/ibmasm.h
index 9b08344..5bd1277 100644
--- a/drivers/misc/ibmasm/ibmasm.h
+++ b/drivers/misc/ibmasm/ibmasm.h
@@ -211,7 +211,7 @@ void ibmasmfs_unregister(void);
void ibmasmfs_add_sp(struct service_processor *sp);
/* uart */
-#ifdef CONFIG_SERIAL_8250
+#if IS_ENABLED(CONFIG_SERIAL_8250)
void ibmasm_register_uart(struct service_processor *sp);
void ibmasm_unregister_uart(struct service_processor *sp);
#else
diff --git a/drivers/usb/chipidea/otg_fsm.h b/drivers/usb/chipidea/otg_fsm.h
index 2689375..262d6ef 100644
--- a/drivers/usb/chipidea/otg_fsm.h
+++ b/drivers/usb/chipidea/otg_fsm.h
@@ -62,7 +62,7 @@
/* SSEND time before SRP */
#define TB_SSEND_SRP (1500) /* minimum 1.5 sec, section:5.1.2 */
-#ifdef CONFIG_USB_OTG_FSM
+#if IS_ENABLED(CONFIG_USB_OTG_FSM)
int ci_hdrc_otg_fsm_init(struct ci_hdrc *ci);
int ci_otg_fsm_work(struct ci_hdrc *ci);
diff --git a/fs/logfs/logfs.h b/fs/logfs/logfs.h
index 5f09376..23f961a 100644
--- a/fs/logfs/logfs.h
+++ b/fs/logfs/logfs.h
@@ -485,7 +485,7 @@ static inline int logfs_get_sb_bdev(struct logfs_super *s,
#endif
/* dev_mtd.c */
-#ifdef CONFIG_MTD
+#if IS_ENABLED(CONFIG_MTD)
int logfs_get_sb_mtd(struct logfs_super *s, int mtdnr);
#else
static inline int logfs_get_sb_mtd(struct logfs_super *s, int mtdnr)
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 01df30a..2c47f9c 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -372,10 +372,14 @@ endif
# <composite-object>-objs := <list of .o files>
# or
# <composite-object>-y := <list of .o files>
+# or
+# <composite-object>-m := <list of .o files>
+# The -m syntax only works if <composite object> is a module
link_multi_deps = \
$(filter $(addprefix $(obj)/, \
$($(subst $(obj)/,,$(@:.o=-objs))) \
-$($(subst $(obj)/,,$(@:.o=-y)))), $^)
+$($(subst $(obj)/,,$(@:.o=-y))) \
+$($(subst $(obj)/,,$(@:.o=-m)))), $^)
quiet_cmd_link_multi-y = LD $@
cmd_link_multi-y = $(LD) $(ld_flags) -r -o $@ $(link_multi_deps) $(cmd_secanalysis)
@@ -390,7 +394,7 @@ $(call multi_depend, $(multi-used-y), .o, -objs -y)
$(multi-used-m): FORCE
$(call if_changed,link_multi-m)
@{ echo $(@:.o=.ko); echo $(link_multi_deps); } > $(MODVERDIR)/$(@F:.o=.mod)
-$(call multi_depend, $(multi-used-m), .o, -objs -y)
+$(call multi_depend, $(multi-used-m), .o, -objs -y -m)
targets += $(multi-used-y) $(multi-used-m)
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 79e8661..e18957b 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -48,7 +48,7 @@ subdir-ym := $(sort $(subdir-y) $(subdir-m))
# if $(foo-objs) exists, foo.o is a composite object
multi-used-y := $(sort $(foreach m,$(obj-y), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))), $(m))))
-multi-used-m := $(sort $(foreach m,$(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))), $(m))))
+multi-used-m := $(sort $(foreach m,$(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m))), $(m))))
multi-used := $(multi-used-y) $(multi-used-m)
single-used-m := $(sort $(filter-out $(multi-used-m),$(obj-m)))
@@ -67,7 +67,7 @@ obj-dirs := $(dir $(multi-objs) $(obj-y))
# Replace multi-part objects by their individual parts, look at local dir only
real-objs-y := $(foreach m, $(filter-out $(subdir-obj-y), $(obj-y)), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))),$($(m:.o=-objs)) $($(m:.o=-y)),$(m))) $(extra-y)
-real-objs-m := $(foreach m, $(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))),$($(m:.o=-objs)) $($(m:.o=-y)),$(m)))
+real-objs-m := $(foreach m, $(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m))),$($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m)),$(m)))
# Add subdir path
--
1.9.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] Revert "drm: Hack around CONFIG_AGP=m build failures"
2015-10-28 13:25 [PATCH 1/3] staging/ad7606: Actually build the interface modules Michal Marek
2015-10-28 13:25 ` [PATCH 2/3] kbuild: Allow to specify composite modules with modname-m Michal Marek
@ 2015-10-28 13:25 ` Michal Marek
1 sibling, 0 replies; 7+ messages in thread
From: Michal Marek @ 2015-10-28 13:25 UTC (permalink / raw)
To: linux-kbuild; +Cc: linux-kernel, daniel.vetter, Michal Marek, dri-devel
From: Michal Marek <mmarek@suse.com>
Kbuild now supports <modname>-m variables.
This reverts commit 8fa884dc355ffd0caa964a284a530bf747df5c77.
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Michal Marek <mmarek@suse.cz>
---
drivers/gpu/drm/Makefile | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
index e814517..f458d6e 100644
--- a/drivers/gpu/drm/Makefile
+++ b/drivers/gpu/drm/Makefile
@@ -21,8 +21,6 @@ drm-$(CONFIG_DRM_PANEL) += drm_panel.o
drm-$(CONFIG_OF) += drm_of.o
drm-$(CONFIG_AGP) += drm_agpsupport.o
-drm-y += $(drm-m)
-
drm_kms_helper-y := drm_crtc_helper.o drm_dp_helper.o drm_probe_helper.o \
drm_plane_helper.o drm_dp_mst_topology.o drm_atomic_helper.o
drm_kms_helper-$(CONFIG_DRM_LOAD_EDID_FIRMWARE) += drm_edid_load.o
--
1.9.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] kbuild: Allow to specify composite modules with modname-m
2015-10-28 13:25 ` [PATCH 2/3] kbuild: Allow to specify composite modules with modname-m Michal Marek
@ 2015-10-29 6:34 ` Peter Chen
2015-10-29 8:05 ` Michal Marek
2015-11-25 12:30 ` Michal Marek
1 sibling, 1 reply; 7+ messages in thread
From: Peter Chen @ 2015-10-29 6:34 UTC (permalink / raw)
To: Michal Marek
Cc: linux-kbuild, linux-kernel, daniel.vetter, Michal Marek,
linux-usb, Joern Engel, Prasad Joshi, logfs
On Wed, Oct 28, 2015 at 02:25:41PM +0100, Michal Marek wrote:
> From: Michal Marek <mmarek@suse.com>
>
> This allows to write
>
> drm-$(CONFIG_AGP) += drm_agpsupport.o
>
> without having to handle CONFIG_AGP=y vs. CONFIG_AGP=m. Only support
> this syntax for modules, since built-in code depending on something
> modular cannot work and init/Makefile actually relies on the current
> semantics. There are a few drivers which adapted to the current
> semantics out of necessity; these are fixed to also work when the
> respective subsystem is modular.
>
> Cc: Peter Chen <Peter.Chen@freescale.com>
> Cc: linux-usb@vger.kernel.org
> Cc: Joern Engel <joern@logfs.org>
> Cc: Prasad Joshi <prasadjoshi.linux@gmail.com>
> Cc: logfs@logfs.org
> Signed-off-by: Michal Marek <mmarek@suse.com>
> ---
> drivers/misc/ibmasm/ibmasm.h | 2 +-
> drivers/usb/chipidea/otg_fsm.h | 2 +-
> fs/logfs/logfs.h | 2 +-
> scripts/Makefile.build | 8 ++++++--
> scripts/Makefile.lib | 4 ++--
> 5 files changed, 11 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/misc/ibmasm/ibmasm.h b/drivers/misc/ibmasm/ibmasm.h
> index 9b08344..5bd1277 100644
> --- a/drivers/misc/ibmasm/ibmasm.h
> +++ b/drivers/misc/ibmasm/ibmasm.h
> @@ -211,7 +211,7 @@ void ibmasmfs_unregister(void);
> void ibmasmfs_add_sp(struct service_processor *sp);
>
> /* uart */
> -#ifdef CONFIG_SERIAL_8250
> +#if IS_ENABLED(CONFIG_SERIAL_8250)
> void ibmasm_register_uart(struct service_processor *sp);
> void ibmasm_unregister_uart(struct service_processor *sp);
> #else
> diff --git a/drivers/usb/chipidea/otg_fsm.h b/drivers/usb/chipidea/otg_fsm.h
> index 2689375..262d6ef 100644
> --- a/drivers/usb/chipidea/otg_fsm.h
> +++ b/drivers/usb/chipidea/otg_fsm.h
> @@ -62,7 +62,7 @@
> /* SSEND time before SRP */
> #define TB_SSEND_SRP (1500) /* minimum 1.5 sec, section:5.1.2 */
>
> -#ifdef CONFIG_USB_OTG_FSM
> +#if IS_ENABLED(CONFIG_USB_OTG_FSM)
Does it mean if the configuration is tristate, it must use IS_ENABLED?
Peter
>
> int ci_hdrc_otg_fsm_init(struct ci_hdrc *ci);
> int ci_otg_fsm_work(struct ci_hdrc *ci);
> diff --git a/fs/logfs/logfs.h b/fs/logfs/logfs.h
> index 5f09376..23f961a 100644
> --- a/fs/logfs/logfs.h
> +++ b/fs/logfs/logfs.h
> @@ -485,7 +485,7 @@ static inline int logfs_get_sb_bdev(struct logfs_super *s,
> #endif
>
> /* dev_mtd.c */
> -#ifdef CONFIG_MTD
> +#if IS_ENABLED(CONFIG_MTD)
> int logfs_get_sb_mtd(struct logfs_super *s, int mtdnr);
> #else
> static inline int logfs_get_sb_mtd(struct logfs_super *s, int mtdnr)
> diff --git a/scripts/Makefile.build b/scripts/Makefile.build
> index 01df30a..2c47f9c 100644
> --- a/scripts/Makefile.build
> +++ b/scripts/Makefile.build
> @@ -372,10 +372,14 @@ endif
> # <composite-object>-objs := <list of .o files>
> # or
> # <composite-object>-y := <list of .o files>
> +# or
> +# <composite-object>-m := <list of .o files>
> +# The -m syntax only works if <composite object> is a module
> link_multi_deps = \
> $(filter $(addprefix $(obj)/, \
> $($(subst $(obj)/,,$(@:.o=-objs))) \
> -$($(subst $(obj)/,,$(@:.o=-y)))), $^)
> +$($(subst $(obj)/,,$(@:.o=-y))) \
> +$($(subst $(obj)/,,$(@:.o=-m)))), $^)
>
> quiet_cmd_link_multi-y = LD $@
> cmd_link_multi-y = $(LD) $(ld_flags) -r -o $@ $(link_multi_deps) $(cmd_secanalysis)
> @@ -390,7 +394,7 @@ $(call multi_depend, $(multi-used-y), .o, -objs -y)
> $(multi-used-m): FORCE
> $(call if_changed,link_multi-m)
> @{ echo $(@:.o=.ko); echo $(link_multi_deps); } > $(MODVERDIR)/$(@F:.o=.mod)
> -$(call multi_depend, $(multi-used-m), .o, -objs -y)
> +$(call multi_depend, $(multi-used-m), .o, -objs -y -m)
>
> targets += $(multi-used-y) $(multi-used-m)
>
> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> index 79e8661..e18957b 100644
> --- a/scripts/Makefile.lib
> +++ b/scripts/Makefile.lib
> @@ -48,7 +48,7 @@ subdir-ym := $(sort $(subdir-y) $(subdir-m))
>
> # if $(foo-objs) exists, foo.o is a composite object
> multi-used-y := $(sort $(foreach m,$(obj-y), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))), $(m))))
> -multi-used-m := $(sort $(foreach m,$(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))), $(m))))
> +multi-used-m := $(sort $(foreach m,$(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m))), $(m))))
> multi-used := $(multi-used-y) $(multi-used-m)
> single-used-m := $(sort $(filter-out $(multi-used-m),$(obj-m)))
>
> @@ -67,7 +67,7 @@ obj-dirs := $(dir $(multi-objs) $(obj-y))
>
> # Replace multi-part objects by their individual parts, look at local dir only
> real-objs-y := $(foreach m, $(filter-out $(subdir-obj-y), $(obj-y)), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))),$($(m:.o=-objs)) $($(m:.o=-y)),$(m))) $(extra-y)
> -real-objs-m := $(foreach m, $(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))),$($(m:.o=-objs)) $($(m:.o=-y)),$(m)))
> +real-objs-m := $(foreach m, $(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m))),$($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m)),$(m)))
>
> # Add subdir path
>
> --
> 1.9.2
>
--
Best Regards,
Peter Chen
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] kbuild: Allow to specify composite modules with modname-m
2015-10-29 6:34 ` Peter Chen
@ 2015-10-29 8:05 ` Michal Marek
2015-10-29 8:07 ` Peter Chen
0 siblings, 1 reply; 7+ messages in thread
From: Michal Marek @ 2015-10-29 8:05 UTC (permalink / raw)
To: Peter Chen
Cc: linux-kbuild, linux-kernel, daniel.vetter, Michal Marek,
linux-usb, Joern Engel, Prasad Joshi, logfs
Dne 29.10.2015 v 07:34 Peter Chen napsal(a):
> On Wed, Oct 28, 2015 at 02:25:41PM +0100, Michal Marek wrote:
>> From: Michal Marek <mmarek@suse.com>
>>
>> This allows to write
>>
>> drm-$(CONFIG_AGP) += drm_agpsupport.o
>>
>> without having to handle CONFIG_AGP=y vs. CONFIG_AGP=m. Only support
>> this syntax for modules, since built-in code depending on something
>> modular cannot work and init/Makefile actually relies on the current
>> semantics. There are a few drivers which adapted to the current
>> semantics out of necessity; these are fixed to also work when the
>> respective subsystem is modular.
>>
>> Cc: Peter Chen <Peter.Chen@freescale.com>
>> Cc: linux-usb@vger.kernel.org
>> Cc: Joern Engel <joern@logfs.org>
>> Cc: Prasad Joshi <prasadjoshi.linux@gmail.com>
>> Cc: logfs@logfs.org
>> Signed-off-by: Michal Marek <mmarek@suse.com>
>> ---
>> drivers/misc/ibmasm/ibmasm.h | 2 +-
>> drivers/usb/chipidea/otg_fsm.h | 2 +-
>> fs/logfs/logfs.h | 2 +-
>> scripts/Makefile.build | 8 ++++++--
>> scripts/Makefile.lib | 4 ++--
>> 5 files changed, 11 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/misc/ibmasm/ibmasm.h b/drivers/misc/ibmasm/ibmasm.h
>> index 9b08344..5bd1277 100644
>> --- a/drivers/misc/ibmasm/ibmasm.h
>> +++ b/drivers/misc/ibmasm/ibmasm.h
>> @@ -211,7 +211,7 @@ void ibmasmfs_unregister(void);
>> void ibmasmfs_add_sp(struct service_processor *sp);
>>
>> /* uart */
>> -#ifdef CONFIG_SERIAL_8250
>> +#if IS_ENABLED(CONFIG_SERIAL_8250)
>> void ibmasm_register_uart(struct service_processor *sp);
>> void ibmasm_unregister_uart(struct service_processor *sp);
>> #else
>> diff --git a/drivers/usb/chipidea/otg_fsm.h b/drivers/usb/chipidea/otg_fsm.h
>> index 2689375..262d6ef 100644
>> --- a/drivers/usb/chipidea/otg_fsm.h
>> +++ b/drivers/usb/chipidea/otg_fsm.h
>> @@ -62,7 +62,7 @@
>> /* SSEND time before SRP */
>> #define TB_SSEND_SRP (1500) /* minimum 1.5 sec, section:5.1.2 */
>>
>> -#ifdef CONFIG_USB_OTG_FSM
>> +#if IS_ENABLED(CONFIG_USB_OTG_FSM)
>
> Does it mean if the configuration is tristate, it must use IS_ENABLED?
IS_ENABLED is a shortcut for defined(CONFIG_FOO) ||
defined(CONFIG_FOO_MODULE). In other words, it makes sure the that otg
fsm functions are used for both CONFIG_USB_OTG_FSM=y and
CONFIG_USB_OTG_FSM=m.
Michal
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] kbuild: Allow to specify composite modules with modname-m
2015-10-29 8:05 ` Michal Marek
@ 2015-10-29 8:07 ` Peter Chen
0 siblings, 0 replies; 7+ messages in thread
From: Peter Chen @ 2015-10-29 8:07 UTC (permalink / raw)
To: Michal Marek
Cc: linux-kbuild, linux-kernel, daniel.vetter, Michal Marek,
linux-usb, Joern Engel, Prasad Joshi, logfs
On Thu, Oct 29, 2015 at 09:05:55AM +0100, Michal Marek wrote:
> Dne 29.10.2015 v 07:34 Peter Chen napsal(a):
> > On Wed, Oct 28, 2015 at 02:25:41PM +0100, Michal Marek wrote:
> >> From: Michal Marek <mmarek@suse.com>
> >>
> >> This allows to write
> >>
> >> drm-$(CONFIG_AGP) += drm_agpsupport.o
> >>
> >> without having to handle CONFIG_AGP=y vs. CONFIG_AGP=m. Only support
> >> this syntax for modules, since built-in code depending on something
> >> modular cannot work and init/Makefile actually relies on the current
> >> semantics. There are a few drivers which adapted to the current
> >> semantics out of necessity; these are fixed to also work when the
> >> respective subsystem is modular.
> >>
> >> Cc: Peter Chen <Peter.Chen@freescale.com>
> >> Cc: linux-usb@vger.kernel.org
> >> Cc: Joern Engel <joern@logfs.org>
> >> Cc: Prasad Joshi <prasadjoshi.linux@gmail.com>
> >> Cc: logfs@logfs.org
> >> Signed-off-by: Michal Marek <mmarek@suse.com>
> >> ---
> >> drivers/misc/ibmasm/ibmasm.h | 2 +-
> >> drivers/usb/chipidea/otg_fsm.h | 2 +-
> >> fs/logfs/logfs.h | 2 +-
> >> scripts/Makefile.build | 8 ++++++--
> >> scripts/Makefile.lib | 4 ++--
> >> 5 files changed, 11 insertions(+), 7 deletions(-)
> >>
> >> diff --git a/drivers/misc/ibmasm/ibmasm.h b/drivers/misc/ibmasm/ibmasm.h
> >> index 9b08344..5bd1277 100644
> >> --- a/drivers/misc/ibmasm/ibmasm.h
> >> +++ b/drivers/misc/ibmasm/ibmasm.h
> >> @@ -211,7 +211,7 @@ void ibmasmfs_unregister(void);
> >> void ibmasmfs_add_sp(struct service_processor *sp);
> >>
> >> /* uart */
> >> -#ifdef CONFIG_SERIAL_8250
> >> +#if IS_ENABLED(CONFIG_SERIAL_8250)
> >> void ibmasm_register_uart(struct service_processor *sp);
> >> void ibmasm_unregister_uart(struct service_processor *sp);
> >> #else
> >> diff --git a/drivers/usb/chipidea/otg_fsm.h b/drivers/usb/chipidea/otg_fsm.h
> >> index 2689375..262d6ef 100644
> >> --- a/drivers/usb/chipidea/otg_fsm.h
> >> +++ b/drivers/usb/chipidea/otg_fsm.h
> >> @@ -62,7 +62,7 @@
> >> /* SSEND time before SRP */
> >> #define TB_SSEND_SRP (1500) /* minimum 1.5 sec, section:5.1.2 */
> >>
> >> -#ifdef CONFIG_USB_OTG_FSM
> >> +#if IS_ENABLED(CONFIG_USB_OTG_FSM)
> >
> > Does it mean if the configuration is tristate, it must use IS_ENABLED?
>
> IS_ENABLED is a shortcut for defined(CONFIG_FOO) ||
> defined(CONFIG_FOO_MODULE). In other words, it makes sure the that otg
> fsm functions are used for both CONFIG_USB_OTG_FSM=y and
> CONFIG_USB_OTG_FSM=m.
>
> Michal
>
For chipidea changes:
Acked-by: Peter Chen <peter.chen@freescale.com>
--
Best Regards,
Peter Chen
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] kbuild: Allow to specify composite modules with modname-m
2015-10-28 13:25 ` [PATCH 2/3] kbuild: Allow to specify composite modules with modname-m Michal Marek
2015-10-29 6:34 ` Peter Chen
@ 2015-11-25 12:30 ` Michal Marek
1 sibling, 0 replies; 7+ messages in thread
From: Michal Marek @ 2015-11-25 12:30 UTC (permalink / raw)
To: linux-kbuild
Cc: linux-kernel, daniel.vetter, Peter Chen, linux-usb, Joern Engel,
Prasad Joshi, logfs
Dne 28.10.2015 v 14:25 Michal Marek napsal(a):
> From: Michal Marek <mmarek@suse.com>
>
> This allows to write
>
> drm-$(CONFIG_AGP) += drm_agpsupport.o
>
> without having to handle CONFIG_AGP=y vs. CONFIG_AGP=m. Only support
> this syntax for modules, since built-in code depending on something
> modular cannot work and init/Makefile actually relies on the current
> semantics. There are a few drivers which adapted to the current
> semantics out of necessity; these are fixed to also work when the
> respective subsystem is modular.
>
> Cc: Peter Chen <Peter.Chen@freescale.com>
> Cc: linux-usb@vger.kernel.org
> Cc: Joern Engel <joern@logfs.org>
> Cc: Prasad Joshi <prasadjoshi.linux@gmail.com>
> Cc: logfs@logfs.org
> Signed-off-by: Michal Marek <mmarek@suse.com>
> ---
> drivers/misc/ibmasm/ibmasm.h | 2 +-
> drivers/usb/chipidea/otg_fsm.h | 2 +-
> fs/logfs/logfs.h | 2 +-
> scripts/Makefile.build | 8 ++++++--
> scripts/Makefile.lib | 4 ++--
> 5 files changed, 11 insertions(+), 7 deletions(-)
I applied the whole series to kbuild.git#kbuild now.
Michal
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-11-25 12:30 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-28 13:25 [PATCH 1/3] staging/ad7606: Actually build the interface modules Michal Marek
2015-10-28 13:25 ` [PATCH 2/3] kbuild: Allow to specify composite modules with modname-m Michal Marek
2015-10-29 6:34 ` Peter Chen
2015-10-29 8:05 ` Michal Marek
2015-10-29 8:07 ` Peter Chen
2015-11-25 12:30 ` Michal Marek
2015-10-28 13:25 ` [PATCH 3/3] Revert "drm: Hack around CONFIG_AGP=m build failures" Michal Marek
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).