Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp6893190rdb; Tue, 2 Jan 2024 18:31:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IE4EB/rpcE8gu2/wQoOGAUziT9P1cZwvG/t98K6mIzpIsDxt9Fnb5lrERwkcYD6aZQ/mT/z X-Received: by 2002:a05:600c:314d:b0:40d:6ea3:9bd6 with SMTP id h13-20020a05600c314d00b0040d6ea39bd6mr4376968wmo.178.1704249099550; Tue, 02 Jan 2024 18:31:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704249099; cv=none; d=google.com; s=arc-20160816; b=KkYVVisVitI6YQx5TivGguGvrY5g05Gmb2dj1cqrZ6VBT0Ez0zJQaWN+5JylGJ+HzN P6NgdBaPTvxXFnDuIzqWaUqukUVJdmvceE7yKoMX9omegAV/XS5QDPVqE0yschwC3q4N J05BjZ7pumCIJlsWOCN9rEDcSlqL7CQTtL5viUaSukhdJxrxIr/OO8EtCfY5nKEfHqzA K8WkvV0RorX5tJpYBwWHlE08wpAc7gvdgxKPPeRgkDlOD8VWcBgnpMgdjMOG7B/C6bUd rdTN86RFwQeKf8kaVKrzGnkVz14o+P28YWFB+AagToYNQ6Rt6EeL1RKsSCAb+CE7AKLx lYZQ== 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=4G3gpilyXOAmlMQ5wR4EVx+4PZWExr7LIj8+95GLbdI=; fh=PVTZvle0rcKMDcM85KYWZlzpBmGTOtilQClZ8dUG+Hc=; b=IepGOLjiWZpH9zkRJ97GxHd5jV4wi1s62SWssI4KclBFOTknbp4bDMBy7QLKF2wh5B UXauyVxl+L/wE5EOe3RRtxVdoHvoKcH03Z/p8GQvfPqHysRuXYIUiqW+mEhg+tfRsY29 tCGiEuhh3buSAlWNqpNlOKHRLWolt6aRsOTSOGE2D86Lvx6JFQmTizD0kFDK7S4keDj0 oqAKanKVPnPcefGWZFZqKdZmAohwRQXmmsbpiHBQ37yHCkqFVXq36BTQkHvScYNXXGvA DpoVnr2EKK31H0LrhxOZzxBqELyUXVIempTL4lcADR7XFe04iipUAvANZchljmfzmur8 WERw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4+bounces-637-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-ext4+bounces-637-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id vw17-20020a170907059100b00a2711cf9106si6335895ejb.360.2024.01.02.18.31.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 18:31:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-637-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4+bounces-637-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-ext4+bounces-637-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 2C8A01F21191 for ; Wed, 3 Jan 2024 02:31:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 53D2B1802B; Wed, 3 Jan 2024 02:30:23 +0000 (UTC) X-Original-To: linux-ext4@vger.kernel.org Received: from dggsgout12.his.huawei.com (unknown [45.249.212.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D1F761841; Wed, 3 Jan 2024 02:30:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=huaweicloud.com Received: from mail.maildlp.com (unknown [172.19.163.216]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4T4YbT1s5wz4f3lwZ; Wed, 3 Jan 2024 10:30:13 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.112]) by mail.maildlp.com (Postfix) with ESMTP id 833641A017A; Wed, 3 Jan 2024 10:30:16 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP1 (Coremail) with SMTP id cCh0CgDX2A62xpRlYWmAFQ--.14269S3; Wed, 03 Jan 2024 10:30:16 +0800 (CST) From: Kemeng Shi To: tytso@mit.edu, adilger.kernel@dilger.ca, jack@suse.cz Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/9] ext4: remove unused return value of __mb_check_buddy Date: Wed, 3 Jan 2024 18:28:13 +0800 Message-Id: <20240103102821.448134-2-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20240103102821.448134-1-shikemeng@huaweicloud.com> References: <20240103102821.448134-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:cCh0CgDX2A62xpRlYWmAFQ--.14269S3 X-Coremail-Antispam: 1UD129KBjvJXoW7tF4xGF4Uuw1DWF45Kw4rXwb_yoW8GFWfpF sxua4Uur4vgFnruw47Kw1DWFyIqw1I9ay7GryF9w1UJr13GrsY9F95KFyYvF1rAFWrGF13 Aa15Zry3Cr1xCFDanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 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 Reviewed-by: Jan Kara --- 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