All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jon Loeliger <jdl@jdl.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: libfdt: Remove un-const-safe fdt_set_header macro
Date: Thu, 25 Oct 2007 09:49:38 -0500	[thread overview]
Message-ID: <E1Il41i-00089f-6B@jdl.com> (raw)
In-Reply-To: Your message of "Thu, 25 Oct 2007 14:29:38 +1000." <20071025042938.GD24856@localhost.localdomain>

So, like, the other day David Gibson mumbled:
> The fdt_set_header() macro casts an arbitrary pointer into (struct
> fdt_header *) to set fdt header fields.  While we need to change the
> type, so that we can use this macro on the usual (void *) used to
> represent a device tree blob, the current macro also casts away any
> const on the input pointer, which loses an important check.
> 
> This patch replaces the fdt_set_header() macro with a set of inline
> functions, one for each header field which do a similar thing, but
> which won't silently remove const from a given pointer.  This approach
> is also more in keeping with the individual accessor macros we use for
> reading fdt header fields.
> 
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>

Applied.

jdl

      reply	other threads:[~2007-10-25 14:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-25  4:29 libfdt: Remove un-const-safe fdt_set_header macro David Gibson
2007-10-25 14:49 ` Jon Loeliger [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=E1Il41i-00089f-6B@jdl.com \
    --to=jdl@jdl.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=linuxppc-dev@ozlabs.org \
    /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.