Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1525003pxb; Thu, 4 Mar 2021 13:43:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJxzphKEkUqwiA7hdNOMswHaelOxZFyYaC84qXtCLv5AbKYZS+tWZ5mKqCCk7oaSb0sPyVMb X-Received: by 2002:a50:c00b:: with SMTP id r11mr6650478edb.35.1614894228826; Thu, 04 Mar 2021 13:43:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614894228; cv=none; d=google.com; s=arc-20160816; b=wyNCT9j9zlr8FDLGAJmfM+CvlJ0xkypKCUrUMVZYRyu7B6i6gJlDP1rxF0ibGTs0sl HdsZ1zG+jUPa8KUKD93vcZPMI1demy/8Q2gAa/lxg5uw3xYjMXFUD1JaG5DqmTpT8dnQ fwS6wRCpdsaaY3EIEz8M2LqEkvCUzu92nV86FF8+mY8OlCax5fO1J3UBdQ9fnmCVYgLU +Unjc7aLX+0XR5ETCHbBf6QvSJg7aLeOOx7t4yJAePNLzUHl6dBLrCaaK/x2CZ9IV2ic kfnQm5UtYNuks5pnRBtz5mxMb+WGxmoYipM0nKPM0T6B+bh5mm7YomL7e7FmSF81wmwQ xjCw== 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=mNl+dV9W/y1sCRBlJPa8RQKRmDL0PIwG9w9DaxkukgI=; b=d8ppKSnIMRxVI6wDYyl0rxVwQnyz60gUQQAs6FMLral3wZP+WWU1LD5TrygGoN/gDL g9T2UlODNHHfrPtAIupbUsqFjvBB7bQFuQc58+DnGaKd7RZp8W0U4d0RTJBy7DkWksCI 3rKpB0urx/X/ZZwUp1QSfbVODOt1jXtfqypEhUuHFEm0+pXp0MQNYFujIBvGhbdy6e80 9w/b6I2bOKKUNmZFGW0GKhDtN8KV+YRcQBZVEIG6gs0wQ++9tTIKsXcQ4+UHv97cXI8d O8QXPILcDaHS0ynLSmAeBALiUddfioNjIfTugPS1zLnFPvj7fekidnJTkDHH+R8fhs8m bc1w== 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 hq7si240773ejc.300.2021.03.04.13.43.25; Thu, 04 Mar 2021 13:43:48 -0800 (PST) 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 S232583AbhCCNc3 (ORCPT + 99 others); Wed, 3 Mar 2021 08:32:29 -0500 Received: from out30-133.freemail.mail.aliyun.com ([115.124.30.133]:36092 "EHLO out30-133.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240974AbhCCKSx (ORCPT ); Wed, 3 Mar 2021 05:18:53 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R721e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04394;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0UQDd3dc_1614765742; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0UQDd3dc_1614765742) by smtp.aliyun-inc.com(127.0.0.1); Wed, 03 Mar 2021 18:02:28 +0800 From: Jiapeng Chong To: tsbogend@alpha.franken.de Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] Uprobe: Assign boolean values to a bool variable Date: Wed, 3 Mar 2021 18:02:21 +0800 Message-Id: <1614765741-35207-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 warnings: ./arch/mips/kernel/uprobes.c:78:10-11: WARNING: return of 0/1 in function 'is_trap_insn' with return type bool. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- arch/mips/kernel/uprobes.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/mips/kernel/uprobes.c b/arch/mips/kernel/uprobes.c index 6dbe4ea..e66c032 100644 --- a/arch/mips/kernel/uprobes.c +++ b/arch/mips/kernel/uprobes.c @@ -75,7 +75,7 @@ bool is_trap_insn(uprobe_opcode_t *insn) case tlt_op: case tltu_op: case tne_op: - return 1; + return true; } break; @@ -87,12 +87,12 @@ bool is_trap_insn(uprobe_opcode_t *insn) case tlti_op: case tltiu_op: case tnei_op: - return 1; + return true; } break; } - return 0; + return false; } #define UPROBE_TRAP_NR ULONG_MAX -- 1.8.3.1