Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp932403iob; Wed, 18 May 2022 16:54:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3LWv0fWgz9wSCNHWDXMmz8YXPsEViSwy7uGIpeT5SsILWtDYKtZCx13PS8hQxrwNnYX1D X-Received: by 2002:a17:902:8504:b0:15d:2c7c:ceac with SMTP id bj4-20020a170902850400b0015d2c7cceacmr2181973plb.130.1652918064870; Wed, 18 May 2022 16:54:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652918064; cv=none; d=google.com; s=arc-20160816; b=wEOdKu4GqHVZyZOSLKfDewHhZGq1PyVrdSwbjLHN6tlP5Y2C00Ln2cIznmdvk7ENzH fphoWDPjeh9za8R8vq6SkmyYqidt9cf3GgC8KmIdnNmvOY49mKuHazaCA8rprlTA67Vy sku2deod7eWJ3dkeNczVsVBsgl1qgvmYu+pD3yWF9dODTXKo2P6HxD95v9t+w/0jlUKF mjfpB8fLtdbiwgbOVxI4VnMXmRKN9XVd4rfMyCDjCB0m7h6NzCvmRmqKDiAgX1ut98D6 dT43m/aMSJ83vjJplS8MN6p+U8z+1t7kphjL/MO0Hj7PKrUFi8E1/ulRkULGihlOvOx7 Zf5Q== 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=a546aM+KkBfk5AtTwKPYltVMK0u5CfWVvjNmbgy93nI=; b=JW3dm6JF7aHPiHX9OiYKJXoISglM9cRDseXdL9ESiJK4zXLKguNh//X1WZEkV+DYjG oVeux/l2lBpIliQ7UdHD7CCkVgqU/VRjxS1CUxXHfC/OirCx/4EDpLNZdyKxDK6S5EAT Wac8kaJzztVr3ydmVw30Gbl6BFNCy3dMVXDcBld0YDj+qIYBUwdqDRkhjM+pjgyfu6be P63Xop14dKd6903WlBF1PnKbT9a5Sr6B95NtSs0zA3wIMJB+7ocerUsjdvcaZ3CPQN6T BbXYwQRzxigHEUJYYxhAmdGnFGi2Xp6vnNfgPKL7n+VhMl2/+IKKHlW5zxABjQbkEN6a vsyQ== 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 2-20020a631542000000b003aa8b889a5bsi4089873pgv.513.2022.05.18.16.54.12; Wed, 18 May 2022 16:54:24 -0700 (PDT) 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 S230394AbiERXKB (ORCPT + 99 others); Wed, 18 May 2022 19:10:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229590AbiERXKA (ORCPT ); Wed, 18 May 2022 19:10:00 -0400 Received: from out30-54.freemail.mail.aliyun.com (out30-54.freemail.mail.aliyun.com [115.124.30.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64B401CE632 for ; Wed, 18 May 2022 16:09:58 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R801e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04357;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0VDhLBK1_1652915395; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VDhLBK1_1652915395) by smtp.aliyun-inc.com(127.0.0.1); Thu, 19 May 2022 07:09:55 +0800 From: Yang Li To: chris@zankel.net Cc: jcmvbkbc@gmail.com, linux-xtensa@linux-xtensa.org, linux-kernel@vger.kernel.org, Yang Li , Abaci Robot Subject: [PATCH -next] xtensa: Return true/false (not 1/0) from bool function Date: Thu, 19 May 2022 07:09:53 +0800 Message-Id: <20220518230953.112266-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 Return boolean values ("true" or "false") instead of 1 or 0 from bool function. This fixes the following warnings from coccicheck: ./arch/xtensa/kernel/traps.c:304:10-11: WARNING: return of 0/1 in function 'check_div0' with return type bool Reported-by: Abaci Robot Signed-off-by: Yang Li --- arch/xtensa/kernel/traps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/xtensa/kernel/traps.c b/arch/xtensa/kernel/traps.c index f97d43a8d13d..0c25e035ff10 100644 --- a/arch/xtensa/kernel/traps.c +++ b/arch/xtensa/kernel/traps.c @@ -301,7 +301,7 @@ static bool check_div0(struct pt_regs *regs) if (user_mode(regs)) { if (copy_from_user(buf, (void __user *)regs->pc + 2, 5)) - return 0; + return false; p = buf; } else { p = (const u8 *)regs->pc + 2; -- 2.20.1.7.g153144c