From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C81D6C433FE for ; Fri, 21 Oct 2022 01:02:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229944AbiJUBCb (ORCPT ); Thu, 20 Oct 2022 21:02:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229911AbiJUBCa (ORCPT ); Thu, 20 Oct 2022 21:02:30 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A347F228CF5 for ; Thu, 20 Oct 2022 18:02:29 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E8E90B82A0A for ; Fri, 21 Oct 2022 01:02:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8A4DEC433D6; Fri, 21 Oct 2022 01:02:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1666314146; bh=CoYjp5fJM90jHnotT+Zy54A6pMLJcCYErlTlQsBRKAs=; h=Date:To:From:Subject:From; b=PEu4RJ4Jc+5n0QlFEzFyQf6+T//O4JfQC53zqF/zNgP8UluhJqwr3Kb00LK8Ne/Zx xW+vuspvfhE3DarSgSWTzcZEAtc+mzSHw1+rFrsYQyJUL5YaV2KellZdqzZOWjWrPo 4sTTVW9RtjiByCy1S9PbLt0A+TmKVG/pdZjviuGQ= Date: Thu, 20 Oct 2022 18:02:25 -0700 To: mm-commits@vger.kernel.org, willy@infradead.org, oleksiy.avramchenko@sony.com, npiggin@gmail.com, hch@infradead.org, urezki@gmail.com, akpm@linux-foundation.org From: Andrew Morton Subject: + mm-vmalloc-simplify-return-boolean-expression.patch added to mm-unstable branch Message-Id: <20221021010226.8A4DEC433D6@smtp.kernel.org> Precedence: bulk Reply-To: linux-kernel@vger.kernel.org List-ID: X-Mailing-List: mm-commits@vger.kernel.org The patch titled Subject: mm: vmalloc: simplify return boolean expression has been added to the -mm mm-unstable branch. Its filename is mm-vmalloc-simplify-return-boolean-expression.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-vmalloc-simplify-return-boolean-expression.patch This patch will later appear in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: "Uladzislau Rezki (Sony)" Subject: mm: vmalloc: simplify return boolean expression Date: Thu, 20 Oct 2022 14:52:47 +0200 A return expression of the __purge_vmap_area_lazy() function can be simplified. Basically a boolean expression anyway is converted to boolean values either to true or false. Link: https://lkml.kernel.org/r/20221020125247.5053-1-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Suggested-by: Christoph Hellwig Cc: Matthew Wilcox (Oracle) Cc: Nicholas Piggin Cc: Oleksiy Avramchenko Signed-off-by: Andrew Morton --- mm/vmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/mm/vmalloc.c~mm-vmalloc-simplify-return-boolean-expression +++ a/mm/vmalloc.c @@ -1786,7 +1786,7 @@ static bool __purge_vmap_area_lazy(unsig out: trace_purge_vmap_area_lazy(start, end, num_purged_areas); - return num_purged_areas > 0 ? true:false; + return num_purged_areas > 0; } /* _ Patches currently in -mm which might be from urezki@gmail.com are mm-vmalloc-add-alloc_vmap_area-trace-event.patch mm-vmalloc-add-purge_vmap_area_lazy-trace-event.patch mm-vmalloc-add-free_vmap_area_noflush-trace-event.patch mm-vmalloc-use-trace_alloc_vmap_area-event.patch mm-vmalloc-use-trace_purge_vmap_area_lazy-event.patch mm-vmalloc-use-trace_free_vmap_area_noflush-event.patch vmalloc-add-reviewers-for-vmalloc-code.patch mm-vmalloc-simplify-return-boolean-expression.patch