From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hans de Goede Date: Wed, 23 Mar 2016 11:10:31 +0100 Subject: [U-Boot] [PATCH v2] sunxi: Select CONFIG_OF_BOARD_SETUP from CONFIG_VIDEO In-Reply-To: <1458725214.28250.89.camel@hellion.org.uk> References: <1458684504-11806-1-git-send-email-hdegoede@redhat.com> <1458725214.28250.89.camel@hellion.org.uk> Message-ID: <56F26B97.4040902@redhat.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, On 23-03-16 10:26, Ian Campbell wrote: > On Tue, 2016-03-22 at 23:08 +0100, Hans de Goede wrote: >> Select OF_BOARD_SETUP when CONFIG_VIDEO is set, rather then having it >> in >> almost all our defconfigs. This also fixes it missing from some >> recently >> added defconfigs. >> >> Signed-off-by: Hans de Goede >> --- >> Changes in v2: >> -Only select CONFIG_OF_BOARD_SETUP when CONFIG_VIDEO is set, rather >> then always > > What were the warning you got with the first version? Is that something > we should consider addressing instead? The link between OF_BOARD_SETUP > and VIDEO is not entirely clear to me. Out ft_board_Setup looks like this: #ifdef CONFIG_OF_BOARD_SETUP int ft_board_setup(void *blob, bd_t *bd) { #ifdef CONFIG_VIDEO_DT_SIMPLEFB return sunxi_simplefb_setup(blob); #endif } #endif /* CONFIG_OF_BOARD_SETUP */ So without CONFIG_VIDEO we get a warning about a non void function not having a return, we could change ft_board_setup() to: #ifdef CONFIG_OF_BOARD_SETUP int ft_board_setup(void *blob, bd_t *bd) { int __maybe_unused r; #ifdef CONFIG_VIDEO_DT_SIMPLEFB r = sunxi_simplefb_setup(blob); if (r) return r; #endif return 0; } #endif /* CONFIG_OF_BOARD_SETUP */ Note the using of "int __maybe_unused r" outside of the #ifdef CONFIG_VIDEO_DT_SIMPLEFB is deliberate, it is to avoid having to move things around if / when we add another ft setup function to call from ft_board_setup(). I believe that you're right and doing something like the above + always selecting CONFIG_OF_BOARD_SETUP would be better, I'll send a v3 soon. Regards, Hans