devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Sachin Kamat <sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	patches-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org
Subject: Re: [PATCH][Resend] of: Fix null pointer related warnings in base.c file
Date: Thu, 05 Jul 2012 11:09:26 -0500	[thread overview]
Message-ID: <4FF5BC36.60608@gmail.com> (raw)
In-Reply-To: <1340770485-22670-1-git-send-email-sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

On 06/26/2012 11:14 PM, Sachin Kamat wrote:
> Fixes the following sparse warnings:
> drivers/of/base.c:176:41: warning: Using plain integer as NULL pointer
> drivers/of/base.c:178:37: warning: Using plain integer as NULL pointer
> drivers/of/base.c:500:49: warning: Using plain integer as NULL pointer
> 
> Signed-off-by: Sachin Kamat <sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

Applied for 3.6.

Rob

> ---
>  drivers/of/base.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/of/base.c b/drivers/of/base.c
> index d9bfd49..2031aa1 100644
> --- a/drivers/of/base.c
> +++ b/drivers/of/base.c
> @@ -173,9 +173,9 @@ struct property *of_find_property(const struct device_node *np,
>  		return NULL;
>  
>  	read_lock(&devtree_lock);
> -	for (pp = np->properties; pp != 0; pp = pp->next) {
> +	for (pp = np->properties; pp; pp = pp->next) {
>  		if (of_prop_cmp(pp->name, name) == 0) {
> -			if (lenp != 0)
> +			if (lenp)
>  				*lenp = pp->length;
>  			break;
>  		}
> @@ -497,7 +497,7 @@ struct device_node *of_find_node_with_property(struct device_node *from,
>  	read_lock(&devtree_lock);
>  	np = from ? from->allnext : allnodes;
>  	for (; np; np = np->allnext) {
> -		for (pp = np->properties; pp != 0; pp = pp->next) {
> +		for (pp = np->properties; pp; pp = pp->next) {
>  			if (of_prop_cmp(pp->name, prop_name) == 0) {
>  				of_node_get(np);
>  				goto out;
> 

           reply	other threads:[~2012-07-05 16:09 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1340770485-22670-1-git-send-email-sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>]

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=4FF5BC36.60608@gmail.com \
    --to=robherring2-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=patches-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.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).