Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp457310pxj; Fri, 14 May 2021 07:33:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIaSCSoQdOykbDpFXaNgJBk4T6N0MxZgJ32G8DNZiV5e1iLjfjatNVCrpk1RSJsLm9MUde X-Received: by 2002:aa7:cc98:: with SMTP id p24mr31915635edt.353.1621002816658; Fri, 14 May 2021 07:33:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621002816; cv=none; d=google.com; s=arc-20160816; b=mRRhW47jG6OwamLwf9d4ZorqiFJVm8uGe3STZdzrtZvaGeXpAGzNKrrW3/sw6N098f h17mhRqRPb0KgV2PVZmoXaeDgMBdnAJndbmlVV4zHzXbvObEwRD9MK/mlyzDk3wyGcJq KTNzXjssb0q/yNQxApa8UpAE/uNGq74jYzSZ2Ekeac5nfHYGnEJ4/o2hDY0km6BM2GGR B6JtlCy7WjNSCWofOmUs5EB4B0QvQsvEPbQ46verBcL6ocq4ZoItcuvm0c4xSK4WlxHw WYHj42cN2M8tk4a+/cE+bdIJ7Ha6/QxAPX7gmxUg23MAg272WYAZ/1nuE5TKYgZgOsYN 7wpg== 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=dyetZ70WUYXG8AUbjvgxuuzk85f1wGVrQtU7GWs+PXs=; b=oMXAVO1B3C2kT6FRI6YLsbwmjb/hk9o9enor7PT6CCDYOxSPyPjsJVTaXILKiKA7kL kS0KIuXuHf1ngRWMfm8fqEItqphU31RS+/nxrMeKFD47uFphM3dTKAPveD5vNEm1+tIL 3v35Mi6L6d1pD55sYq8YSIHEc6YAi7z7nbdrJdePcTn6XpJx5/PhrO9azHczfa0MGj9R l5AManjyt1yes92IzxQPeyzWpPuncEfG+kcM3l+rMDMqLYnAPIpmfVXm3k5I0bj1PY1x VSw2S3k04Pl+EbNVNxQ7YSAx41QSJBc+q3oVOwZGBxMv2Qfk5Qiv9SM5SyXofWCqTtep 3Ivw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bl1si6439311ejb.408.2021.05.14.07.33.12; Fri, 14 May 2021 07:33:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232759AbhENHAG (ORCPT + 99 others); Fri, 14 May 2021 03:00:06 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:2597 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231424AbhENHAF (ORCPT ); Fri, 14 May 2021 03:00:05 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4FhK7J14pszkWMp; Fri, 14 May 2021 14:56:12 +0800 (CST) Received: from ubuntu1804.huawei.com (10.67.174.98) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.498.0; Fri, 14 May 2021 14:58:44 +0800 From: Pu Lehui To: CC: , , Subject: [PATCH -next] mm/huge_memory.c: remove unused variable 'count' Date: Fri, 14 May 2021 14:59:12 +0800 Message-ID: <20210514065912.71734-1-pulehui@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.174.98] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org mm/huge_memory.c:2663:6: warning: variable ‘count’ set but not used [-Wunused-but-set-variable] 2663 | int count, mapcount, extra_pins, ret; | ^~~~~ This variable is not used in function , this commit remove it to fix the warning. Signed-off-by: Pu Lehui --- mm/huge_memory.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 52ca04b905cf..a23a127302e9 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -2660,7 +2660,7 @@ int split_huge_page_to_list(struct page *page, struct list_head *list) struct deferred_split *ds_queue = get_deferred_split_queue(head); struct anon_vma *anon_vma = NULL; struct address_space *mapping = NULL; - int count, mapcount, extra_pins, ret; + int mapcount, extra_pins, ret; pgoff_t end; VM_BUG_ON_PAGE(is_huge_zero_page(head), head); @@ -2737,7 +2737,6 @@ int split_huge_page_to_list(struct page *page, struct list_head *list) /* Prevent deferred_split_scan() touching ->_refcount */ spin_lock(&ds_queue->split_queue_lock); - count = page_count(head); mapcount = total_mapcount(head); if (!mapcount && page_ref_freeze(head, 1 + extra_pins)) { if (!list_empty(page_deferred_list(head))) { -- 2.17.1