From patchwork Wed Feb 8 01:11:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 54124 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3182722wrn; Tue, 7 Feb 2023 17:19:50 -0800 (PST) X-Google-Smtp-Source: AK7set/nVvDf4+ITII5LfySfmkW1ee2Dq7Mwziq7HbGlLqHrD9t0wgMmsFyHh/QvnRiO4vm0lisn X-Received: by 2002:a17:906:b24e:b0:8aa:bfa1:c829 with SMTP id ce14-20020a170906b24e00b008aabfa1c829mr1948436ejb.9.1675819190772; Tue, 07 Feb 2023 17:19:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675819190; cv=none; d=google.com; s=arc-20160816; b=uEI5UjP0dwtquzWEORfRP3kuhDDIVZGeGEhYlyoo5bkfSO4Z7B/MiVWOpaq0n55UnL DjLxlFzMBq2S6h8zD2cleNW3gE8SXQpRdlq85hwVoySMvBDf7Gm0OmHrLRoIm1pJXt8v jqYpHBrdwsoYfhp9E0wytVsSudfxfaI+rWcPjjblNimwF5C3TzzCz838+OLhVl0pBSW2 FHI1YZomPzF8aFLk6VohB95lj/y8R9+/ot96G8+QGQqiWigsfbUR3NMkBSK6celzejT2 A81ZpBl6i+OLTSjkUnYc1Nc4wNrXz4lqGjbQ0avdLIpYFba1wQwsHkQFYRS5jch4+l3a YNVw== 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=2sDshmICAMkBxMptA6tD1FI7j8RE07dQrxYzo9cbZ/o=; b=K8drzrG05KXk9RdpvNuk1KXpm+SdkRg3Du4+4fmqWaaKwRQ+pzxy6tFqhsDgVrPZnX 63GHFo7XDh3c0f9pgJKJJ+35ue4c8RnJMOKq9oplXq8EHIJ9pzvRQSVzcK7PzQA192HP 2gF7sP4EYpnjW+6z+wtCJpM97ozY5ZgyO3X2YHd4RbQFszpbrXxJPmX7gwOA35TiWxug 9mU6y3V36Ss4g2TgoX006yGEtC7K8h0LF11GIMPNHsQ2DjUma05EL2r0Wzt1NMiMpDxe tBokqmyePT6EKECFqVmKamWG30mWYf9/ooTorKikoCmbDlUCYM5e9xar4Nr0WjlZB9fS X2FQ== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cm2-20020a170907938200b008947eea3500si11285707ejc.756.2023.02.07.17.19.27; Tue, 07 Feb 2023 17:19:50 -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 S229843AbjBHBLR (ORCPT + 99 others); Tue, 7 Feb 2023 20:11:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229792AbjBHBLQ (ORCPT ); Tue, 7 Feb 2023 20:11:16 -0500 Received: from out30-110.freemail.mail.aliyun.com (out30-110.freemail.mail.aliyun.com [115.124.30.110]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17D883F2AD; Tue, 7 Feb 2023 17:11:08 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R551e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046049;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0Vb9EcSU_1675818666; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0Vb9EcSU_1675818666) by smtp.aliyun-inc.com; Wed, 08 Feb 2023 09:11:06 +0800 From: Yang Li To: bcain@quicinc.com Cc: linux-hexagon@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li , Abaci Robot Subject: [PATCH -next] hexagon: Fix warning comparing pointer to 0 Date: Wed, 8 Feb 2023 09:11:05 +0800 Message-Id: <20230208011105.80219-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,SPF_HELO_NONE,SPF_PASS,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757223783664882754?= X-GMAIL-MSGID: =?utf-8?q?1757223783664882754?= ./arch/hexagon/kernel/traps.c:138:6-7: WARNING comparing pointer to 0 Avoid pointer type value compared with 0 to make code clear. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3978 Signed-off-by: Yang Li Acked-by: Brian Cain --- arch/hexagon/kernel/traps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/hexagon/kernel/traps.c b/arch/hexagon/kernel/traps.c index 6447763ce5a9..fdbbf78b4ce0 100644 --- a/arch/hexagon/kernel/traps.c +++ b/arch/hexagon/kernel/traps.c @@ -135,7 +135,7 @@ static void do_show_stack(struct task_struct *task, unsigned long *fp, } /* Attempt to continue past exception. */ - if (0 == newfp) { + if (!newfp) { struct pt_regs *regs = (struct pt_regs *) (((void *)fp) + 8);