Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp373070lqh; Fri, 31 May 2024 04:13:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWncd9FSeibMWrrILKVhAcidVJ3x5VtXVee5yaESMVnL2G01uC0OdkTol4HbI4NRZpoy2/zh4KjRv5K0UyMrMpk3Qg9OjKGsrz9MOHcpw== X-Google-Smtp-Source: AGHT+IFkO7qC46AuWKQEtukv9ihO2AoxDtIWtE+bkiR8pimOZoFxwy0AdmdDCcOZvT5bpdjy5Ljj X-Received: by 2002:a17:90a:dc15:b0:2c1:9e98:70bb with SMTP id 98e67ed59e1d1-2c1dc56c1e8mr1402381a91.10.1717153995401; Fri, 31 May 2024 04:13:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717153995; cv=pass; d=google.com; s=arc-20160816; b=Zov7oypiAoO4mZTAW2smBf7wsrWa2MNxqW/LwJ90fPWc0HXVbjdiC4Ka505BEy/5Wb oj77Wa7FiNd5PKxy0yhabGHangVufn0UzZ8Gx5CyZztUyiC3/8UvpdtOjCtIpS80Y0x8 Ld+24dte3wUkTrIUXpR5thDyfE0yS9aiZjSX1oF38BIsbc3Oy8ERVJRHj35cLhJ4I6O8 nuTG5E0gWzbnPTxJjQu33zB4MNODVJzn812vc4jedZfe5muqMhBBpxTvbfT+ldBBTqvy GpKjtWjiKyvccvI1PtzLmHdaYoyesAQ1rmgKw4B9x5ef2s6lYT70+8W5bBhncnPbFWhy ifXA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:subject:from:to:content-language :user-agent:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:date:message-id; bh=niYS4rPJFRqqTwC0nadX0lfDrOuT6mSvakXhIiWxgpM=; fh=PN+bAaRPDRNwKV+QhiAxfABIuhWCUQIK8rj1KvNqjbE=; b=gaafVXgVnjILNnjRP+CckXjJ1IxtVbAOJRHlGNOnnixR9KhrhX1WhOxcJx7S+Nq+HU 5GK3ma4SAxvAgO/7yVaZnqi8RMVM8qmW4GBvviCBwz9sAl/UDhRH0n9cPiJVhhucgYS2 19yBDi8lheDJaWsoGQ4mrebP+HHxaZzDUCtTeWWvTeWJYvUAzHVvKMlYJXHQaGsYEpwX e/+f5zk2w7ifWrZZLkiVBcR2n550LbmAsDD88FGAZhKhKPXfhNbsp/70uqRvXdQpyOmT 7Jw5fdPm+vBfLeaj3DYTwP39PkxdOu3ub3BMraU+gWQY35rsTfqBStzdpOjkhz+O58JK S64A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-196716-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196716-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c1abe1d4eesi2994409a91.147.2024.05.31.04.13.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 04:13:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-196716-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-196716-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196716-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 09B2A2827FC for ; Fri, 31 May 2024 11:13:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AAFC3156F5E; Fri, 31 May 2024 11:13:09 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 964A3153BC1 for ; Fri, 31 May 2024 11:13:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717153989; cv=none; b=rx5S+Asqy5fKVi45b8i0030M75GcCvk9Ge29j+qirEdTHVcxv9a4D+NsYctk0im/ub/+04uA2AtD5E4Tz1sc9xoxrSD0rDIlSlGYpRquQbRVsmCUkvHAgkkqVwl1gKnN/j7f4z6LbDfgIDbuos8FgOehhLZ+aVkNjBPHQOJ+Xmc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717153989; c=relaxed/simple; bh=oc6lrDMKbWiYtQFQjAfAoGtAl4pVkqeda6FlEYXC2zk=; h=Message-ID:Date:MIME-Version:To:From:Subject:Cc:Content-Type; b=INHTlx8/Z4ZTNYvecjfGg/y6dUpaQbb2ksHuqO4NXp3SmiZ6cXHNMQAJLxyyFfc+edKEjCeWW7JJRyvpCOvoGyH6x619VwUmadmzmDuNO+9m1SAIWnzb3CWNttxkEjgBP+XeNnSS8Xwpf0g9fj2Z36c08hv7hvIM9IQjAYXPz2Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2451A1424; Fri, 31 May 2024 04:13:31 -0700 (PDT) Received: from [10.162.41.15] (e116581.arm.com [10.162.41.15]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6D5513F792; Fri, 31 May 2024 04:13:05 -0700 (PDT) Message-ID: Date: Fri, 31 May 2024 16:42:59 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: zhouchengming@bytedance.com From: Dev Jain Subject: [QUESTION] mm: Redundant const parameter? Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Anshuman.Khandual@arm.com Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Chengming, In mm/slub.c, you had defined slab_test_node_partial() to take a const parameter. Is there any point of taking in a const, when you are anyways typecasting it to a (struct folio *) from (const struct folio *) ? In fact, at the place where you call slab_test_node_partial(), the struct slab *slab is not const. Please comment. Thanks DJ