diff options
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/platforms/powermac/pfunc_core.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/reconfig.c | 3 | ||||
-rw-r--r-- | arch/powerpc/sysdev/fsl_pci.c | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/powermac/pfunc_core.c b/arch/powerpc/platforms/powermac/pfunc_core.c index b0c3777528a1..d588e48dff74 100644 --- a/arch/powerpc/platforms/powermac/pfunc_core.c +++ b/arch/powerpc/platforms/powermac/pfunc_core.c | |||
@@ -686,7 +686,7 @@ static int pmf_add_functions(struct pmf_device *dev, void *driverdata) | |||
686 | int count = 0; | 686 | int count = 0; |
687 | 687 | ||
688 | for (pp = dev->node->properties; pp != 0; pp = pp->next) { | 688 | for (pp = dev->node->properties; pp != 0; pp = pp->next) { |
689 | char *name; | 689 | const char *name; |
690 | if (strncmp(pp->name, PP_PREFIX, plen) != 0) | 690 | if (strncmp(pp->name, PP_PREFIX, plen) != 0) |
691 | continue; | 691 | continue; |
692 | name = pp->name + plen; | 692 | name = pp->name + plen; |
diff --git a/arch/powerpc/platforms/pseries/reconfig.c b/arch/powerpc/platforms/pseries/reconfig.c index 39f71fba9b38..2f4668136b20 100644 --- a/arch/powerpc/platforms/pseries/reconfig.c +++ b/arch/powerpc/platforms/pseries/reconfig.c | |||
@@ -281,12 +281,11 @@ static struct property *new_property(const char *name, const int length, | |||
281 | if (!new) | 281 | if (!new) |
282 | return NULL; | 282 | return NULL; |
283 | 283 | ||
284 | if (!(new->name = kmalloc(strlen(name) + 1, GFP_KERNEL))) | 284 | if (!(new->name = kstrdup(name, GFP_KERNEL))) |
285 | goto cleanup; | 285 | goto cleanup; |
286 | if (!(new->value = kmalloc(length + 1, GFP_KERNEL))) | 286 | if (!(new->value = kmalloc(length + 1, GFP_KERNEL))) |
287 | goto cleanup; | 287 | goto cleanup; |
288 | 288 | ||
289 | strcpy(new->name, name); | ||
290 | memcpy(new->value, value, length); | 289 | memcpy(new->value, value, length); |
291 | *(((char *)new->value) + length) = 0; | 290 | *(((char *)new->value) + length) = 0; |
292 | new->length = length; | 291 | new->length = length; |
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c index ffb93ae9379b..01b62a62c635 100644 --- a/arch/powerpc/sysdev/fsl_pci.c +++ b/arch/powerpc/sysdev/fsl_pci.c | |||
@@ -136,7 +136,7 @@ static void __init setup_pci_atmu(struct pci_controller *hose, | |||
136 | u32 pcicsrbar = 0, pcicsrbar_sz; | 136 | u32 pcicsrbar = 0, pcicsrbar_sz; |
137 | u32 piwar = PIWAR_EN | PIWAR_PF | PIWAR_TGI_LOCAL | | 137 | u32 piwar = PIWAR_EN | PIWAR_PF | PIWAR_TGI_LOCAL | |
138 | PIWAR_READ_SNOOP | PIWAR_WRITE_SNOOP; | 138 | PIWAR_READ_SNOOP | PIWAR_WRITE_SNOOP; |
139 | char *name = hose->dn->full_name; | 139 | const char *name = hose->dn->full_name; |
140 | const u64 *reg; | 140 | const u64 *reg; |
141 | int len; | 141 | int len; |
142 | 142 | ||