Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp6522554rdb; Tue, 2 Jan 2024 05:02:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IFYuRelqcmTCvZ4olsxkH2hI9wINp0q9SSj9zIiepPRnShv2KfTZhfFDFfGlEE/T6YL305c X-Received: by 2002:a17:906:248c:b0:a27:991c:6c7b with SMTP id e12-20020a170906248c00b00a27991c6c7bmr2609875ejb.72.1704200571988; Tue, 02 Jan 2024 05:02:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704200571; cv=none; d=google.com; s=arc-20160816; b=bhntYt/mGOI+1LHtKAtGYfCZMrlIV+q3pDnQvLIe5R6G+4rhLTK3Oxlyn2fpNmnJcb UCbnrSbgJfLZJ5t+FzlHcoC0LcZ7sxLSqzJ40sxzxeBFph9gXilmLvtZhdxsLETN7yi3 gzUgLpgcGSgcfposyPEYmobzQI1kuXCLtFt+jzAEAaTo7BZZdpbDVucQFlNY5zNTO/gu REk21FnqHqyxc7l+QNzx0xa/CmFTs94lkg91Y0ywscX8pyB8cVYgE431Yi4WMqCPu6Tv 2BGclmVn4mZqVNY9NOGHYHLeHtEHZ+gGwHZLtuvDGe2iMwanVPn+5PNBczVVJ/f9k7g5 ZKHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-signature:dkim-signature :dkim-signature; bh=aS8vDxAY34LDQvIiF79KkpXKjKeYevZsWTMmJdrrseA=; fh=XvwuWoX214LrU84o0bRNxbP9fQGtZLmTJCo8aYfWs9o=; b=Hepq0rmgLc3oDyHu442c9cBgH99YemxG9x98j/GsSCn6mUrApwcDCKWFyn3x7vscFX yYsGX7cfp5F1TpOdHgNoHlwAhTr/uzfqcuxEazPEa3rfLjtK1MXaUyifOlROhoh2cOUg 9+dyy+HkDhCGAAZ85W5Ackd9WAiY4vDpgcX8wOqpvdSfnLV/Ho24rYtsmd6DKyjU89aj 0flPx+7NvFXXRe/9s2E4mDk6llXPqcO3eUStvmfy4lUb2MARw8qU880xjmrisNJd51az gPt4KORvnIy4suNK9f7A4lQAqDhiNjWU3YN7cIfw2r6alfKQ8J66/+Moly5Zwl5/EHLf v6yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=eRkWXwV6; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=eRkWXwV6; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; spf=pass (google.com: domain of linux-ext4+bounces-622-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-ext4+bounces-622-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id fp17-20020a1709069e1100b00a23490602a1si10326025ejc.84.2024.01.02.05.02.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 05:02:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-622-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=eRkWXwV6; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=eRkWXwV6; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; spf=pass (google.com: domain of linux-ext4+bounces-622-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-ext4+bounces-622-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 9196B1F224FD for ; Tue, 2 Jan 2024 13:02:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AC51CFBEC; Tue, 2 Jan 2024 13:02:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="eRkWXwV6"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="XAsNmO5m"; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="eRkWXwV6"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="XAsNmO5m" X-Original-To: linux-ext4@vger.kernel.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AF04EFBE2; Tue, 2 Jan 2024 13:02:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.cz Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id A4FB221D40; Tue, 2 Jan 2024 13:02:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1704200560; 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=aS8vDxAY34LDQvIiF79KkpXKjKeYevZsWTMmJdrrseA=; b=eRkWXwV62lMhED5n/iHCCBf7Il+S3datzThu1CCjmHLGoaWYnM331VodBvBcScEHXRCM0a sMVDwcjq9lqBUieBKJlkiMhyTs07QGAHMBjJ5mzDpISHqthWjPNmMoqHyHwJA5b8+adNJi wMbbx6zm56sJLop6XllS6J6t39xvcr0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1704200560; 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=aS8vDxAY34LDQvIiF79KkpXKjKeYevZsWTMmJdrrseA=; b=XAsNmO5mhoL8j+98fua1vmopzCwyvTwk2hwqUz4yDc81D8r8YGiVIXqGZnKMwpS30cTYDc zLqZcOIEz/uHSpBg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1704200560; 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=aS8vDxAY34LDQvIiF79KkpXKjKeYevZsWTMmJdrrseA=; b=eRkWXwV62lMhED5n/iHCCBf7Il+S3datzThu1CCjmHLGoaWYnM331VodBvBcScEHXRCM0a sMVDwcjq9lqBUieBKJlkiMhyTs07QGAHMBjJ5mzDpISHqthWjPNmMoqHyHwJA5b8+adNJi wMbbx6zm56sJLop6XllS6J6t39xvcr0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1704200560; 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=aS8vDxAY34LDQvIiF79KkpXKjKeYevZsWTMmJdrrseA=; b=XAsNmO5mhoL8j+98fua1vmopzCwyvTwk2hwqUz4yDc81D8r8YGiVIXqGZnKMwpS30cTYDc zLqZcOIEz/uHSpBg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 999FE1340C; Tue, 2 Jan 2024 13:02:40 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id PbZ9JXAJlGUeSQAAD6G6ig (envelope-from ); Tue, 02 Jan 2024 13:02:40 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 57308A07EF; Tue, 2 Jan 2024 14:02:40 +0100 (CET) Date: Tue, 2 Jan 2024 14:02:40 +0100 From: Jan Kara To: Kemeng Shi Cc: tytso@mit.edu, adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/8] ext4: remove unneeded return value of ext4_mb_release_context Message-ID: <20240102130240.to4hnuuheo72nbt3@quack3> References: <20231125161143.3945726-1-shikemeng@huaweicloud.com> <20231125161143.3945726-4-shikemeng@huaweicloud.com> Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231125161143.3945726-4-shikemeng@huaweicloud.com> X-Spam-Level: Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: X-Spam-Score: -0.84 X-Spamd-Result: default: False [-0.84 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.cz:email,huaweicloud.com:email,suse.com:email]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_NOT_FQDN(0.50)[]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.04)[58.43%] X-Spam-Flag: NO On Sun 26-11-23 00:11:38, Kemeng Shi wrote: > Function ext4_mb_release_context always return 0 and the return value is > never used. Just remove unneeded return value of ext4_mb_release_context. > > Signed-off-by: Kemeng Shi Looks good. Feel free to add: Reviewed-by: Jan Kara Honza > --- > fs/ext4/mballoc.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c > index 765b62729..f79e87ad3 100644 > --- a/fs/ext4/mballoc.c > +++ b/fs/ext4/mballoc.c > @@ -5939,7 +5939,7 @@ static void ext4_mb_add_n_trim(struct ext4_allocation_context *ac) > /* > * release all resource we used in allocation > */ > -static int ext4_mb_release_context(struct ext4_allocation_context *ac) > +static void ext4_mb_release_context(struct ext4_allocation_context *ac) > { > struct ext4_sb_info *sbi = EXT4_SB(ac->ac_sb); > struct ext4_prealloc_space *pa = ac->ac_pa; > @@ -5976,7 +5976,6 @@ static int ext4_mb_release_context(struct ext4_allocation_context *ac) > if (ac->ac_flags & EXT4_MB_HINT_GROUP_ALLOC) > mutex_unlock(&ac->ac_lg->lg_mutex); > ext4_mb_collect_stats(ac); > - return 0; > } > > static int ext4_mb_discard_preallocations(struct super_block *sb, int needed) > -- > 2.30.0 > > -- Jan Kara SUSE Labs, CR