Const poison the propname. It's never set and we often pass it const
char *. Sponsored by: Netflix
This commit is contained in:
parent
8433795d66
commit
6df214c520
@ -242,7 +242,7 @@ OF_instance_to_package(ihandle_t instance)
|
|||||||
|
|
||||||
/* Get the length of a property of a package. */
|
/* Get the length of a property of a package. */
|
||||||
int
|
int
|
||||||
OF_getproplen(phandle_t package, char *propname)
|
OF_getproplen(phandle_t package, const char *propname)
|
||||||
{
|
{
|
||||||
static struct {
|
static struct {
|
||||||
cell_t name;
|
cell_t name;
|
||||||
@ -266,7 +266,7 @@ OF_getproplen(phandle_t package, char *propname)
|
|||||||
|
|
||||||
/* Get the value of a property of a package. */
|
/* Get the value of a property of a package. */
|
||||||
int
|
int
|
||||||
OF_getprop(phandle_t package, char *propname, void *buf, int buflen)
|
OF_getprop(phandle_t package, const char *propname, void *buf, int buflen)
|
||||||
{
|
{
|
||||||
static struct {
|
static struct {
|
||||||
cell_t name;
|
cell_t name;
|
||||||
@ -294,7 +294,7 @@ OF_getprop(phandle_t package, char *propname, void *buf, int buflen)
|
|||||||
|
|
||||||
/* Get the next property of a package. */
|
/* Get the next property of a package. */
|
||||||
int
|
int
|
||||||
OF_nextprop(phandle_t package, char *previous, char *buf)
|
OF_nextprop(phandle_t package, const char *previous, char *buf)
|
||||||
{
|
{
|
||||||
static struct {
|
static struct {
|
||||||
cell_t name;
|
cell_t name;
|
||||||
@ -321,7 +321,7 @@ OF_nextprop(phandle_t package, char *previous, char *buf)
|
|||||||
/* Set the value of a property of a package. */
|
/* Set the value of a property of a package. */
|
||||||
/* XXX Has a bug on FirePower */
|
/* XXX Has a bug on FirePower */
|
||||||
int
|
int
|
||||||
OF_setprop(phandle_t package, char *propname, void *buf, int len)
|
OF_setprop(phandle_t package, const char *propname, void *buf, int len)
|
||||||
{
|
{
|
||||||
static struct {
|
static struct {
|
||||||
cell_t name;
|
cell_t name;
|
||||||
|
@ -89,10 +89,10 @@ phandle_t OF_peer(phandle_t);
|
|||||||
phandle_t OF_child(phandle_t);
|
phandle_t OF_child(phandle_t);
|
||||||
phandle_t OF_parent(phandle_t);
|
phandle_t OF_parent(phandle_t);
|
||||||
phandle_t OF_instance_to_package(ihandle_t);
|
phandle_t OF_instance_to_package(ihandle_t);
|
||||||
int OF_getproplen(phandle_t, char *);
|
int OF_getproplen(phandle_t, const char *);
|
||||||
int OF_getprop(phandle_t, char *, void *, int);
|
int OF_getprop(phandle_t, const char *, void *, int);
|
||||||
int OF_nextprop(phandle_t, char *, char *);
|
int OF_nextprop(phandle_t, const char *, char *);
|
||||||
int OF_setprop(phandle_t, char *, void *, int);
|
int OF_setprop(phandle_t, const char *, void *, int);
|
||||||
int OF_canon(const char *, char *, int);
|
int OF_canon(const char *, char *, int);
|
||||||
phandle_t OF_finddevice(const char *);
|
phandle_t OF_finddevice(const char *);
|
||||||
int OF_instance_to_path(ihandle_t, char *, int);
|
int OF_instance_to_path(ihandle_t, char *, int);
|
||||||
|
Loading…
Reference in New Issue
Block a user