From patchwork Wed Feb 8 01:12:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 54126 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3187589wrn; Tue, 7 Feb 2023 17:32:41 -0800 (PST) X-Google-Smtp-Source: AK7set/mTHheMzGeZANABKTeHp26beIXSf1VIoiDmftUJV+IN8RFb+PRDyW+PjPHL/OvqUENCXwj X-Received: by 2002:a17:906:581b:b0:88d:ba89:1840 with SMTP id m27-20020a170906581b00b0088dba891840mr1221468ejq.17.1675819961251; Tue, 07 Feb 2023 17:32:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675819961; cv=none; d=google.com; s=arc-20160816; b=Ekw3fp182AA205TXAVsPBkgECOWATmEVN6rOYKChCtaaQiVLUVEccd0eUBLXdbKEs+ wqcZXeapQRycUvAmHdrtwnCP6YPapwpALXuUEIZxorskvAD65GU2444ZrQyPlOlVEliW BKCAmQpo+R7hotG5EXU+TkrFZr7xbpzBMRrrLJ7zMB1abwsYPW2QwsxZdf2+tXyXvxlX U4nap5XYOZFeQzmnKNJ66px/BUHnVeQcfYAgjGC44kLBUq4adol7+t/XclWQ1SQZlhHj f3RRKdbxYFi0qV0odHxvTsxIi7uE1ZxgeRrW7MV3bOv4wUTgAEPvEMZm9fdp3q8oQkDC sMXQ== 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=uheXnI0yAgEctY840sfdfUfuECCg+Babi3ExNpApnek=; b=Qi8uxyagfXVk6mkcG5kRCMymN1lu0B2DXfyBXmOz0CJhVLaXgCig6u9eHRtsZcy/7C 7MbkeAvlIAS8eXsPB4zYWxy3S9Jr4xpxDuOaETGP9vEio4DQ2NGf62vq563qCwNxfbBY 4kl0hit3rRUpf5WGfb6tut6n9zgGP7fF7osWUodfYjIoLNrZ/jt1qDTXCriftST5XXbP 8XDkrv8QwKZLEAasJlAmEUJItP89iTIdbbaxqk/vd8DILHKro7r/+Q6uJCbd7Ki5XDG1 jte6dG6NAHHUud6kjduqWgzCzeCYTLUsd+JoT7KIzjFVIUfNd2VWoelYFzoCXAZjO5Lw TZWw== 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 e6-20020a17090658c600b00883ec4c63f0si26311207ejs.640.2023.02.07.17.32.18; Tue, 07 Feb 2023 17:32:41 -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 S229892AbjBHBMd (ORCPT + 99 others); Tue, 7 Feb 2023 20:12:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229740AbjBHBMc (ORCPT ); Tue, 7 Feb 2023 20:12:32 -0500 Received: from out30-124.freemail.mail.aliyun.com (out30-124.freemail.mail.aliyun.com [115.124.30.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2887C2CC7A; Tue, 7 Feb 2023 17:12:29 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R221e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046056;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0Vb9GWTf_1675818747; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0Vb9GWTf_1675818747) by smtp.aliyun-inc.com; Wed, 08 Feb 2023 09:12:27 +0800 From: Yang Li To: richard.henderson@linaro.org Cc: ink@jurassic.park.msu.ru, mattst88@gmail.com, linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li , Abaci Robot Subject: [PATCH -next] alpha: Fix warning comparing pointer to 0 Date: Wed, 8 Feb 2023 09:12:26 +0800 Message-Id: <20230208011226.81918-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?1757224591750960447?= X-GMAIL-MSGID: =?utf-8?q?1757224591750960447?= ./arch/alpha/kernel/smp.c:271:39-40: 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=3979 Signed-off-by: Yang Li --- arch/alpha/kernel/smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c index 0ede4b044e86..3edf1e572d10 100644 --- a/arch/alpha/kernel/smp.c +++ b/arch/alpha/kernel/smp.c @@ -268,7 +268,7 @@ recv_secondary_console_msg(void) memcpy(cp2, cp1, cnt); cp2[cnt] = '\0'; - while ((cp2 = strchr(cp2, '\r')) != 0) { + while ((cp2 = strchr(cp2, '\r'))) { *cp2 = ' '; if (cp2[1] == '\n') cp2[1] = ' ';