From patchwork Thu Oct 20 02:20:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 13012547 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17659C433FE for ; Thu, 20 Oct 2022 02:20:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3F0676B0071; Wed, 19 Oct 2022 22:20:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3A0FC6B0073; Wed, 19 Oct 2022 22:20:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2B6066B0074; Wed, 19 Oct 2022 22:20:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 1EE136B0071 for ; Wed, 19 Oct 2022 22:20:13 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id E27D41201F2 for ; Thu, 20 Oct 2022 02:20:12 +0000 (UTC) X-FDA: 80039723064.09.4D1C7FD Received: from out30-57.freemail.mail.aliyun.com (out30-57.freemail.mail.aliyun.com [115.124.30.57]) by imf15.hostedemail.com (Postfix) with ESMTP id 55EBFA0032 for ; Thu, 20 Oct 2022 02:20:10 +0000 (UTC) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R861e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046050;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0VScpi-d_1666232406; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VScpi-d_1666232406) by smtp.aliyun-inc.com; Thu, 20 Oct 2022 10:20:07 +0800 From: Yang Li To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Yang Li , Abaci Robot Subject: [PATCH -next] mm: vmalloc: Simplify bool conversion Date: Thu, 20 Oct 2022 10:20:04 +0800 Message-Id: <20221020022004.88863-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1666232412; a=rsa-sha256; cv=none; b=3Eqxq2sLZ2lPbYqMW049DOaSSwqs2jrxkEW0Y1JIRDXwWL5h9PCt2XgntgAgs4zvqi+DN/ rX8RhnLyoX9j9iq1lFtNPiKP8SnbpbM+e9kcntfAzxbKEpsrccJ49+KClaP61sgzJpxoXE TMJ8n87XXinrhaHBccqslLD1Xb3q2Q8= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=none; spf=pass (imf15.hostedemail.com: domain of yang.lee@linux.alibaba.com designates 115.124.30.57 as permitted sender) smtp.mailfrom=yang.lee@linux.alibaba.com; dmarc=pass (policy=none) header.from=alibaba.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666232412; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references; bh=mCIGeAXAuw+v4yNxCw3sOcY2R6yKKIaMUUgq2hf+bTo=; b=aU5sXK8BI90otM3+jp0aNrH/P1PH43RmJKLRap9ZcXGdwB7vBx4moyLQjQv28Yt7W5sseI mjktpOh9iYfOS+b3cFiy7e4NOjWQYCm0tYQBqkRMCrC5z+MnmrEdDYukMUn5/dcQ5nwUOo dhXZ9TEUFOzNRDiVhOv2FMkbOtxbfe0= X-Stat-Signature: k7qzndiz7ehbjuqgge81zy1thytp7nj5 X-Rspamd-Queue-Id: 55EBFA0032 X-Rspam-User: X-Rspamd-Server: rspam03 Authentication-Results: imf15.hostedemail.com; dkim=none; spf=pass (imf15.hostedemail.com: domain of yang.lee@linux.alibaba.com designates 115.124.30.57 as permitted sender) smtp.mailfrom=yang.lee@linux.alibaba.com; dmarc=pass (policy=none) header.from=alibaba.com X-HE-Tag: 1666232410-821060 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: ./mm/vmalloc.c:1789:36-41: WARNING: conversion to bool not needed here Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2454 Reported-by: Abaci Robot Signed-off-by: Yang Li --- mm/vmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 1e641d315d11..ca71de7c9d77 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -1786,7 +1786,7 @@ static bool __purge_vmap_area_lazy(unsigned long start, unsigned long end) out: trace_purge_vmap_area_lazy(start, end, num_purged_areas); - return num_purged_areas > 0 ? true:false; + return num_purged_areas > 0; } /*