All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] sunxi: Select CONFIG_OF_BOARD_SETUP from CONFIG_VIDEO
Date: Wed, 23 Mar 2016 11:10:31 +0100	[thread overview]
Message-ID: <56F26B97.4040902@redhat.com> (raw)
In-Reply-To: <1458725214.28250.89.camel@hellion.org.uk>

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 <hdegoede@redhat.com>
>> ---
>> 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

      reply	other threads:[~2016-03-23 10:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-22 22:08 [U-Boot] [PATCH v2] sunxi: Select CONFIG_OF_BOARD_SETUP from CONFIG_VIDEO Hans de Goede
2016-03-23  9:26 ` Ian Campbell
2016-03-23 10:10   ` Hans de Goede [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56F26B97.4040902@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.