All of lore.kernel.org
 help / color / mirror / Atom feed
From: Timur Tabi <timur@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] What do I do if fdt_setprop() returns -FDT_ERR_NOSPACE?
Date: Fri, 07 Dec 2007 15:28:53 -0600	[thread overview]
Message-ID: <4759BB15.9000006@freescale.com> (raw)

I have this code:

static int fdt_set_qe_firmware(void *blob, int nodeoffset, const char *name, 
bd_t *bd)
{
	struct qe_firmware_info *qe_fw_info;
	int ret;

	qe_fw_info = qe_get_firmware_info();

	if (qe_fw_info) {
                 /* We assume the node doesn't exist yet */
		nodeoffset = fdt_add_subnode(blob, nodeoffset, name);
		if (nodeoffset < 0)
			return nodeoffset;

		ret = fdt_setprop_string(blob, nodeoffset, "id", qe_fw_info->id);
		if (ret < 0)
			return ret;

		ret = fdt_setprop_typed(blob, nodeoffset, "extended_modes",
			qe_fw_info->extended_modes);
		if (ret < 0)
			return ret;

		return fdt_setprop(blob, nodeoffset, "virtual_traps",
			qe_fw_info->vtraps, sizeof(qe_fw_info->vtraps));
	}

	return 0;
}

The call to fdt_setprop_string() returns -FDT_ERR_NOSPACE.  I created the DTB 
with this command:

dtc -I dts -O dtb -b 0 -R 8 -S 0x3000

What am I missing?  Why is there no space left to add a string?

-- 
Timur Tabi
Linux kernel developer at Freescale

             reply	other threads:[~2007-12-07 21:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-07 21:28 Timur Tabi [this message]
2007-12-07 21:43 ` [U-Boot-Users] What do I do if fdt_setprop() returns -FDT_ERR_NOSPACE? Jerry Van Baren
2007-12-08  2:44   ` Timur Tabi
2007-12-10 15:22     ` Kumar Gala
2007-12-10 19:04     ` Timur Tabi

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=4759BB15.9000006@freescale.com \
    --to=timur@freescale.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.