Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp458748rwb; Sun, 6 Nov 2022 08:26:13 -0800 (PST) X-Google-Smtp-Source: AA0mqf6MUzNmrf86TYQ7LebvQU1WBafkTbXeCbTO8u79mB4jmPgE0PrX+blOWYCqdWL6pIuCQXD3 X-Received: by 2002:a17:902:ce07:b0:188:7cd7:1ff0 with SMTP id k7-20020a170902ce0700b001887cd71ff0mr2890562plg.174.1667751973273; Sun, 06 Nov 2022 08:26:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667751973; cv=none; d=google.com; s=arc-20160816; b=ZFmxodwX5n/7afXD2AU0PgxVnSi5llZPF9vS/4oHInZDQMs2LPyPvGxuigcfIdoaHj zfiaKWdbnE56uTKO/xewCQFCT5qtDZ+XBHv5yk9Xh4mPQJpFBrIqxgsUttgIiCS8pHsO 8eOUYroEI5obdxzk1LY4mzZJL0mZKcUg0mWHF7AOye+vJRMnTKQCu/IcWXwnOnHkoyh5 FYeXn48VTn5KpsNtGPQ/JVFN6Oi6Hss9noXO6hndzXHKq+TWBcCVLnFGGp3YM6qZnCPQ mpweJi3/I5qxzaY+FzieTJzjhUBPd4/252MJRMq3+GURP9erPtJQshjM27Kh8iYUK8rE m1pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=+eQOtFJcnJADIfbP6IsfJodrJGb1vrS6zObrgg1fIFU=; b=MP/k2Bea/YjZV3MF1u/HWYxkVndz5rkL8jvhdoNCY4IhpqXP3xcg79NDwTht8ht0fq nnL94wyh/mEuTnBhIMasaGtvBKnqgrspvpIavKu9AdUf5m26PR2F6mLY7SbORHacnBGI UlQY5UCA2cfx2GnhXZvGpsZjcVBw6+LsYgyQ/DPV7icVTbyu+Sh5joCWNAVaK9ENwIkX s96SU0mUHj+kO8nquE9H8VE/+DBF9l6snnO9aI5RsFEJeUtwlN4M4UO7YFweG4FJgJcI przYx3RygDuXSZQ7YCRA75QnYAZ+FQccoz4Tg+p02D33YvZrG34NHt2Ua4AKri8eSCEy IuFQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l72-20020a63914b000000b0046eb96c4f90si6803385pge.549.2022.11.06.08.26.01; Sun, 06 Nov 2022 08:26:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230058AbiKFQIu (ORCPT + 96 others); Sun, 6 Nov 2022 11:08:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229841AbiKFQIo (ORCPT ); Sun, 6 Nov 2022 11:08:44 -0500 Received: from smtp.smtpout.orange.fr (smtp-14.smtpout.orange.fr [80.12.242.14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 079462DFF for ; Sun, 6 Nov 2022 08:08:42 -0800 (PST) Received: from [192.168.1.18] ([86.243.100.34]) by smtp.orange.fr with ESMTPA id riCForZc23VQxriCFoI6AX; Sun, 06 Nov 2022 17:08:41 +0100 X-ME-Helo: [192.168.1.18] X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 06 Nov 2022 17:08:41 +0100 X-ME-IP: 86.243.100.34 Message-ID: Date: Sun, 6 Nov 2022 17:08:31 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH] macintosh: Fix warning comparing pointer to 0 Content-Language: 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 References: From: Christophe JAILLET In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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)) {