From patchwork Mon May 9 13:14:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 12843526 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 45EEAC433EF for ; Mon, 9 May 2022 13:14:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 77E1D6B0075; Mon, 9 May 2022 09:14:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 72EF46B0078; Mon, 9 May 2022 09:14:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 559EB6B007B; Mon, 9 May 2022 09:14:11 -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 3F4106B0075 for ; Mon, 9 May 2022 09:14:11 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay11.hostedemail.com (Postfix) with ESMTP id 16D7980EFB for ; Mon, 9 May 2022 13:14:11 +0000 (UTC) X-FDA: 79446247902.26.AD66F73 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf13.hostedemail.com (Postfix) with ESMTP id 134D420098 for ; Mon, 9 May 2022 13:13:52 +0000 (UTC) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4KxhSS3sMYzhYwJ; Mon, 9 May 2022 21:13:28 +0800 (CST) Received: from huawei.com (10.175.124.27) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 9 May 2022 21:13:58 +0800 From: Miaohe Lin To: CC: , , , , , , , , , , , Subject: [PATCH 00/15] A few cleanup patches for swap Date: Mon, 9 May 2022 21:14:01 +0800 Message-ID: <20220509131416.17553-1-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 134D420098 Authentication-Results: imf13.hostedemail.com; dkim=none; spf=pass (imf13.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com X-Rspam-User: X-Stat-Signature: zb471px7hw998zhgawjhx6as15qwbbqu X-HE-Tag: 1652102032-778997 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: Hi everyone, This series contains a few patches to fix the comment, remove unneeded return value, use some helpers and so on. More details can be found in the respective changelogs. Thanks! Miaohe Lin (15): mm/swap: use helper is_swap_pte() in swap_vma_readahead mm/swap: use helper macro __ATTR_RW mm/swap: fold __swap_info_get() into its sole caller mm/swap: remove unneeded return value of free_swap_slot mm/swap: print bad swap offset entry in get_swap_device mm/swap: remove buggy cache->nr check in refill_swap_slots_cache mm/swap: remove unneeded p != NULL check in __swap_duplicate mm/swap: make page_swapcount and __lru_add_drain_all mm/swap: avoid calling swp_swap_info when try to check SWP_STABLE_WRITES mm/swap: break the loop if matching device is found mm/swap: add helper swap_offset_available() mm/swap: fix the obsolete comment for SWP_TYPE_SHIFT mm/swap: clean up the comment of find_next_to_unuse mm/swap: fix the comment of get_kernel_pages mm/swap: fix comment about swap extent include/linux/swap.h | 11 +---- include/linux/swap_slots.h | 2 +- include/linux/swapops.h | 4 +- mm/memory.c | 2 +- mm/swap.c | 6 +-- mm/swap_slots.c | 6 +-- mm/swap_state.c | 8 +--- mm/swapfile.c | 86 ++++++++++++++++---------------------- 8 files changed, 50 insertions(+), 75 deletions(-)