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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A9A9C433EF for ; Wed, 18 May 2022 09:00:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9CBD96B0074; Wed, 18 May 2022 05:00:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 97C1E6B0075; Wed, 18 May 2022 05:00:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 86A4D6B0082; Wed, 18 May 2022 05:00:30 -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 783C66B0074 for ; Wed, 18 May 2022 05:00:30 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 32C47205BD for ; Wed, 18 May 2022 09:00:30 +0000 (UTC) X-FDA: 79478267820.22.F9189D3 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf04.hostedemail.com (Postfix) with ESMTP id 4B0E8400D7 for ; Wed, 18 May 2022 09:00:16 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 4136921B7C; Wed, 18 May 2022 09:00:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1652864428; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ROjIWI9IMrZ8GeFbYrq9/y96A9g9rkDvBdm2WTR+OOU=; b=poNFYf9G+ZADBTc+dwd//E37a3nhptONMAI/Fxe2Twqw5CG/XWMltAahM7xseLBRGQSXNj ko8bnHGrgnsWgBRshGTm5ZQtTVRaBm0j3oCjKoKkZJWYPcf5uaEXMfnFMgATJUHojghrV8 1CYvFGVhlWZGbytYfd/7Lsgq+ga5Qqs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1652864428; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ROjIWI9IMrZ8GeFbYrq9/y96A9g9rkDvBdm2WTR+OOU=; b=US1f7K56O6TRjZ35FA75/7ugKgY6lRU+flq0lT8H4jcY0vAudDoeoGQBH4zOifYymik9O5 W+Xr8rngvrzdOxAQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 7881A13A6D; Wed, 18 May 2022 09:00:27 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 5rJHGqu1hGJCfAAAMHmgww (envelope-from ); Wed, 18 May 2022 09:00:27 +0000 Date: Wed, 18 May 2022 11:00:25 +0200 From: Oscar Salvador To: Miaohe Lin Cc: akpm@linux-foundation.org, willy@infradead.org, vbabka@suse.cz, dhowells@redhat.com, neilb@suse.de, apopple@nvidia.com, david@redhat.com, surenb@google.com, peterx@redhat.com, naoya.horiguchi@nec.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 04/15] mm/swap: remove unneeded return value of free_swap_slot Message-ID: References: <20220509131416.17553-1-linmiaohe@huawei.com> <20220509131416.17553-5-linmiaohe@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220509131416.17553-5-linmiaohe@huawei.com> X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 4B0E8400D7 Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=poNFYf9G; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=US1f7K56; spf=pass (imf04.hostedemail.com: domain of osalvador@suse.de designates 195.135.220.28 as permitted sender) smtp.mailfrom=osalvador@suse.de; dmarc=pass (policy=none) header.from=suse.de X-Rspam-User: X-Stat-Signature: ikmia7w536df3hbgq6yomeb7twt3fiyg X-HE-Tag: 1652864416-745125 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: On Mon, May 09, 2022 at 09:14:05PM +0800, Miaohe Lin wrote: > The return value of free_swap_slot is always 0 and also ignored now. > Remove it to clean up the code. > > Signed-off-by: Miaohe Lin Reviewed-by: Oscar Salvador > --- > include/linux/swap_slots.h | 2 +- > mm/swap_slots.c | 4 +--- > 2 files changed, 2 insertions(+), 4 deletions(-) > > diff --git a/include/linux/swap_slots.h b/include/linux/swap_slots.h > index 347f1a304190..15adfb8c813a 100644 > --- a/include/linux/swap_slots.h > +++ b/include/linux/swap_slots.h > @@ -24,7 +24,7 @@ struct swap_slots_cache { > void disable_swap_slots_cache_lock(void); > void reenable_swap_slots_cache_unlock(void); > void enable_swap_slots_cache(void); > -int free_swap_slot(swp_entry_t entry); > +void free_swap_slot(swp_entry_t entry); > > extern bool swap_slot_cache_enabled; > > diff --git a/mm/swap_slots.c b/mm/swap_slots.c > index 0218ec1cd24c..2f877e6f87d7 100644 > --- a/mm/swap_slots.c > +++ b/mm/swap_slots.c > @@ -269,7 +269,7 @@ static int refill_swap_slots_cache(struct swap_slots_cache *cache) > return cache->nr; > } > > -int free_swap_slot(swp_entry_t entry) > +void free_swap_slot(swp_entry_t entry) > { > struct swap_slots_cache *cache; > > @@ -297,8 +297,6 @@ int free_swap_slot(swp_entry_t entry) > direct_free: > swapcache_free_entries(&entry, 1); > } > - > - return 0; > } > > swp_entry_t folio_alloc_swap(struct folio *folio) > -- > 2.23.0 > > -- Oscar Salvador SUSE Labs