Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp409411lqh; Fri, 31 May 2024 05:24:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWBms11HSlut4xDYvVe3bmVAqPOZwaLG90T/Fn3eSIBviKWU6PsmawGjpuNSo91Ff20Rh9h62P8SlplviKUdPxJJHpe2apHKkSD/BE2yQ== X-Google-Smtp-Source: AGHT+IElFF5fF84LbTKnjnBMBFGn04xCciNmHk7Aos4FSqb8S5gL4Oe/+SfTEcI+zHiDb+kwEedN X-Received: by 2002:a05:620a:5aca:b0:792:a9ea:37f8 with SMTP id af79cd13be357-794f5c794cbmr129910185a.29.1717158293405; Fri, 31 May 2024 05:24:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717158293; cv=pass; d=google.com; s=arc-20160816; b=ay7HgHJwRIqRoferZ2fogxPO8S+dA3mzx/OjpqkDaE43/YYYCkBtQB4QdzjgEdDisA d9X5qIzTxurDm3OBMQjC90q8sG6lpBvWFGOtxWLZ6OImF75BqlOWY1t7eMXibSGn1uui bH8ocZ6AlcTSAHgtsmRRZ3ExGNSCXF5/hU9xpLejqWDeP66JL+Cicvdb5gSMMhqpGR/1 B6VpV0cUaiZKJnvi5zaVAnvhnymALBU8obj52AZ9deuNBmn2qKTSWJgur7GgRdfl9y44 cTxwEt9B5WXtrrQFXZmATkEqpTupe1zO1/Tzkok47ZiFWVOPZQ2z4iIo2hC1tA9iApI9 aEzg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=M04hKxRLNqWDIvcjUObzazjO47drTmOvQIFEMKh9mZU=; fh=f9ScJ/vI5mFNFMuBu9Q+qHSAf+6G24Ww/n6I0ERpP1k=; b=B6F4Y2qgJVdl+NWOhTiiG5XVtZM0RbvJET5ZivYrTWZZ76XAnbdSi5TAW/hlnSd38i klOHf+5Ve+SKKbCVMgON2Sz6NhdYqo6mpZJ+zhwWWyo6+Cn+W9DDL9hFoDaojPPIMnyJ L7nvcuqqMfh1NIWldjq6jcnaTLsw7CxZ0hu5hj0JL1jGtjmabPq44u9tYd/A/hCR6aHp H2Fk2Z2HEywez3vjYNjkeAusASYO9uI9c28e4L9sl23+ckYsctMY5yZg1lnxEVpAyRWT N6nCYlXy6zEJ0J8pTDEfOEtBz0d5NVFCNDgzOIVt6XE01oTsuq9k823FidE+LI1VRCD3 8oAQ==; 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-196768-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196768-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. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-794f2f055a4si185819485a.12.2024.05.31.05.24.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 05:24:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-196768-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; 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-196768-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196768-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 1D16D1C23F3F for ; Fri, 31 May 2024 12:24:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DA24F1586C6; Fri, 31 May 2024 12:24:46 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6FDF015821A for ; Fri, 31 May 2024 12:24:44 +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=1717158286; cv=none; b=SRyux+U2snM+ZIvlc6bFvhIhgxzqYIJd30pP37BItIy20mLM9jvdc9GuESdIR/I4SgiZQCwqLA8uy9S097mDKCke2bEpBmOVQaPVycQ+PUwpIK0UAGOyoY2pE/bycI/lWi5MH+FkqTYXr22mxkAW6yhh4Lw1YklrMtQnHeqQ57g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717158286; c=relaxed/simple; bh=gycZeptDOO8BSOy2lJr6Kdr4HIqhN8k26v9SLWIIhJs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=mfTfKsKwRr6APxy6pPUYH/0sGRotSTgoLZzXe7jABhAcgUOFhZpCOcgfQZt79Z1w3ftAJ7JbO2zO1DGo8FVGMfEXKMSV13MywoDoEqABGCG9QCXyEFwhTm+O89/rcQkk/B3R+qNzduGLfcCoFeFSh5NmeGFaJI3TO1oWOiHPN3U= 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 8E9561424; Fri, 31 May 2024 05:25:07 -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 759503F792; Fri, 31 May 2024 05:24:41 -0700 (PDT) Message-ID: Date: Fri, 31 May 2024 17:54:38 +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? To: Matthew Wilcox Cc: zhouchengming@bytedance.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Anshuman.Khandual@arm.com References: Content-Language: en-US From: Dev Jain In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit I was just about to hit git send-email for a patch-series of 2, I noticed your reply :) On 5/31/24 17:47, Matthew Wilcox wrote: > On Fri, May 31, 2024 at 04:42:59PM +0530, 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. > I have a patch to fix this; hang on a second ...