Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4981796iob; Mon, 9 May 2022 06:15:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyf+e7JMBrNLJhDMJQuA0sar5HrxfenMNWgeV8CMRp/cz04sd95fFvDcXgoxcYxIb6wSN2X X-Received: by 2002:a63:2a53:0:b0:3c1:5f80:a14c with SMTP id q80-20020a632a53000000b003c15f80a14cmr13329804pgq.279.1652102139250; Mon, 09 May 2022 06:15:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652102139; cv=none; d=google.com; s=arc-20160816; b=zemFFaQhFpnZqCIAWIe1A3pTKRSeyUNA6rR6GbYXzlSEyJ2RLGTZdglSe3C77+hwZh x43xUZKyFoM4/a5ty7/4HTcUYSDpD3DS49VUsNKpMKDNVsrQg3vXRmamwHJvMOygdUMA hraH++FlAUE5gIge/++gpHo2PpdVOWoRxdd+KbAe7BFrEotLE4gXHTN6PaujzUB52kar 4baIyisyDtL1cw/kN0Bj52+Dq7SpZ1qiO7YFFB3TgkGXyUoAhyGtsKEuCz1DtEyc4JJa v0CcUSZRE/4/q8o3kxCP1H28sbzK2h3m79P8KP3zlGBj8VIhIPJKDywtAj0LDEyegfhQ 1cAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=otiYgnPIGtThIkJdVIeXmQHqZp7pdI/8Pd78eUfhD1A=; b=PAm/zCzXDy7M7+p/tUhFm0i//zw7oJxolzOdCt0LQt0OHvr7HpXH1w+hkNLaixVnhl vgFjcD3D/WxcKZi8cq8bDi72HsgEwlVGrgInfIfQT98Ak9lSaPZVopIeg99zIfvq9Gsa hFPfCOTdsYVF71Yfb2vHytUWJsYiByDw3TwBLYE49EUCMLdjkoqbtSfrFKrk60XT1z9C kZAd7zOgPCfNl1b3PnUZaXLXioC2gbGJJcEKqmCaOp8vSvADhQ3zc9Kjk3U/ybBe7/5O XA3aQclCTxFpSL8yTHn3aBontpys30m50ZgvYywxBJKGAoquuuVmleVzr8FZEN//4bDP 4m8w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id w12-20020a17090a528c00b001dcd759770fsi9988133pjh.124.2022.05.09.06.15.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 06:15:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 162FC2A9CC6; Mon, 9 May 2022 06:14:47 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235445AbiEINSP (ORCPT + 99 others); Mon, 9 May 2022 09:18:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235310AbiEINSD (ORCPT ); Mon, 9 May 2022 09:18:03 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35F402A8058 for ; Mon, 9 May 2022 06:14:08 -0700 (PDT) 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 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII 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-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.23.0