* [PATCH 1/2] powerpc/85xx: p1022ds: Use NULL instead of 0 for pointers
@ 2012-11-20 4:31 Tushar Behera
2012-11-20 4:31 ` [PATCH 2/2] powerpc/pseries: pci: " Tushar Behera
2012-11-25 13:07 ` [PATCH 1/2] powerpc/85xx: p1022ds: " Kumar Gala
0 siblings, 2 replies; 3+ messages in thread
From: Tushar Behera @ 2012-11-20 4:31 UTC (permalink / raw)
To: linuxppc-dev, devicetree-discuss; +Cc: patches
The third argument for of_get_property() is a pointer, hence pass
NULL instead of 0.
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
---
arch/powerpc/platforms/85xx/p1022_ds.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/platforms/85xx/p1022_ds.c b/arch/powerpc/platforms/85xx/p1022_ds.c
index 8fb1257..7328b8d 100644
--- a/arch/powerpc/platforms/85xx/p1022_ds.c
+++ b/arch/powerpc/platforms/85xx/p1022_ds.c
@@ -249,7 +249,7 @@ static void p1022ds_set_monitor_port(enum fsl_diu_monitor_port port)
goto exit;
}
- iprop = of_get_property(law_node, "fsl,num-laws", 0);
+ iprop = of_get_property(law_node, "fsl,num-laws", NULL);
if (!iprop) {
pr_err("p1022ds: LAW node is missing fsl,num-laws property\n");
goto exit;
--
1.7.4.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] powerpc/pseries: pci: Use NULL instead of 0 for pointers
2012-11-20 4:31 [PATCH 1/2] powerpc/85xx: p1022ds: Use NULL instead of 0 for pointers Tushar Behera
@ 2012-11-20 4:31 ` Tushar Behera
2012-11-25 13:07 ` [PATCH 1/2] powerpc/85xx: p1022ds: " Kumar Gala
1 sibling, 0 replies; 3+ messages in thread
From: Tushar Behera @ 2012-11-20 4:31 UTC (permalink / raw)
To: linuxppc-dev, devicetree-discuss; +Cc: patches
The third argument for of_get_property() is a pointer, hence pass
NULL instead of 0.
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
---
This code is in a '#if 0' section, but I went ahead with the patch as
this is the only location in kernel where of_get_property is passed 0
as the third argument. If this function is not going to be used again,
then we may consider removing the code altogether.
arch/powerpc/platforms/pseries/pci.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/pci.c b/arch/powerpc/platforms/pseries/pci.c
index 56b864d..0b580f4 100644
--- a/arch/powerpc/platforms/pseries/pci.c
+++ b/arch/powerpc/platforms/pseries/pci.c
@@ -40,7 +40,8 @@ void pcibios_name_device(struct pci_dev *dev)
*/
dn = pci_device_to_OF_node(dev);
if (dn) {
- const char *loc_code = of_get_property(dn, "ibm,loc-code", 0);
+ const char *loc_code = of_get_property(dn, "ibm,loc-code",
+ NULL);
if (loc_code) {
int loc_len = strlen(loc_code);
if (loc_len < sizeof(dev->dev.name)) {
--
1.7.4.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] powerpc/85xx: p1022ds: Use NULL instead of 0 for pointers
2012-11-20 4:31 [PATCH 1/2] powerpc/85xx: p1022ds: Use NULL instead of 0 for pointers Tushar Behera
2012-11-20 4:31 ` [PATCH 2/2] powerpc/pseries: pci: " Tushar Behera
@ 2012-11-25 13:07 ` Kumar Gala
1 sibling, 0 replies; 3+ messages in thread
From: Kumar Gala @ 2012-11-25 13:07 UTC (permalink / raw)
To: Tushar Behera; +Cc: devicetree-discuss, linuxppc-dev, patches
On Nov 19, 2012, at 10:31 PM, Tushar Behera wrote:
> The third argument for of_get_property() is a pointer, hence pass
> NULL instead of 0.
>
> Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
> ---
> arch/powerpc/platforms/85xx/p1022_ds.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
applied to next
- k
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-11-25 13:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-20 4:31 [PATCH 1/2] powerpc/85xx: p1022ds: Use NULL instead of 0 for pointers Tushar Behera
2012-11-20 4:31 ` [PATCH 2/2] powerpc/pseries: pci: " Tushar Behera
2012-11-25 13:07 ` [PATCH 1/2] powerpc/85xx: p1022ds: " Kumar Gala
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).