From patchwork Tue Nov 20 04:31:52 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 12957 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id B024F23E01 for ; Tue, 20 Nov 2012 04:38:10 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 5B212A1815B for ; Tue, 20 Nov 2012 04:38:10 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so7642708iej.11 for ; Mon, 19 Nov 2012 20:38:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=MnZ9S6mBgXREZDeqsrwX1bwxlhGa3dsvg166qqC1r+8=; b=O3nAxaQHmqlg5T9rhluV8V7SvG26H6Gck98+KHRnyh5Vc2dZ5weTh8jx0BU5b/vHhg KxvzaXyM+MYklieeTPPYXFzNMMB2GuZ2JACMwBwumIbQEgiW7nKTDLSC2fux1ffgmx9z Jeu5l0VVwZSzWOZmG+UN0HGKCpNyzosA78LfpzrRteGKDeNM8TTCETwWRRbO5K6ojuyd gudeYR3XbSq65aJrW8sa4EcMoL0fn9er6YMf3ZRi+UouMSqtikRaM0E6kHAZys7KMKlU PY7uBtKtzcGOQndlOgbFhwdTMxhMTPtqjE0ab4G5KnKT49w7QET2ersoJkS6x4IcAJL0 hOuw== Received: by 10.43.46.2 with SMTP id um2mr12804643icb.18.1353386290128; Mon, 19 Nov 2012 20:38:10 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp267431igt; Mon, 19 Nov 2012 20:38:09 -0800 (PST) Received: by 10.66.74.65 with SMTP id r1mr4644392pav.75.1353386289482; Mon, 19 Nov 2012 20:38:09 -0800 (PST) Received: from mail-pb0-f45.google.com (mail-pb0-f45.google.com [209.85.160.45]) by mx.google.com with ESMTPS id bc7si16250418pab.123.2012.11.19.20.38.09 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 19 Nov 2012 20:38:09 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.45 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) client-ip=209.85.160.45; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.45 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) smtp.mail=tushar.behera@linaro.org Received: by mail-pb0-f45.google.com with SMTP id mc8so4312183pbc.18 for ; Mon, 19 Nov 2012 20:38:09 -0800 (PST) Received: by 10.68.191.1 with SMTP id gu1mr45614392pbc.150.1353386289107; Mon, 19 Nov 2012 20:38:09 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id pu4sm7355288pbb.72.2012.11.19.20.38.06 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 19 Nov 2012 20:38:08 -0800 (PST) From: Tushar Behera To: linuxppc-dev@lists.ozlabs.org, devicetree-discuss@lists.ozlabs.org Cc: galak@kernel.crashing.org, 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 Message-Id: <1353385912-25882-2-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1353385912-25882-1-git-send-email-tushar.behera@linaro.org> References: <1353385912-25882-1-git-send-email-tushar.behera@linaro.org> X-Gm-Message-State: ALoCoQnaGgxYyfZLasYD/OkauGyBx7+IioMVtPNf42iZA73ZKssjAqzLFEFHQPmVOYJA6YVK6MqF The third argument for of_get_property() is a pointer, hence pass NULL instead of 0. Signed-off-by: Tushar Behera --- 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)) {