Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp6830343pxv; Fri, 30 Jul 2021 03:31:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdsiv0xH2r7CyWtP3Wi8S6FzP/6M4JoQC8emL+eLxZ1SBvNbbX3kyHhxA59tExFX4V5B73 X-Received: by 2002:a92:d783:: with SMTP id d3mr1320381iln.193.1627641083293; Fri, 30 Jul 2021 03:31:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627641083; cv=none; d=google.com; s=arc-20160816; b=DVM6S1d1IkF/+uXQpMb9QDVSgwZ34TrIs2sxOFz4ZJP7mbYMgFoos7Xv6IsQKTpdLF 1X1U/x51Ihy/6W1QqHfQUpQTKdR8IcupSMNwRoT12FNsW/EVyYgBTPClXKjaDmqiRajr pDqY3ZmuiGDf0AjAOCTpHVwdeLtCW8/roEioNIWeplRQh0gLd4MwVj5exBWv+kWgmygQ nShbIMIIvE0onBVhw8kCULwK/wLR6JZp1oG3C5YSBC7oJaQALrLFDl2p0VSdf9BFaNS7 Ij+7XBK6dRDo/PfuT39oiW6+d4YZ4AhAWU5/mIUh//wLbMyIFunEEp02CVw3zXONb+Pg JpHg== 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=m7Zf/BhI11/dvniPzCq1UFMh8M6il89l7OpRPCORvTs=; b=fxHpzcY0VjxV3Bm4KqPPYEnfIgQhzWW4Qglba38sPg6zcJdYy9V3QLlcKk0BV7EbCW 4L+fL9LoaibOOP1koCVoU2w5jLpiRW/nIG3R64Lk9d5Cx9gW2YYIu3zxMgRf++0qTZmg lBTJ/gP+rrh1J26GiJ6dScYkJBh8bpkxNCW+ucx+6l92XQkOKGyesAediQcfrl/PXRyA f0MRYxprzggPuMVGG89Mlu/byXbe+pOtRPN4Clj2dircgqPb4HTbr5bKdJYxMi+eWl1V WuWEWS7uIHlNpdAMZ2119NFFPet8bcnpJ71hXf1vRMYWQ3y+8o4l/+nSch4z7dVHhoqV +N8A== 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 r17si1371343iol.30.2021.07.30.03.31.11; Fri, 30 Jul 2021 03:31:23 -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 S238461AbhG3Ka0 (ORCPT + 99 others); Fri, 30 Jul 2021 06:30:26 -0400 Received: from out4436.biz.mail.alibaba.com ([47.88.44.36]:34500 "EHLO out4436.biz.mail.alibaba.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238440AbhG3KaZ (ORCPT ); Fri, 30 Jul 2021 06:30:25 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R311e4;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=5;SR=0;TI=SMTPD_---0UhR6K7y_1627641004; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0UhR6K7y_1627641004) by smtp.aliyun-inc.com(127.0.0.1); Fri, 30 Jul 2021 18:30:06 +0800 From: Jiapeng Chong To: chris@zankel.net Cc: jcmvbkbc@gmail.com, linux-xtensa@linux-xtensa.org, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] xtensa: ISS: Fix warning comparing pointer to 0 Date: Fri, 30 Jul 2021 18:29:59 +0800 Message-Id: <1627640999-17706-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/xtensa/platforms/iss/console.c:204:10-11: WARNING comparing pointer to 0. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- arch/xtensa/platforms/iss/console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/xtensa/platforms/iss/console.c b/arch/xtensa/platforms/iss/console.c index 81f9889..92d4624 100644 --- a/arch/xtensa/platforms/iss/console.c +++ b/arch/xtensa/platforms/iss/console.c @@ -201,7 +201,7 @@ static void iss_console_write(struct console *co, const char *s, unsigned count) { int len = strlen(s); - if (s != 0 && *s != 0) + if (s && *s != 0) simc_write(1, s, count < len ? count : len); } -- 1.8.3.1