Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp1722616rdh; Sat, 25 Nov 2023 00:13:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IGZYmeWxjuA+OCrmfByR5DBngEfaP+PsyWLccNrUIgQMykn2fkAZMcnLeJ8xlU3kMz1oykT X-Received: by 2002:a05:6e02:160d:b0:35c:3c2a:9943 with SMTP id t13-20020a056e02160d00b0035c3c2a9943mr7846921ilu.7.1700900014046; Sat, 25 Nov 2023 00:13:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700900014; cv=none; d=google.com; s=arc-20160816; b=bm2cWiCC77LGXLCsqp+/02wkW5+Vr4vX3IIBUhqG/SouqXZz35f2BDvXVUJuEo53RO 5y9rqpMwXRb0EgaiXDlbOTZQkeCIX4e4XreL1vKBYt/IWkrgHuz6v1qtZXMjeHA3LpUG E48zzQCAyFujjFjSxdAGA9lxNV7j05e/f8DZ/vE8ofxJWi+zPI4NYn6MSu/Pw86TwBaM JdpioLIFIXC/80sguXtGWKVVQBS2lBRz+F1Ocj/2NoANHxJ1+oHXvvKHrlgdloh9Woza KazxL0nSxFRPEhQDCsQ54a8JTlwX4bEfW6wsibpYJ+4zx/4KWhF6EvBMt9cnkvAFwMFD RDAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=0FWIauzL66+bvfD+x293D2HS1J7DfoEKuJW9qg2EQvs=; fh=eu2llfKjKKC0QBUtW6YWJ13du6subP7SB8ZN6DjSWMA=; b=QUFupaPYKw9px4c/ic2QKadQTbE6/raRAt7jm+NPYHnyVo+rGXZCK/x2Wk/S2SOd1y 2vqFVX4EaizTYMOsOZnTg2CWO2ITFEMig1BlmPZOfEWGC7I6kGDkg7oXyvwTX68FmMP4 R7Xwk4nYd+EkqXUWRcNmlUZefNRyBhI0IG+18KMwM6naW25cHnHMyK7k1c7zDQAoEPRs xNVU8+FZcPjhyG7wM9q3nSSjPOXprGmNRen1fE2dpoHRbYW2H9NDQk3u1vRnH+JoIfQa 97FhV3khMQk0GeUA9DbMdp1TtT6K2eTCCyXv0SiLjVXfcJQhfYTdzXMp6682LeyVDLth zVUw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4+bounces-153-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-153-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id n6-20020a634d46000000b005b8f61fcba5si5039518pgl.399.2023.11.25.00.13.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Nov 2023 00:13:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-153-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4+bounces-153-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-153-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 0C3FCB2147C for ; Sat, 25 Nov 2023 08:13:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 777DAB67F; Sat, 25 Nov 2023 08:13:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=none X-Original-To: linux-ext4@vger.kernel.org Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 776D410F6; Sat, 25 Nov 2023 00:12:55 -0800 (PST) Received: from mail.maildlp.com (unknown [172.19.163.235]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4Scl2n56lzz4f3kKv; Sat, 25 Nov 2023 16:12:49 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.75]) by mail.maildlp.com (Postfix) with ESMTP id 7AD891A0C3E; Sat, 25 Nov 2023 16:12:52 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP2 (Coremail) with SMTP id Syh0CgCnSkmCrGFlWcLEBw--.36822S3; Sat, 25 Nov 2023 16:12:52 +0800 (CST) From: Kemeng Shi To: tytso@mit.edu, adilger.kernel@dilger.ca Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/8] ext4: remove unused return value of __mb_check_buddy Date: Sun, 26 Nov 2023 00:11:36 +0800 Message-Id: <20231125161143.3945726-2-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20231125161143.3945726-1-shikemeng@huaweicloud.com> References: <20231125161143.3945726-1-shikemeng@huaweicloud.com> Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID:Syh0CgCnSkmCrGFlWcLEBw--.36822S3 X-Coremail-Antispam: 1UD129KBjvJXoW7tF4xGF4Uuw1DWF45Kw4rXwb_yoW8GF17pF sxua4Uur4vgr17WwsrKw1DWFyIqw1I9FW7CryF9w1UJ3W3GrsY9F95KFyYvF1rAFWrG3W3 AF45Zry3Cr1xGFJanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUB0b4IE77IF4wAFF20E14v26r4j6ryUM7CY07I20VC2zVCF04k2 6cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M280x2IEY4vEnII2IxkI6r1a6r45M2 8IrcIa0xkI8VA2jI8067AKxVWUGwA2048vs2IY020Ec7CjxVAFwI0_Jrv_JF4l8cAvFVAK 0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWDJVCq3wA2z4 x0Y4vE2Ix0cI8IcVCY1x0267AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l 84ACjcxK6I8E87Iv6xkF7I0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I 8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AK xVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41l42xK82IYc2Ij64 vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8G jcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r126r1DMIIYrxkI7VAKI48JMIIF0xvE2I x0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK 8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I 0E14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjxUIksgUUUUU X-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ Remove unused return value of __mb_check_buddy. Signed-off-by: Kemeng Shi --- fs/ext4/mballoc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 454d56126..9f9b8dd06 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -677,7 +677,7 @@ do { \ } \ } while (0) -static int __mb_check_buddy(struct ext4_buddy *e4b, char *file, +static void __mb_check_buddy(struct ext4_buddy *e4b, char *file, const char *function, int line) { struct super_block *sb = e4b->bd_sb; @@ -696,7 +696,7 @@ static int __mb_check_buddy(struct ext4_buddy *e4b, char *file, void *buddy2; if (e4b->bd_info->bb_check_counter++ % 10) - return 0; + return; while (order > 1) { buddy = mb_find_buddy(e4b, order, &max); @@ -758,7 +758,7 @@ static int __mb_check_buddy(struct ext4_buddy *e4b, char *file, grp = ext4_get_group_info(sb, e4b->bd_group); if (!grp) - return NULL; + return; list_for_each(cur, &grp->bb_prealloc_list) { ext4_group_t groupnr; struct ext4_prealloc_space *pa; @@ -768,7 +768,6 @@ static int __mb_check_buddy(struct ext4_buddy *e4b, char *file, for (i = 0; i < pa->pa_len; i++) MB_CHECK_ASSERT(mb_test_bit(k + i, buddy)); } - return 0; } #undef MB_CHECK_ASSERT #define mb_check_buddy(e4b) __mb_check_buddy(e4b, \ -- 2.30.0