Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sparc: remove unused prom tree functions

Remove the following unused funtions:
prom_nodematch()
prom_firstprop()
prom_node_has_property()

Also declare a few local functions static.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Sam Ravnborg and committed by
David S. Miller
1f42be48 a7e42365

+3 -52
-11
arch/sparc/include/asm/oplib_32.h
··· 147 147 /* Acquire a string property, null string on error. */ 148 148 extern void prom_getstring(phandle node, char *prop, char *buf, int bufsize); 149 149 150 - /* Does the passed node have the given "name"? YES=1 NO=0 */ 151 - extern int prom_nodematch(phandle thisnode, char *name); 152 - 153 150 /* Search all siblings starting at the passed node for "name" matching 154 151 * the given string. Returns the node on success, zero on failure. 155 152 */ 156 153 extern phandle prom_searchsiblings(phandle node_start, char *name); 157 - 158 - /* Return the first property type, as a string, for the given node. 159 - * Returns a null string on error. 160 - */ 161 - extern char *prom_firstprop(phandle node, char *buffer); 162 154 163 155 /* Returns the next property after the passed property for the given 164 156 * node. Returns null string on failure. ··· 159 167 160 168 /* Returns phandle of the path specified */ 161 169 extern phandle prom_finddevice(char *name); 162 - 163 - /* Returns 1 if the specified node has given property. */ 164 - extern int prom_node_has_property(phandle node, char *property); 165 170 166 171 /* Set the indicated property at the given node with the passed value. 167 172 * Returns the number of bytes of your value that the prom took.
+3 -41
arch/sparc/prom/tree_32.c
··· 20 20 static char promlib_buf[128]; 21 21 22 22 /* Internal version of prom_getchild that does not alter return values. */ 23 - phandle __prom_getchild(phandle node) 23 + static phandle __prom_getchild(phandle node) 24 24 { 25 25 unsigned long flags; 26 26 phandle cnode; ··· 52 52 EXPORT_SYMBOL(prom_getchild); 53 53 54 54 /* Internal version of prom_getsibling that does not alter return values. */ 55 - phandle __prom_getsibling(phandle node) 55 + static phandle __prom_getsibling(phandle node) 56 56 { 57 57 unsigned long flags; 58 58 phandle cnode; ··· 177 177 EXPORT_SYMBOL(prom_getstring); 178 178 179 179 180 - /* Does the device at node 'node' have name 'name'? 181 - * YES = 1 NO = 0 182 - */ 183 - int prom_nodematch(phandle node, char *name) 184 - { 185 - int error; 186 - 187 - static char namebuf[128]; 188 - error = prom_getproperty(node, "name", namebuf, sizeof(namebuf)); 189 - if (error == -1) return 0; 190 - if(strcmp(namebuf, name) == 0) return 1; 191 - return 0; 192 - } 193 - 194 180 /* Search siblings at 'node_start' for a node with name 195 181 * 'nodename'. Return node if successful, zero if not. 196 182 */ ··· 200 214 EXPORT_SYMBOL(prom_searchsiblings); 201 215 202 216 /* Interal version of nextprop that does not alter return values. */ 203 - char *__prom_nextprop(phandle node, char * oprop) 217 + static char *__prom_nextprop(phandle node, char * oprop) 204 218 { 205 219 unsigned long flags; 206 220 char *prop; ··· 212 226 213 227 return prop; 214 228 } 215 - 216 - /* Return the first property name for node 'node'. */ 217 - /* buffer is unused argument, but as v9 uses it, we need to have the same interface */ 218 - char *prom_firstprop(phandle node, char *bufer) 219 - { 220 - if (node == 0 || node == -1) 221 - return ""; 222 - 223 - return __prom_nextprop(node, ""); 224 - } 225 - EXPORT_SYMBOL(prom_firstprop); 226 229 227 230 /* Return the property type string after property type 'oprop' 228 231 * at node 'node' . Returns empty string if no more ··· 273 298 return node; 274 299 } 275 300 EXPORT_SYMBOL(prom_finddevice); 276 - 277 - int prom_node_has_property(phandle node, char *prop) 278 - { 279 - char *current_property = ""; 280 - 281 - do { 282 - current_property = prom_nextprop(node, current_property, NULL); 283 - if(!strcmp(current_property, prop)) 284 - return 1; 285 - } while (*current_property); 286 - return 0; 287 - } 288 - EXPORT_SYMBOL(prom_node_has_property); 289 301 290 302 /* Set property 'pname' at node 'node' to value 'value' which has a length 291 303 * of 'size' bytes. Return the number of bytes the prom accepted.