Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5588854pxb; Mon, 14 Feb 2022 02:48:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJz3YcbWBPdgO0g2YlhB9l4oG3V58KzqgATFJHlPyJOog/AbFRQoFgZBgwrbZ3kR7oBa7A+R X-Received: by 2002:a63:f5b:: with SMTP id 27mr9927622pgp.11.1644835726565; Mon, 14 Feb 2022 02:48:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644835726; cv=none; d=google.com; s=arc-20160816; b=cZ3+gfjEKz5TCatBKQ/PMzZiEO+kXymJv3o2ljjKdE+ifRH1kUCI1f75YKtLoex0fH DZIiadLUQeWdbZPRG8pL//wcv5WaA2gbtNB0zIDUXDSrFDj3XUrhZR6oExwxI8GbI4GA ea8fmC532bcWg1uBn3X7yc7VVziErlxYkm5YvFox3JbPoQ99j9w8II6LcttBviXFzwQz bfTm7Od1gdMX9D487+LNyzB0eAmQIjIIKwmGlw/qJbcRXdGJ/a0IdOt4KnjkGY3T5VIL Ppehy6ZfXZ6FaoEmcZcpMDCCilrcWzpZXb7//8TDaS3hCg+OXRZTMckFKB13S+/67DsQ DIfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=+iSCTas7QamxnAv31THHw0//q7pbmGtVxcyaqEMVbOs=; b=p0HklZuHUQaHcE6XMO4B3r8PIv7DB6H8cbuMz2A63NhGiHZPDZUZNjqdhKs52lLdAt W5eYKjurSVmN+3b/Gf/sDNjF/0x/EoPB6969thSRUDOu5XdYWSzOwkmb5G20uzJ+Ztcl ddFkTfYG2JjMDFzw9FQ75rSrRi3MMsT9GQ/lR1lEwY8JqXFdUJyndJHVeq4930srdc+c XDssnu5emVenHzh4GO87Kl1CLbFg0Q3tP5I10xftuFxcVwLDPFCuGwuZgmO22vrjM/dk J3nAHZDwCigUDPHIwTnyCC0/12R35xeNk0gpYl0LB/tJZcJJ4BdVOEM2qF+QFItwdZrR wY+A== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x14si5275988pgx.131.2022.02.14.02.48.32; Mon, 14 Feb 2022 02:48:46 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238951AbiBNBGM (ORCPT + 99 others); Sun, 13 Feb 2022 20:06:12 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:32886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232401AbiBNBGJ (ORCPT ); Sun, 13 Feb 2022 20:06:09 -0500 Received: from out30-130.freemail.mail.aliyun.com (out30-130.freemail.mail.aliyun.com [115.124.30.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AEAFE527CE for ; Sun, 13 Feb 2022 17:06:02 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R541e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04394;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0V4JW9p0_1644800759; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0V4JW9p0_1644800759) by smtp.aliyun-inc.com(127.0.0.1); Mon, 14 Feb 2022 09:06:00 +0800 From: Yang Li To: benh@kernel.crashing.org Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Yang Li , Abaci Robot Subject: [PATCH] macintosh: Fix warning comparing pointer to 0 Date: Mon, 14 Feb 2022 09:05:58 +0800 Message-Id: <20220214010558.130201-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL 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 Fix the following coccicheck warnings: ./drivers/macintosh/via-cuda.c:240:16-17: WARNING comparing pointer to 0 ./drivers/macintosh/via-cuda.c:243:16-17: WARNING comparing pointer to 0, suggest !E ./drivers/macintosh/via-cuda.c:521:23-24: WARNING comparing pointer to 0 Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/macintosh/via-cuda.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/macintosh/via-cuda.c b/drivers/macintosh/via-cuda.c index 3d0d0b9d471d..a9feb7d5a068 100644 --- a/drivers/macintosh/via-cuda.c +++ b/drivers/macintosh/via-cuda.c @@ -237,10 +237,10 @@ int __init find_via_cuda(void) const u32 *reg; int err; - if (vias != 0) + if (vias) return 1; vias = of_find_node_by_name(NULL, "via-cuda"); - if (vias == 0) + if (!vias) return 0; reg = of_get_property(vias, "reg", NULL); @@ -518,7 +518,7 @@ cuda_write(struct adb_request *req) req->reply_len = 0; spin_lock_irqsave(&cuda_lock, flags); - if (current_req != 0) { + if (current_req) { last_req->next = req; last_req = req; } else { -- 2.20.1.7.g153144c