From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.170]) by ozlabs.org (Postfix) with ESMTP id 4BCAB67CA7 for ; Sat, 28 Oct 2006 16:42:01 +1000 (EST) Received: by ug-out-1314.google.com with SMTP id 30so752700ugc for ; Fri, 27 Oct 2006 23:42:00 -0700 (PDT) Message-ID: <528646bc0610272341s3c655ebbn785b373f148f6174@mail.gmail.com> Date: Sat, 28 Oct 2006 00:41:59 -0600 From: "Grant Likely" Sender: glikely@gmail.com To: "Benjamin Herrenschmidt" , "linuxppc-dev@ozlabs.org" Subject: Is get_property() correct? MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Is the implementation of get_property correct? The comment says it returns the value of a property; but the return statement just returns the property pointer (cast as void*) it got from of_find_property(); not the value. Does the comment or the code need to change? in prom.c: /* * Find a property with a given name for a given node * and return the value. */ const void *get_property(const struct device_node *np, const char *name, int *lenp) { struct property *pp = of_find_property(np,name,lenp); return pp ? pp->value : NULL; } EXPORT_SYMBOL(get_property); Cheers, g. -- Grant Likely, B.Sc. P.Eng. Secret Lab Technologies Ltd. grant.likely@secretlab.ca (403) 399-0195