LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
To: wangkailong@jari.cn, benh@kernel.crashing.org,
	christophe.leroy@csgroup.eu, mpe@ellerman.id.au
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] macintosh: Fix warning comparing pointer to 0
Date: Sun, 6 Nov 2022 17:08:31 +0100	[thread overview]
Message-ID: <f4c81b9a-ba70-3dea-e4f6-9ff62a3e27e8@wanadoo.fr> (raw)
In-Reply-To: <c31207c.c3.1844d85a6aa.Coremail.wangkailong@jari.cn>

Le 06/11/2022 à 16:18, wangkailong@jari.cn a écrit :
> Fix the following coccicheck warning:
> 
> drivers/macintosh/macio-adb.c:103:13-14: WARNING comparing pointer to 0.
> 
> Signed-off-by: KaiLong Wang <wangkailong@jari.cn>
> ---
>   drivers/macintosh/macio-adb.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/macintosh/macio-adb.c b/drivers/macintosh/macio-adb.c
> index 9b63bd2551c6..1c1c375a817d 100644
> --- a/drivers/macintosh/macio-adb.c
> +++ b/drivers/macintosh/macio-adb.c
> @@ -100,7 +100,7 @@ int macio_init(void)
>   	unsigned int irq;
>   
>   	adbs = of_find_compatible_node(NULL, "adb", "chrp,adb0");
> -	if (adbs == 0)
> +	if (adbs)

Hi
no, this should be "if (!adbs)"

CJ

>   		return -ENXIO;
>   
>   	if (of_address_to_resource(adbs, 0, &r)) {


  reply	other threads:[~2022-11-06 16:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-06 15:18 [PATCH] macintosh: Fix warning comparing pointer to 0 wangkailong
2022-11-06 16:08 ` Christophe JAILLET [this message]
2022-11-06 17:13   ` Christophe Leroy
  -- strict thread matches above, loose matches on Subject: below --
2022-02-14  1:05 Yang Li

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=f4c81b9a-ba70-3dea-e4f6-9ff62a3e27e8@wanadoo.fr \
    --to=christophe.jaillet@wanadoo.fr \
    --cc=benh@kernel.crashing.org \
    --cc=christophe.leroy@csgroup.eu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=wangkailong@jari.cn \
    /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