From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Subject: Re: [PATCH 3/6] fdt: Add fdtdec functions to read byte array Date: Mon, 05 Dec 2011 16:54:56 -0700 Message-ID: <4EDD59D0.9090607@nvidia.com> References: <1322881071-11148-1-git-send-email-sjg@chromium.org> <1322881071-11148-4-git-send-email-sjg@chromium.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1322881071-11148-4-git-send-email-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org To: Simon Glass Cc: Albert ARIBAUD , Devicetree Discuss , U-Boot Mailing List , Jerry Van Baren , Tom Warren List-Id: devicetree@vger.kernel.org On 12/02/2011 07:57 PM, Simon Glass wrote: > From: Anton Staff > > Sometimes we don't need a full cell for each value. This provides > a simple function to read a byte array, both with and without > copying it. > +const u8 *fdtdec_locate_byte_array(const void *blob, int node, > + const char *prop_name, int count) > +{ > + const u8 *cell; > + int err; > + > + cell = get_prop_len(blob, node, prop_name, count, &err); Isn't that called get_prop_check_min_len() now? > + if (err) > + return NULL; > + return cell; > +} -- nvpublic