Re: [PATCH] [media] [kbuild] Add and use IS_REACHABLE macro
On 2015-02-20 10:29, Arnd Bergmann wrote: On Thursday 19 February 2015 16:06:18 Michal Marek wrote: We have similar problems in other areas of the kernel. In theory, we could enforce the VIDEO_TUNER driver to be modular here by adding lots of dependencies to it: config VIDEO_TUNER tristate depends on MEDIA_TUNER_TEA5761 || !MEDIA_TUNER_TEA5761 depends on MEDIA_TUNER_TEA5767 || !MEDIA_TUNER_TEA5767 depends on MEDIA_TUNER_MSI001 || !MEDIA_TUNER_MSI001 Nah, that's even uglier. I suggest to merge your IS_REACHABLE patch. Ok, can I take this as an ack from your side to merge the include/linux/kconfig.h part of the patch through the linux-media tree? Yes. If you want Acked-by: Michal Marek mma...@suse.cz [kconfig] I thought about splitting up the patch into two, but that would just make merging it harder because we'd still have the dependency. Agreed, no need to pedantically split patches just for the sake of it. Michal -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] [media] [kbuild] Add and use IS_REACHABLE macro
On 2015-02-18 18:12, Arnd Bergmann wrote: In the media drivers, the v4l2 core knows about all submodules and calls into them from a common function. However this cannot work if the modules that get called are loadable and the core is built-in. In that case we get drivers/built-in.o: In function `set_type': drivers/media/v4l2-core/tuner-core.c:301: undefined reference to `tea5767_attach' drivers/media/v4l2-core/tuner-core.c:307: undefined reference to `tea5761_attach' drivers/media/v4l2-core/tuner-core.c:349: undefined reference to `tda9887_attach' drivers/media/v4l2-core/tuner-core.c:405: undefined reference to `xc4000_attach' [...] Ideally Kconfig would be used to avoid the case of a broken dependency, or the code restructured in a way to turn around the dependency, but either way would require much larger changes here. What can be done without extending kbuild is to accept CONFIG_VIDEO_TUNER=y and CONFIG_MEDIA_TUNER_FOO=m, but build both into the kernel, e.g. diff --git a/drivers/media/tuners/Kconfig b/drivers/media/tuners/Kconfig index 42e5a01..d2c7e89 100644 --- a/drivers/media/tuners/Kconfig +++ b/drivers/media/tuners/Kconfig @@ -71,6 +71,11 @@ config MEDIA_TUNER_TEA5767 help Say Y here to include support for the Philips TEA5767 radio tuner. +config MEDIA_TUNER_TEA5767_BUILD + tristate + default VIDEO_TUNER || MEDIA_TUNER_TEA5767 + depends on MEDIA_TUNER_TEA5767!=n + config MEDIA_TUNER_MSI001 tristate Mirics MSi001 depends on MEDIA_SUPPORT SPI VIDEO_V4L2 Actually, I have hard time coming up with a kconfig syntactic sugar to express such dependency. If I understand it correctly, the valid configurations in this case are MEDIA_TUNER_TEA5767 n m y VIDEO_TUNER n x x x m x x x y x x I.e. only VIDEO_TUNER=y and MEDIA_TUNER_TEA5767=m is incorrect, isn't it? Thanks, Michal -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] [media] [kbuild] Add and use IS_REACHABLE macro
Dne 19.2.2015 v 15:53 Arnd Bergmann napsal(a): On Thursday 19 February 2015 13:11:07 Michal Marek wrote: On 2015-02-18 18:12, Arnd Bergmann wrote: In the media drivers, the v4l2 core knows about all submodules and calls into them from a common function. However this cannot work if the modules that get called are loadable and the core is built-in. In that case we get drivers/built-in.o: In function `set_type': drivers/media/v4l2-core/tuner-core.c:301: undefined reference to `tea5767_attach' drivers/media/v4l2-core/tuner-core.c:307: undefined reference to `tea5761_attach' drivers/media/v4l2-core/tuner-core.c:349: undefined reference to `tda9887_attach' drivers/media/v4l2-core/tuner-core.c:405: undefined reference to `xc4000_attach' [...] Ideally Kconfig would be used to avoid the case of a broken dependency, or the code restructured in a way to turn around the dependency, but either way would require much larger changes here. What can be done without extending kbuild is to accept CONFIG_VIDEO_TUNER=y and CONFIG_MEDIA_TUNER_FOO=m, but build both into the kernel, e.g. Right, but diff --git a/drivers/media/tuners/Kconfig b/drivers/media/tuners/Kconfig index 42e5a01..d2c7e89 100644 --- a/drivers/media/tuners/Kconfig +++ b/drivers/media/tuners/Kconfig @@ -71,6 +71,11 @@ config MEDIA_TUNER_TEA5767 help Say Y here to include support for the Philips TEA5767 radio tuner. +config MEDIA_TUNER_TEA5767_BUILD + tristate + default VIDEO_TUNER || MEDIA_TUNER_TEA5767 + depends on MEDIA_TUNER_TEA5767!=n + config MEDIA_TUNER_MSI001 tristate Mirics MSi001 depends on MEDIA_SUPPORT SPI VIDEO_V4L2 We'd then have to do the same for each tuner driver that we have in the kernel or that gets added later. Yes :-(. Actually, I have hard time coming up with a kconfig syntactic sugar to express such dependency. If I understand it correctly, the valid configurations in this case are MEDIA_TUNER_TEA5767 n m y VIDEO_TUNER n x x x m x x x y x x I.e. only VIDEO_TUNER=y and MEDIA_TUNER_TEA5767=m is incorrect, isn't it? Yes, I think that is correct. OK. In this case, a kconfig extension would be really too specific: if set, set to at least X but only if X is set as well. We have similar problems in other areas of the kernel. In theory, we could enforce the VIDEO_TUNER driver to be modular here by adding lots of dependencies to it: config VIDEO_TUNER tristate depends on MEDIA_TUNER_TEA5761 || !MEDIA_TUNER_TEA5761 depends on MEDIA_TUNER_TEA5767 || !MEDIA_TUNER_TEA5767 depends on MEDIA_TUNER_MSI001 || !MEDIA_TUNER_MSI001 Nah, that's even uglier. I suggest to merge your IS_REACHABLE patch. Michal -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] Documentation: Fix DocBook build with relative $(srctree)
After commits 890676c6 (kbuild: Use relative path when building in the source tree) and 9da0763b (kbuild: Use relative path when building in a subdir of the source tree), the $(srctree) variable can be a relative path. This breaks Documentation/DocBook/media/Makefile, because it tries to create symlinks from a subdirectory of the object tree to the source tree. Fix this by using a full path in this case. Reported-by: Randy Dunlap rdun...@infradead.org Signed-off-by: Michal Marek mma...@suse.cz --- Documentation/DocBook/media/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/DocBook/media/Makefile b/Documentation/DocBook/media/Makefile index 1d27f0a..639e748 100644 --- a/Documentation/DocBook/media/Makefile +++ b/Documentation/DocBook/media/Makefile @@ -202,8 +202,8 @@ $(MEDIA_OBJ_DIR)/%: $(MEDIA_SRC_DIR)/%.b64 $(MEDIA_OBJ_DIR)/v4l2.xml: $(OBJIMGFILES) @$($(quiet)gen_xml) - @(ln -sf $(MEDIA_SRC_DIR)/v4l/*xml $(MEDIA_OBJ_DIR)/) - @(ln -sf $(MEDIA_SRC_DIR)/dvb/*xml $(MEDIA_OBJ_DIR)/) + @(ln -sf `cd $(MEDIA_SRC_DIR) /bin/pwd`/v4l/*xml $(MEDIA_OBJ_DIR)/) + @(ln -sf `cd $(MEDIA_SRC_DIR) /bin/pwd`/dvb/*xml $(MEDIA_OBJ_DIR)/) $(MEDIA_OBJ_DIR)/videodev2.h.xml: $(srctree)/include/uapi/linux/videodev2.h $(MEDIA_OBJ_DIR)/v4l2.xml @$($(quiet)gen_xml) -- 1.9.2 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: MANY errors while building media docbooks
On 2014-06-16 19:28, Randy Dunlap wrote: on Linux v3.16-rc1, building docbooks to a separate build directory (mkdir DOC; make O=DOC htmldocs) gives me more than 12,000 lines like this: grep: ./Documentation/DocBook//vidioc-subdev-g-fmt.xml: No such file or directory grep: ./Documentation/DocBook//vidioc-subdev-g-frame-interval.xml: No such file or directory grep: ./Documentation/DocBook//vidioc-subdev-g-selection.xml: No such file or directory grep: ./Documentation/DocBook//vidioc-subscribe-event.xml: No such file or directory grep: ./Documentation/DocBook//media-ioc-device-info.xml: No such file or directory grep: ./Documentation/DocBook//media-ioc-enum-entities.xml: No such file or directory grep: ./Documentation/DocBook//media-ioc-enum-links.xml: No such file or directory grep: ./Documentation/DocBook//media-ioc-setup-link.xml: No such file or directory Seems to be another fallout of the relative path patches, I'll have a look. Thanks, Michal -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [media] em28xx: Put remaining .vidioc_g_chip_info instance under ADV_DEBUG
Commit cd634f1 ([media] v4l2: put VIDIOC_DBG_G_CHIP_NAME under ADV_DEBUG) missed the initializer of radio_ioctl_ops: drivers/media/usb/em28xx/em28xx-video.c:1830:2: error: unknown field 'vidioc_g_chip_info' specified in initializer drivers/media/usb/em28xx/em28xx-video.c:1830:26: error: 'vidioc_g_chip_info' undeclared here (not in a function) Signed-off-by: Michal Marek mma...@suse.cz --- drivers/media/usb/em28xx/em28xx-video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c index c27c1f6..32d60e5 100644 --- a/drivers/media/usb/em28xx/em28xx-video.c +++ b/drivers/media/usb/em28xx/em28xx-video.c @@ -1827,8 +1827,8 @@ static const struct v4l2_ioctl_ops radio_ioctl_ops = { .vidioc_subscribe_event = v4l2_ctrl_subscribe_event, .vidioc_unsubscribe_event = v4l2_event_unsubscribe, .vidioc_g_chip_ident = vidioc_g_chip_ident, - .vidioc_g_chip_info = vidioc_g_chip_info, #ifdef CONFIG_VIDEO_ADV_DEBUG + .vidioc_g_chip_info = vidioc_g_chip_info, .vidioc_g_register= vidioc_g_register, .vidioc_s_register= vidioc_s_register, #endif -- 1.8.2.1 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/5] kconfig: add an option to determine a menu's visibility
On Thu, Apr 28, 2011 at 10:38:02AM -0700, Randy Dunlap wrote: On Fri, 26 Nov 2010 08:17:36 -0800 Randy Dunlap wrote: On Fri, 26 Nov 2010 17:15:11 +0100 Michal Marek wrote: Subject: [PATCH] kconfig: Document the new visible if syntax Hi, Can we get this kconfig-language.txt patch added to the kernel source tree, please? Thanks for the reminder, I pushed it to kbuild-2.6.git#kconfig now. Michal Signed-off-by: Michal Marek mma...@suse.cz diff --git a/Documentation/kbuild/kconfig-language.txt b/Documentation/kbuild/kconfig-language.txt index 2fe93ca..2522cca 100644 --- a/Documentation/kbuild/kconfig-language.txt +++ b/Documentation/kbuild/kconfig-language.txt @@ -114,6 +114,13 @@ applicable everywhere (see syntax). the illegal configurations all over. kconfig should one day warn about such things. +- limiting menu display: visible if expr + This attribute is only applicable to menu blocks, if the condition is + false, the menu block is not displayed to the user (the symbols + contained there can still be selected by other symbols, though). It is + similar to a conditional prompt attribude for individual menu + entries. + Default value of visible is true ?? - numerical ranges: range symbol symbol [if expr] This allows to limit the range of possible input values for int and hex symbols. The user can only input a value which is larger than @@ -300,7 +307,8 @@ menu: endmenu This defines a menu block, see Menu structure above for more -information. The only possible options are dependencies. +information. The only possible options are dependencies and visible +attributes. if: -- -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 13/34] media/radio-maxiradio: Drop __TIME__ usage
On Tue, Apr 05, 2011 at 04:59:00PM +0200, Michal Marek wrote: The kernel already prints its build timestamp during boot, no need to repeat it in random drivers and produce different object files each time. Cc: Mauro Carvalho Chehab mche...@redhat.com Cc: linux-media@vger.kernel.org Signed-off-by: Michal Marek mma...@suse.cz --- drivers/media/radio/radio-maxiradio.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) Applied to kbuild-2.6.git#trivial. Michal -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 14/34] media/cx231xx: Drop __TIME__ usage
On Tue, Apr 05, 2011 at 04:59:01PM +0200, Michal Marek wrote: The kernel already prints its build timestamp during boot, no need to repeat it in random drivers and produce different object files each time. Cc: Mauro Carvalho Chehab mche...@redhat.com Cc: linux-media@vger.kernel.org Signed-off-by: Michal Marek mma...@suse.cz --- drivers/media/video/cx231xx/cx231xx-avcore.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Applied to kbuild-2.6.git#trivial. Michal -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 14/34] media/cx231xx: Drop __TIME__ usage
The kernel already prints its build timestamp during boot, no need to repeat it in random drivers and produce different object files each time. Cc: Mauro Carvalho Chehab mche...@redhat.com Cc: linux-media@vger.kernel.org Signed-off-by: Michal Marek mma...@suse.cz --- drivers/media/video/cx231xx/cx231xx-avcore.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/media/video/cx231xx/cx231xx-avcore.c b/drivers/media/video/cx231xx/cx231xx-avcore.c index c53e972..ff5cb50 100644 --- a/drivers/media/video/cx231xx/cx231xx-avcore.c +++ b/drivers/media/video/cx231xx/cx231xx-avcore.c @@ -1356,7 +1356,7 @@ void cx231xx_dump_SC_reg(struct cx231xx *dev) { u8 value[4] = { 0, 0, 0, 0 }; int status = 0; - cx231xx_info(cx231xx_dump_SC_reg %s!\n, __TIME__); + cx231xx_info(cx231xx_dump_SC_reg!\n); status = cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, BOARD_CFG_STAT, value, 4); -- 1.7.4.1 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 13/34] media/radio-maxiradio: Drop __TIME__ usage
The kernel already prints its build timestamp during boot, no need to repeat it in random drivers and produce different object files each time. Cc: Mauro Carvalho Chehab mche...@redhat.com Cc: linux-media@vger.kernel.org Signed-off-by: Michal Marek mma...@suse.cz --- drivers/media/radio/radio-maxiradio.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/media/radio/radio-maxiradio.c b/drivers/media/radio/radio-maxiradio.c index 5c2a905..e83e840 100644 --- a/drivers/media/radio/radio-maxiradio.c +++ b/drivers/media/radio/radio-maxiradio.c @@ -412,8 +412,7 @@ static int __devinit maxiradio_init_one(struct pci_dev *pdev, const struct pci_d goto err_out_free_region; } - v4l2_info(v4l2_dev, version DRIVER_VERSION -time __TIME____DATE__ \n); + v4l2_info(v4l2_dev, version DRIVER_VERSION \n); v4l2_info(v4l2_dev, found Guillemot MAXI Radio device (io = 0x%x)\n, dev-io); -- 1.7.4.1 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/5] kconfig: add an option to determine a menu's visibility
On 25.11.2010 18:06, Arnaud Lacombe wrote: Hi folks, On Sat, Nov 6, 2010 at 5:30 PM, Arnaud Lacombe lacom...@gmail.com wrote: This option is aimed to add the possibility to control a menu's visibility without adding dependency to the expression to all the submenu. Signed-off-by: Arnaud Lacombe lacom...@gmail.com --- scripts/kconfig/expr.h |1 + scripts/kconfig/lkc.h |1 + scripts/kconfig/menu.c | 11 +++ scripts/kconfig/zconf.gperf |1 + scripts/kconfig/zconf.y | 21 ++--- 5 files changed, 32 insertions(+), 3 deletions(-) As there seem to be no interested from Michal to either, ACK, NACK, or even comment this series, please let me withdraw these patches. If this mail is not enough to void the patch, I hope to still be able to withdraw my Signed-off-by from this particular series, and thus no longer be able to certify the origin of the patches to prevent their merge. Hi Arnaud, I'm sorry, I was sick for longer time and am now going through the patches that accumulated during that time. I understand your frustration, but the fact that I commented / applied some other patches yesterday and not this one does not mean that I'm ignoring it. Please accept my apologies, I'm looking at your patch right now... Michal -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/5] kconfig: add an option to determine a menu's visibility
On Fri, Nov 26, 2010 at 11:31:16AM +0100, Michal Marek wrote: On 25.11.2010 18:06, Arnaud Lacombe wrote: Hi folks, On Sat, Nov 6, 2010 at 5:30 PM, Arnaud Lacombe lacom...@gmail.com wrote: This option is aimed to add the possibility to control a menu's visibility without adding dependency to the expression to all the submenu. Signed-off-by: Arnaud Lacombe lacom...@gmail.com --- scripts/kconfig/expr.h |1 + scripts/kconfig/lkc.h |1 + scripts/kconfig/menu.c | 11 +++ scripts/kconfig/zconf.gperf |1 + scripts/kconfig/zconf.y | 21 ++--- 5 files changed, 32 insertions(+), 3 deletions(-) As there seem to be no interested from Michal to either, ACK, NACK, or even comment this series, please let me withdraw these patches. If this mail is not enough to void the patch, I hope to still be able to withdraw my Signed-off-by from this particular series, and thus no longer be able to certify the origin of the patches to prevent their merge. Hi Arnaud, I'm sorry, I was sick for longer time and am now going through the patches that accumulated during that time. I understand your frustration, but the fact that I commented / applied some other patches yesterday and not this one does not mean that I'm ignoring it. Please accept my apologies, I'm looking at your patch right now... So the patches look OK to me, I added your patches to kbuild-2.6.git#menu-visibility and merged the branch to for-next. The new syntax should be documented in Documentation/kbuild/kconfig-language.txt, below is a first attempt at it. If the patches work fine in linux-next _and_ you give me permission to push them to Linus, I'll move them to rc-fixes and send a pull request. Michal Subject: [PATCH] kconfig: Document the new visible if syntax Signed-off-by: Michal Marek mma...@suse.cz diff --git a/Documentation/kbuild/kconfig-language.txt b/Documentation/kbuild/kconfig-language.txt index 2fe93ca..2522cca 100644 --- a/Documentation/kbuild/kconfig-language.txt +++ b/Documentation/kbuild/kconfig-language.txt @@ -114,6 +114,13 @@ applicable everywhere (see syntax). the illegal configurations all over. kconfig should one day warn about such things. +- limiting menu display: visible if expr + This attribute is only applicable to menu blocks, if the condition is + false, the menu block is not displayed to the user (the symbols + contained there can still be selected by other symbols, though). It is + similar to a conditional prompt attribude for individual menu + entries. + - numerical ranges: range symbol symbol [if expr] This allows to limit the range of possible input values for int and hex symbols. The user can only input a value which is larger than @@ -300,7 +307,8 @@ menu: endmenu This defines a menu block, see Menu structure above for more -information. The only possible options are dependencies. +information. The only possible options are dependencies and visible +attributes. if: -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: REGRESSION: Re: [GIT] kconfig rc fixes
On 3.11.2010 23:29, Mauro Carvalho Chehab wrote: Em 09-10-2010 18:40, Michal Marek escreveu: The following changes since commit cb655d0f3d57c23db51b981648e452988c0223f9: Linux 2.6.36-rc7 (2010-10-06 13:39:52 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6.git rc-fixes Arnaud Lacombe (1): kconfig: delay symbol direct dependency initialization This patch generated a regression with V4L build. After applying it, some Kconfig dependencies that used to work with V4L Kconfig broke. You mean, the dependencies trigger a warning now, right? Also, you are replying to my pull request for 2.6.36-rc8, but that pull request also included kconfig: Temporarily disable dependency warnings, so 2.6.36 final is NOT affected by this, just to clarify. 2.6.37-rc1 reverted this workaround and I hope we come to some solution now. BTW, http://www.kerneltrap.com/mailarchive/linux-kernel/2010/10/7/4629122/thread is how a very similar issue was fixed in the i2c Kconfig (commit 0a57274 in 2.6.37-rc1 now). Michal -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html