Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp633590lqh; Fri, 31 May 2024 11:22:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVGD78OOZBw9FnOKbZZEMiKkHqmXnj/JiHpN+u7BmhCjXYDtTTzTth+s1eUQ5Tx/bOIiZf68o+ywDXpuN5j3CZmfSf+KMMaiUraGnfqUg== X-Google-Smtp-Source: AGHT+IEsD4sYWVAWoSggWrZ2qY0qep04vXl9yhpE0Q9SXK+avV2CW69Pu9N2HGltuYIOHRW+JEoO X-Received: by 2002:aca:c43:0:b0:3c9:92f3:d519 with SMTP id 5614622812f47-3d1e347852emr2568557b6e.4.1717179771731; Fri, 31 May 2024 11:22:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717179771; cv=pass; d=google.com; s=arc-20160816; b=eWYQotJ2FJ97uCOWRP2uIr4iA7+/YXfwD1OgTmC9Kq7uNWIGg5KCSOirYTk+jrOW5d pUzYrTllWcRd61fv45Mz79R5plssygV9LduIMB1QvC1o9Pc5qY7dQyslA1UAxH8G326x DjNe0S1TAz/u71HlbWiSCmpt77MmlesdmQ/W2vLCeXKpqw3CQPyiEKfEEJojnLENDMyr rk09LYpz0SqkXz5UUaP/eOC3cu0ie6x6qka/coByXiLpsuJIFz1MWzzmc4r8ycXQr3xH D/lQf0t+I3pTZqunAHbK9PTdD28x6ARXQHZLAtFmzXpV1NhMoS5VOPWP/DqkK8eaqP9h uzMg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=yYmj5HbRFBhg7n9dSx3Ho7FPIQnwrH0bnrFIQlD3oxE=; fh=h3Fb/T0RxJT6uX0BlHW/MDrAeGIth0XvZUGSxNff7tY=; b=foU83FU6wqOGIgaeggKaVSF/fYCIYYP6Rk8TN0zeQgmvodx7Rz3K3Enlh25Cx5v1sF 1rPYpIZ7PEqeSbvLi+XtUJM1kTBpSPlgcupFZgxZk/mxXWy1qxN/g95H0z0buo8GtcMn Whzs6wM29reUO0i5CwDnkhDtI5pTPGMIczSifONxrcfbBgkqmSsMg7DCqoHSkaQV9SRz tMfa8Y8ovnXVuKwmUASHVwG/hq7DyTtsDnpREHC5BIPQOIPyZ/Ttam1/7vls5LHAK0fF G6UJySmgDRFdL/21RJ+M+ltnW3rpafbqXN8cema2WsR6NP+Z7h+QxblqDVIPeyv/AUWI tDlw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=bWKdxHhm; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-196875-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196875-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6ae4b41c776si25708036d6.428.2024.05.31.11.22.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 11:22:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-196875-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; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=bWKdxHhm; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-196875-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196875-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 3FD051C265DB for ; Fri, 31 May 2024 13:21:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5963976026; Fri, 31 May 2024 13:21:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="bWKdxHhm" Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 99621158D83 for ; Fri, 31 May 2024 13:20:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717161660; cv=none; b=qAmn2cpkrnGe7w8dedVA0pOB65wv6Wrjg4VpFDTB/McLF5yCDJGy8BLmvAFap6kSx4zwSZ9GAPc/R/OToL6AWAeU5eZZRwd6JjuuqIdH5DzNnIY+0b24VLwXo21y+EuhxZNJ7n4b5d0xV8E8Qe2cL+8hGJ1pmKmpyxvfY2Spsfo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717161660; c=relaxed/simple; bh=/HCDdY/T3FCguskc7Pcc3gAtu4nYNC8KBbJGSImBoE8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=erxvIMqD+vqrYcfpBVVq4kgRI12kPcNmmfTRTl2Q5YzLIKREYPgQkEO+FFJInO9AIRy8DwkJubmZgXx8wi8L+S4RCDzR1HNIcH08wUoS/m6HqrJyO2jnVV+CXFavuNc2OeASvUJpS37e2lTXj9dC1yBU90h7m7H6M4+yMIaUS4M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=bWKdxHhm; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=yYmj5HbRFBhg7n9dSx3Ho7FPIQnwrH0bnrFIQlD3oxE=; b=bWKdxHhm+/Mf+8Jyp1+myRGOMf ZgcrTjv3f1p6zIdY1kk1cDvEeMbeaau9x4OY10j02wbQeZkFZZuzQv27WYkdnZdKzTuPnWIfT8Syt NfRxEIetC/mMFPm/gtKve1taQwz/5ySaFHTFHzoJdme7Ua4BHISz0qbozWNv6EjEiluA89EqeKS+2 iPYdM3pyYqPb+Ebg5lX6hDM7WRKeczBTUtKcJmvkO7Rj49RRpjTqaItSmENP8fHKp+rODiiz4h75J 525vJxK3NNMsmkK7tbM3r4brIanOgos15J24GMUC8WpNakH8p4dz5WjFRtwpIDMFoGCK7NBqHIApc w4CI/V2w==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1sD2Bh-0000000Bjg8-1Vi7; Fri, 31 May 2024 13:20:53 +0000 Date: Fri, 31 May 2024 14:20:53 +0100 From: Matthew Wilcox To: Chengming Zhou Cc: Dev Jain , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Anshuman.Khandual@arm.com Subject: Re: [External] Re: [QUESTION] mm: Redundant const parameter? Message-ID: References: <7f7c3bbe-e250-420d-a7d5-89508d881f0b@bytedance.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7f7c3bbe-e250-420d-a7d5-89508d881f0b@bytedance.com> On Fri, May 31, 2024 at 08:30:08PM +0800, Chengming Zhou wrote: > On 2024/5/31 19:31, Dev Jain wrote: > > I guess it would be better if I send this as a patch and wait for comments. > > Ah, you're right. I think it should be: > > return folio_test_workingset(slab_folio(slab)); > > Right? Don't notice there isn't any build warning about this "const" discard. But there used to be! I fixed that in ce3467af6bde dated Feb 27 2024, which took a fair amount of prep work to make happen.