public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ian Campbell <ijc@hellion.org.uk>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v5 3/3] sunxi: video: Add simplefb support
Date: Thu, 20 Nov 2014 09:22:27 +0000	[thread overview]
Message-ID: <1416475347.29243.62.camel@hellion.org.uk> (raw)
In-Reply-To: <1416403920-24561-4-git-send-email-hdegoede@redhat.com>

On Wed, 2014-11-19 at 14:32 +0100, Hans de Goede wrote:
> From: Luc Verhaegen <libv@skynet.be>
> 
> Add simplefb support, note this depends on the kernel having support for
> the clocks property which has recently been added to the simplefb devicetree
> binding.
> 
> Signed-off-by: Luc Verhaegen <libv@skynet.be>
> [hdegoede at redhat.com: Use pre-populated simplefb node under /chosen as
>  disussed on the devicetree list]
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Acked-by: Ian Campbell <ijc@hellion.org.uk>.

One non-blocking queries:

> +	/* Find a framebuffer node, with pipeline == "de_be0-lcd0-hdmi" */
> +	offset = fdt_node_offset_by_compatible(blob, -1,
> +					       "allwinner,simple-framebuffer");
> +	while (offset >= 0) {
> +		ret = fdt_find_string(blob, offset, "allwinner,pipeline",
> +				      "de_be0-lcd0-hdmi");
> +		if (ret == 0)
> +			break;
> +		offset = fdt_node_offset_by_compatible(blob, offset,
> +					       "allwinner,simple-framebuffer");
> +	}

Is this variant non-conformant with coding style?:

	int offset = -1;
	while ( (offset = fdt_node_offset_by_compatible(blob, offset,
                                                        "allwinner,simple-framebuffer") ) {
		LOOP BODY
	}

I expect it is because of the assignment within the while condition,
which is a shame, since this is one case where it is IMHO leads to
clearer code.

  reply	other threads:[~2014-11-20  9:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-19 13:31 [U-Boot] [PATCH v5 0/3] sunxi: video: Add simplefb support Hans de Goede
2014-11-19 13:31 ` [U-Boot] [PATCH v5 1/3] fdt_support: Add a fdt_setup_simplefb_node helper function Hans de Goede
2014-11-20  3:59   ` Stephen Warren
2014-11-20 17:46   ` Simon Glass
2014-11-20 19:40     ` Hans de Goede
2014-11-19 13:31 ` [U-Boot] [PATCH v5 2/3] common/lcd: Make lcd_dt_simplefb_configure_node use fdt_setup_simplefb_node Hans de Goede
2014-11-20 17:48   ` Simon Glass
2014-11-19 13:32 ` [U-Boot] [PATCH v5 3/3] sunxi: video: Add simplefb support Hans de Goede
2014-11-20  9:22   ` Ian Campbell [this message]
2014-11-20 14:13     ` Hans de Goede
2014-11-20 17:40   ` Simon Glass
2014-11-20 20:07     ` Hans de Goede
2014-11-19 22:18 ` [U-Boot] [PATCH v5 0/3] " Simon Glass

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=1416475347.29243.62.camel@hellion.org.uk \
    --to=ijc@hellion.org.uk \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox