cedrus: Drop unneeded CONFIG_OF dependency
PATCH 1/1 cedrus: Drop unneeded CONFIG_OF dependency
The driver is perfectly capable of being built without CONFIG_OF. Remove this dependency, which is useful for compile-only tests.
--- drivers/staging/media/sunxi/cedrus/Kconfig | 1 - 1 file changed, 1 deletion(-)
drivers/staging/media/sunxi/cedrus/Kconfig +0 -1
@@ -3,7 +3,6 @@ config VIDEO_SUNXI_CEDRUS tristate "Allwinner Cedrus VPU driver" depends on VIDEO_DEV && VIDEO_V4L2 && MEDIA_CONTROLLER depends on HAS_DMA - depends on OF depends on MEDIA_CONTROLLER_REQUEST_API select SUNXI_SRAM select VIDEOBUF2_DMA_CONTIG
Signature · 1 line
2.26.0.rc2
Hi Ezequiel,
Quoted 2 lines · Ezequiel Garcia
The driver is perfectly capable of being built without
CONFIG_OF. Remove this dependency, which is useful for compile-only tests.
Thanks for the patch!
Alas, the driver won't do anything useful without OF enabled, so it seems useful to keep that dependency.
I would suggest making this a: depends on OF || COMPILE_TEST instead. What do you think?
Cheers,
Paul
Quoted 20 lines
Signed-off-by Ezequiel Garcia <[email protected]>--- drivers/staging/media/sunxi/cedrus/Kconfig | 1 - 1 file changed, 1 deletion(-)drivers/staging/media/sunxi/cedrus/Kconfig +0
-1@@ -3,7 +3,6 @@ config VIDEO_SUNXI_CEDRUS tristate "Allwinner Cedrus VPU driver" depends on VIDEO_DEV && VIDEO_V4L2 && MEDIA_CONTROLLER depends on HAS_DMA - depends on OF depends on MEDIA_CONTROLLER_REQUEST_API select SUNXI_SRAM select VIDEOBUF2_DMA_CONTIGSignature · 1 line
2.26.0.rc2
Signature · 3 lines
Paul Kocialkowski, Bootlin Embedded Linux and kernel engineering https://bootlin.com
Quoted 11 lines · Paul Kocialkowski
Hi Ezequiel,
Quoted 2 lines · Ezequiel Garcia
The driver is perfectly capable of being built without
CONFIG_OF. Remove this dependency, which is useful for compile-only tests.Thanks for the patch!
Alas, the driver won't do anything useful without OF enabled, so it seems useful to keep that dependency.
I'm not convinced about this argument, I like to have dependencies on things the driver needs to compile (except the machine option, see below).
Quoted 3 lines
I would suggest making this a: depends on OF ||
COMPILE_TESTinstead. What do you think?
Although there are a handful, I don't see many drivers doing that. To be honest, I don't like this much.
Also, if you want to make sure this driver can only be selected where it makes sense, you consider having a ARCH_SUNXI || COMPILE_TEST.
IMO, the dependency on OF should be dropped as well.
Cheers,
Eze
Quoted 24 lines
Cheers,
Paul
Quoted 20 lines
Signed-off-by Ezequiel Garcia <[email protected]>--- drivers/staging/media/sunxi/cedrus/Kconfig | 1 - 1 file changed, 1 deletion(-)drivers/staging/media/sunxi/cedrus/Kconfig +0
-1@@ -3,7 +3,6 @@ config VIDEO_SUNXI_CEDRUS tristate "Allwinner Cedrus VPU driver" depends on VIDEO_DEV && VIDEO_V4L2 && MEDIA_CONTROLLER depends on HAS_DMA - depends on OF depends on MEDIA_CONTROLLER_REQUEST_API select SUNXI_SRAM select VIDEOBUF2_DMA_CONTIGSignature · 1 line
2.26.0.rc2
Hi Ezequiel,
Quoted 7 lines · Ezequiel Garcia
Quoted 6 lines · Paul Kocialkowski
Hi Ezequiel,
Quoted 2 lines · Ezequiel Garcia
The driver is perfectly capable of being built without
CONFIG_OF. Remove this dependency, which is useful for compile-only tests.
Quoted 8 lines
Quoted 4 lines
Thanks for the patch!
Alas, the driver won't do anything useful without OF enabled, so it seems useful to keep that dependency.
I'm not convinced about this argument, I like to have dependencies on things the driver needs to compile (except the machine option, see below).
Is there a general kernel-wide policy about that?
I must admit that I never really understood if Kconfig depends are supposed to strictly reflect build dependencies or dependencies that must reasonably be expected for the driver to be useful. The arch dependency (which is farily common) seems to suggest the latter.
Maxime, any thought about that?
Quoted 8 lines
Quoted 2 lines
I would suggest making this a: depends on OF ||
COMPILE_TESTinstead. What do you think?Although there are a handful, I don't see many drivers doing that. To be honest, I don't like this much.
Also, if you want to make sure this driver can only be selected where it makes sense, you consider having a
ARCH_SUNXI||COMPILE_TEST.
Fair enough, that would be the consistent choice with OF || COMPILE_TEST.
Quoted 31 lines
IMO, the dependency on OF should be dropped as well.
Cheers,
EzeQuoted 24 lines
Cheers,
Paul
Quoted 20 lines
Signed-off-by Ezequiel Garcia <[email protected]>--- drivers/staging/media/sunxi/cedrus/Kconfig | 1 - 1 file changed, 1 deletion(-)drivers/staging/media/sunxi/cedrus/Kconfig +0
-1@@ -3,7 +3,6 @@ config VIDEO_SUNXI_CEDRUS tristate "Allwinner Cedrus VPU driver" depends on VIDEO_DEV && VIDEO_V4L2 && MEDIA_CONTROLLER depends on HAS_DMA - depends on OF depends on MEDIA_CONTROLLER_REQUEST_API select SUNXI_SRAM select VIDEOBUF2_DMA_CONTIGSignature · 1 line
2.26.0.rc2
Signature · 3 lines
Paul Kocialkowski, Bootlin Embedded Linux and kernel engineering https://bootlin.com
Hello Paul,
Quoted 12 lines · Paul Kocialkowski
Hi Ezequiel,
Quoted 9 lines · Ezequiel Garcia
Quoted 8 lines · Paul Kocialkowski
Hi Ezequiel,
Quoted 2 lines · Ezequiel Garcia
The driver is perfectly capable of being built without
CONFIG_OF. Remove this dependency, which is useful for compile-only tests.Thanks for the patch!
Quoted 9 lines
Quoted 6 lines
Quoted 2 lines
Alas, the driver won't do anything useful without OF enabled, so it seems useful to keep that dependency.
I'm not convinced about this argument, I like to have dependencies on things the driver needs to compile (except the machine option, see below).
Is there a general kernel-wide policy about that?
I don't think there is.
Quoted 5 lines
I must admit that I never really understood if
Kconfigdepends are supposed to strictly reflect build dependencies or dependencies that must reasonably be expected for the driver to be useful. The arch dependency (which is farily common) seems to suggest the latter.
Indeed, it's a good point. Just forget this patch :-)
As a note, some drivers use something like (ARCH_FOO && OF) || COMPILE_TEST to allow compile testing in the absence of OF support, if that's something that you care for.
I do think the ARCH_SUNXI dependency makes sense.
Thanks,
Ezequiel