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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50C5CC83002 for ; Thu, 30 Apr 2020 06:14:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3BBD42186A for ; Thu, 30 Apr 2020 06:14:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726628AbgD3GOY (ORCPT ); Thu, 30 Apr 2020 02:14:24 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:50026 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726404AbgD3GOX (ORCPT ); Thu, 30 Apr 2020 02:14:23 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id A86498FB80CA7A31E1E1; Thu, 30 Apr 2020 14:14:21 +0800 (CST) Received: from DESKTOP-C3MD9UG.china.huawei.com (10.166.215.55) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.487.0; Thu, 30 Apr 2020 14:14:13 +0800 From: Zhen Lei To: Tim Chen , Andrew Morton , linux-mm , linux-kernel CC: Zhen Lei Subject: [PATCH 0/3] clean up some functions in mm/swap_slots.c Date: Thu, 30 Apr 2020 14:11:40 +0800 Message-ID: <20200430061143.450-1-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.166.215.55] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When I studied the code of mm/swap_slots.c, I found some places can be improved. Zhen Lei (3): mm/swap: simplify alloc_swap_slot_cache() mm/swap: simplify enable_swap_slots_cache() mm/swap: remove redundant check for swap_slot_cache_initialized mm/swap_slots.c | 45 +++++++++++++++++++++------------------------ 1 file changed, 21 insertions(+), 24 deletions(-) -- 2.26.0.106.g9fadedd