Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3082051pxf; Mon, 15 Mar 2021 00:22:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLVBHDARqGVqMSsgslbiLzAbFsqzfTtIhluEC5334fe+rW5fk+nWlfUTLM6jLflTAtIprz X-Received: by 2002:a17:906:1706:: with SMTP id c6mr735764eje.223.1615792975759; Mon, 15 Mar 2021 00:22:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615792975; cv=none; d=google.com; s=arc-20160816; b=lfwCgM5IDKfGoUdTmAsGrGsDJsiYSbii/9H5Gc3c46xDu7xONpWw2dqbLR/xLh4yKu Gb1z/uN68R7wtUc+/qdKMkaLRFjJKFQJmK87YlGF08Vwn0Ep9soKsq8UNO7G5hJkaN0f knJ75G7bX/Fp+nGwplHomw7Fxlq3Q/nGcINb5Oq/tnXziHZOqwV+KSKP7mpRFFs5qQBq bYB9OqpuNj9DsAOgsbi8aFt2QKOs/H8+sQpmRqgA6+P2qGHyJxYQQfaDV9VLeAUcgAmX 6STGpRk1lKzh/yt+1JgDvXZAjLfWXoYx9Yc05DaBQW1PdOgcoztvfqAkIWpn8Edx9Ejf xR5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=3y91v9+BskYDpGsKBurWzpqgyQmxnpF4fbNeuYbr3Co=; b=owZG91B48iqnyyczlaaco1rwPUfLECCMb2StWtKAUnOPA2eZZJY6plIeG3KXGPY07n Pop4qFQLnoG7A8hqaIiH0ecZbcbFHJpvWuEdZdKjF1eKYE90j9GQgclm8aUCVulAP5md p2aFUBdMTRfHB5xGCHPmE8P5lQIig6WqX06LHqEtea63bkhSLCX6Aqtkzz7SepXVklN3 Fee1l8V6nvK7WHxxGaPJ8c6YsUvFTJ8eq595VkB2yXbX3dv1Ie2F6wrZZCGZfFDFEq5+ whWclCwv9mVWaqivFUjJjxgnCcvrkLVWrlav9UrAl+B7ygLoUk1X6oM3o6Suz9kMcyuj Hyvw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ly21si10739983ejb.128.2021.03.15.00.22.33; Mon, 15 Mar 2021 00:22:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S229939AbhCOHVh (ORCPT + 99 others); Mon, 15 Mar 2021 03:21:37 -0400 Received: from out4436.biz.mail.alibaba.com ([47.88.44.36]:63278 "EHLO out4436.biz.mail.alibaba.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229679AbhCOHVZ (ORCPT ); Mon, 15 Mar 2021 03:21:25 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R381e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01424;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0URx1q6._1615792861; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0URx1q6._1615792861) by smtp.aliyun-inc.com(127.0.0.1); Mon, 15 Mar 2021 15:21:13 +0800 From: Jiapeng Chong To: davem@davemloft.net Cc: sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] sparc: fix warning comparing pointer to 0 Date: Mon, 15 Mar 2021 15:20:58 +0800 Message-Id: <1615792858-79126-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following coccicheck warning: ./arch/sparc/prom/tree_64.c:335:15-16: WARNING comparing pointer to 0. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- arch/sparc/prom/tree_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sparc/prom/tree_64.c b/arch/sparc/prom/tree_64.c index 989e799..85b5101 100644 --- a/arch/sparc/prom/tree_64.c +++ b/arch/sparc/prom/tree_64.c @@ -332,7 +332,7 @@ int prom_node_has_property(phandle node, const char *prop) if (size == 0) return 0; - if ((pname == 0) || (value == 0)) + if (!pname || !value) return 0; #ifdef CONFIG_SUN_LDOMS -- 1.8.3.1