Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp381935lqh; Fri, 31 May 2024 04:32:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW0SogVjGMcHQN73yP0TeXVvgfpM557ttQrkTDd3AMPusmBr4vipQY2RiFlX7AnU+BllHtmrXiyhDUy52GNJ4yQraT42BH4JolYUiIs0w== X-Google-Smtp-Source: AGHT+IFVfwjukPG/WhxF6Ut4opJGqoSddsegUhnnWd9+VXE0CMA0tLZFMvWVgFs6ExPVk2Ny4qpr X-Received: by 2002:a9d:7f84:0:b0:6f0:e6e2:83b4 with SMTP id 46e09a7af769-6f911f29d9dmr1807190a34.11.1717155125126; Fri, 31 May 2024 04:32:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717155125; cv=pass; d=google.com; s=arc-20160816; b=Jcfrt0HLDxPOUGax8UfRav1jTWuY4+GLGyA+7VxPZXmjv3GPruGKARfw+qHNaUmVCs e1aHMuCxbNsUo3J0ILo3nSX2SI3IY7OTca2u1f7Oro4u0O0GhZmLyGhFrG5CFHOevtgj 4oir5vfclrRtiJihr3ORYft51mG8FuwOJncAdBZlKcuG4WngOKYBq6JuOJIz96m3qpVf z7SXwTDPyHyDvD7hcng8V2qDfwKoC1wADfPB5g4A6EONCvuS8ogfc3Kyj2Rk2XVkzWqP nxuoN36sQF/eE+7kLJT5avNWQInX7Y8pACJIdA7iEpF5cGYVM7R0IfQl5mCAXv2LAsXO uaZA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:from:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=yZ8XCM+k7pQ3mKy3rOoXian3tQqZWLz/2H/WZVOtlDc=; fh=PN+bAaRPDRNwKV+QhiAxfABIuhWCUQIK8rj1KvNqjbE=; b=sJdBowF/EyseyY7ZKh7qgPIH9+vD8bAiU/QW1ak2jeYtr/Q5FLeeAIIm0lyaVZnXlW ROWTXsV8X6R46Ing1eLCeLGrQCs+/afIaDSBEoaUKvnYPEf7YGXpRnicbRoSR/juyKJi qxqI8DYVgdCgNZy/YID0ypFo/yx9QrIo5uiHIwTg6P4dw89vXBdx8tz+JgZVUX9HawDx F3PcWr8Vyty9DRXz68kLEOzo/IkxWIkvePWKZS6f0lbiBbhQxPnPiIPSANlAxaY97sXY pSvQsoTsPWyfYRK6h1w4shcTB45PKFiBctD6jHcW+7+6gJ3XwLi2BC6XBJX5OLsYkYyc ns2Q==; 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-196736-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196736-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id ada2fe7eead31-48bbcfd23d7si291619137.438.2024.05.31.04.32.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 04:32:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-196736-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::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-196736-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196736-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 8EA3B1C220D1 for ; Fri, 31 May 2024 11:32:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ED62B15749E; Fri, 31 May 2024 11:31:57 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 62335155C87 for ; Fri, 31 May 2024 11:31:55 +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=1717155117; cv=none; b=LYgtjLlccAMJRn1cJvhc/XsEj6ULFPEqkU4xDQDdE+p9rqatmBJSISfTucfrHWCBHKgfkItHyKxnarYK6QXV/z7X1YvN0ntwEcodiXxtPHNSIs6fJWrFTz7zcB/jeUmmL9yqw8MBW+dJ9+YLGP8plnW9sQVPKAGkh+o3ZEpZdJM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717155117; c=relaxed/simple; bh=TmxQYiPP3ecRhKCM8rJ2qnA6Vdk3jTsL+nCFM7q9bVw=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=oc3+HUTNilmASmxFnLcq5EVwyk6WZorrE5vT9aFKhhBY4dGlifeCTf4T/PXRsNYx8R3o73p0Kz0US2A00Ga0hgvDcrtXbOQLTYQW59j6GT8RXU+sUopQ2O3DraInIR+KcSsyXXoDIITDEAJ2mmoOxsX4IA4b59Z1FMu5NLUftS0= 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 F089E1424; Fri, 31 May 2024 04:32:18 -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 2EAE43F792; Fri, 31 May 2024 04:31:52 -0700 (PDT) Message-ID: Date: Fri, 31 May 2024 17:01:49 +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 Subject: Re: [QUESTION] mm: Redundant const parameter? From: Dev Jain To: zhouchengming@bytedance.com Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Anshuman.Khandual@arm.com References: Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit I guess it would be better if I send this as a patch and wait for comments. On 5/31/24 16:42, Dev Jain wrote: > 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 > > > >