From: Josh Boyer <jwboyer@linux.vnet.ibm.com>
To: David Miller <davem@davemloft.net>
Cc: linuxppc-dev@ozlabs.org, paulus@samba.org, sfr@canb.auug.org.au
Subject: Re: [PATCH][OF] Add of_device_is_available function
Date: Tue, 26 Feb 2008 17:53:26 -0600 [thread overview]
Message-ID: <20080226175326.56b928b9@zod.rchland.ibm.com> (raw)
In-Reply-To: <20080226.144423.138965691.davem@davemloft.net>
On Tue, 26 Feb 2008 14:44:23 -0800 (PST)
David Miller <davem@davemloft.net> wrote:
> From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Date: Wed, 27 Feb 2008 08:45:37 +1100
>
> > I doubt we do that. Properties that contain things like ranges, or "reg"
> > properties are expected to be of a size that is a multiple of
> > #size-cells/#address-cells and I'm not sure that won't break things here
> > or there if they suddenly get one more byte..
> >
> > Or do you mean you/we are appending that-without- changing the length
> > field ?
>
> Right, simply don't change the length field. Put the zero byte
> at offset "length + 1"
>
> It's stupid to validate NULL termination everywhere when we
> can make it an invariant in one spot.
I don't mind fixing up the function to use strncmp and checking for a 0
length from of_get_property. However, I'm almost certain that other
places in the code have the same issue so what you're saying here seems
to make sense.
josh
next prev parent reply other threads:[~2008-02-26 23:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-23 21:58 [PATCH 1/2][OF] Add of_device_is_disabled function Josh Boyer
2008-02-23 22:00 ` [PATCH 2/2][POWERPC] Ignore disabled serial ports Josh Boyer
2008-02-24 0:59 ` [PATCH 1/2][OF] Add of_device_is_disabled function Josh Boyer
2008-02-24 2:23 ` [PATCH][OF] Add of_device_is_available function Josh Boyer
2008-02-26 9:04 ` Paul Mackerras
2008-02-26 21:34 ` David Miller
2008-02-26 21:45 ` Benjamin Herrenschmidt
2008-02-26 22:44 ` David Miller
2008-02-26 22:58 ` Benjamin Herrenschmidt
2008-02-26 23:53 ` Josh Boyer [this message]
2008-02-24 2:45 ` [PATCH 1/2][OF] Add of_device_is_disabled function David Miller
2008-02-24 20:12 ` Nathan Lynch
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=20080226175326.56b928b9@zod.rchland.ibm.com \
--to=jwboyer@linux.vnet.ibm.com \
--cc=davem@davemloft.net \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
--cc=sfr@canb.auug.org.au \
/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;
as well as URLs for NNTP newsgroup(s).