From: Tushar Behera <tushar.behera@linaro.org>
To: linuxppc-dev@lists.ozlabs.org, devicetree-discuss@lists.ozlabs.org
Cc: patches@linaro.org
Subject: [PATCH 2/2] powerpc/pseries: pci: Use NULL instead of 0 for pointers
Date: Tue, 20 Nov 2012 10:01:52 +0530 [thread overview]
Message-ID: <1353385912-25882-2-git-send-email-tushar.behera@linaro.org> (raw)
In-Reply-To: <1353385912-25882-1-git-send-email-tushar.behera@linaro.org>
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
next prev parent reply other threads:[~2012-11-20 4:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2012-11-25 13:07 ` Kumar Gala
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1353385912-25882-2-git-send-email-tushar.behera@linaro.org \
--to=tushar.behera@linaro.org \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=patches@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).