[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2332194.vp9vAagaFD@vostro.rjw.lan>
Date: Wed, 05 Nov 2014 00:00:35 +0100
From: "Rafael J. Wysocki" <rjw@...ysocki.net>
To: Timur Tabi <timur@...eaurora.org>
Cc: Mika Westerberg <mika.westerberg@...ux.intel.com>,
Linus Walleij <linus.walleij@...aro.org>,
Alexandre Courbot <gnurou@...il.com>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Mathias Nyman <mathias.nyman@...ux.intel.com>,
Ning Li <ning.li@...el.com>, Alan Cox <alan@...ux.intel.com>,
lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 0/2] pinctrl: Intel Cherryview/Braswell support
On Tuesday, November 04, 2014 04:32:54 PM Timur Tabi wrote:
> On 11/04/2014 04:47 PM, Rafael J. Wysocki wrote:
> > What exactly do you need the size of the property alone for?
>
> There are lots of situations where you don't know the size of the
> property in advance (e.g. strings), and drivers use of_find_property()
> or of_get_property() to pre-allocate a buffer or to verify that the
> property is correctly formed in the device tree.
The problem is that in ACPI properties are not contiguous buffers full
of data. They generally have internal structure.
But device_property_read_string(), for example, gives you a pointer to
the value of the property and you can check the size of that just fine
using strlen(). Isn't that sufficient?
Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists